Start mvoing hardware drivers to /drivers/ (#1433)

* start driver isolation

* update nyquist and orthodox boards

* update atreus62

* move drivers to avr

* update avr conditional
This commit is contained in:
Jack Humbert 2017-07-10 11:18:47 -04:00 committed by GitHub
parent 8d190d5e25
commit 42d5a324eb
19 changed files with 13 additions and 1582 deletions

View File

@ -9,6 +9,9 @@ LIB_PATH = $(TOP_DIR)/lib
QUANTUM_DIR = quantum
QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR)
DRIVER_DIR = drivers
DRIVER_PATH = $(TOP_DIR)/$(DRIVER_DIR)
BUILD_DIR := $(TOP_DIR)/.build
COMMON_VPATH := $(TOP_DIR)
@ -17,4 +20,5 @@ COMMON_VPATH += $(QUANTUM_PATH)
COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
COMMON_VPATH += $(QUANTUM_PATH)/audio
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
COMMON_VPATH += $(QUANTUM_PATH)/api
COMMON_VPATH += $(QUANTUM_PATH)/api
COMMON_VPATH += $(DRIVER_PATH)

View File

@ -87,7 +87,7 @@ endif
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
OPT_DEFS += -DRGBLIGHT_ENABLE
SRC += $(QUANTUM_DIR)/light_ws2812.c
SRC += ws2812.c
SRC += $(QUANTUM_DIR)/rgblight.c
CIE1931_CURVE = yes
LED_BREATHING_TABLE = yes

View File

@ -6,7 +6,7 @@
#include <string.h>
#include "print.h"
#include "lets_split.h"
#include "common/glcdfont.c"
#include "glcdfont.c"
#ifdef ADAFRUIT_BLE_ENABLE
#include "adafruit_ble.h"
#endif

2
quantum/light_ws2812.c → drivers/avr/ws2812.c Executable file → Normal file
View File

@ -21,7 +21,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "light_ws2812.h"
#include "ws2812.h"
#include <avr/interrupt.h>
#include <avr/io.h>
#include <util/delay.h>

0
quantum/light_ws2812.h → drivers/avr/ws2812.h Executable file → Normal file
View File

View File

@ -1,4 +1,4 @@
#include "light_ws2812.h"
#include "ws2812.h"
#include "rgbsps.h"
struct cRGB led[RGBSPS_NUM];

View File

@ -72,7 +72,7 @@ BLUETOOTH = AdafruitBLE
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
SRC += $(QUANTUM_DIR)/light_ws2812.c
SRC += ws2812.c
SRC += rgbsps.c
SRC += $(QUANTUM_DIR)/analog.c
SRC += analog.c
SRC += matrix.c

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +0,0 @@
#ifndef SSD1306_H
#define SSD1306_H
#include <stdbool.h>
#include <stdio.h>
bool iota_gfx_init(void);
void iota_gfx_task(void);
bool iota_gfx_off(void);
bool iota_gfx_on(void);
void iota_gfx_flush(void);
void iota_gfx_write_char(uint8_t c);
void iota_gfx_write(const char *data);
void iota_gfx_write_P(const char *data);
void iota_gfx_clear_screen(void);
#endif

View File

@ -61,7 +61,7 @@
#include <stdint.h>
#include <stdbool.h>
#include "eeconfig.h"
#include "light_ws2812.h"
#include "ws2812.h"
extern LED_TYPE led[RGBLED_NUM];

View File

@ -12,7 +12,7 @@ HEX = $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature
EEP = $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT)
BIN =
COMMON_VPATH += $(DRIVER_PATH)/avr
COMPILEFLAGS += -funsigned-char
COMPILEFLAGS += -funsigned-bitfields