8000 Remove obsolete peripheral drivers in esp module by dhalbert · Pull Request #641 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Remove obsolete peripheral drivers in esp module #641

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions esp8266/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ SRC_C = \
espuart.c \
esppwm.c \
espneopixel.c \
espapa102.c \
intr.c \
modpyb.c \
modmachine.c \
Expand Down Expand Up @@ -190,10 +189,6 @@ LIB_SRC_C += \
lib/oofatfs/option/unicode.c
endif

DRIVERS_SRC_C = $(addprefix drivers/,\
dht/dht.c \
)

SRC_S = \
gchelper.s \

Expand All @@ -206,7 +201,6 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_SHARED_MODULE_EXPANDED:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(STM_SRC_C:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(EXTMOD_SRC_C:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(LIB_SRC_C:.c=.o))
OBJ += $(addprefix $(BUILD)/, $(DRIVERS_SRC_C:.c=.o))
#OBJ += $(BUILD)/pins_$(BOARD).o

# List of sources for qstr extraction
Expand Down
115 changes: 0 additions & 115 deletions esp8266/espapa102.c

This file was deleted.

31 changes: 0 additions & 31 deletions esp8266/espapa102.h

This file was deleted.

35 changes: 0 additions & 35 deletions esp8266/modesp.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,9 @@
#include "py/runtime.h"
#include "py/mperrno.h"
#include "py/mphal.h"
#include "drivers/dht/dht.h"
#include "espuart.h"
#include "user_interface.h"
#include "mem.h"
#include "espneopixel.h"
#include "espapa102.h"
#include "modmachine.h"

#define MODESP_INCLUDE_CONSTANTS (1)
Expand Down Expand Up @@ -193,31 +190,6 @@ STATIC mp_obj_t esp_check_fw(void) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_0(esp_check_fw_obj, esp_check_fw);


STATIC mp_obj_t esp_neopixel_write_(mp_obj_t pin, mp_obj_t buf, mp_obj_t is800k) {
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(buf, &bufinfo, MP_BUFFER_READ);
if (!mp_obj_is_true(is800k)) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, "Only 800khz neopixels are supported."));
}
esp_neopixel_write(mp_obj_get_pin_obj(pin)->phys_port,
(uint8_t*)bufinfo.buf, bufinfo.len);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_3(esp_neopixel_write_obj, esp_neopixel_write_);

#if MICROPY_ESP8266_APA102
STATIC mp_obj_t esp_apa102_write_(mp_obj_t clockPin, mp_obj_t dataPin, mp_obj_t buf) {
mp_buffer_info_t bufinfo;
mp_get_buffer_raise(buf, &bufinfo, MP_BUFFER_READ);
esp_apa102_write(mp_obj_get_pin_obj(clockPin)->phys_port,
mp_obj_get_pin_obj(dataPin)->phys_port,
(uint8_t*)bufinfo.buf, bufinfo.len);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_3(esp_apa102_write_obj, esp_apa102_write_);
#endif

STATIC mp_obj_t esp_freemem() {
return MP_OBJ_NEW_SMALL_INT(system_get_free_heap_size());
}
Expand Down Expand Up @@ -362,13 +334,6 @@ STATIC const mp_rom_map_elem_t esp_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_flash_erase), MP_ROM_PTR(&esp_flash_erase_obj) },
{ MP_ROM_QSTR(MP_QSTR_flash_size), MP_ROM_PTR(&esp_flash_size_obj) },
{ MP_ROM_QSTR(MP_QSTR_flash_user_start), MP_ROM_PTR(&esp_flash_user_start_obj) },
#if MICROPY_ESP8266_NEOPIXEL
{ MP_ROM_QSTR(MP_QSTR_neopixel_write), MP_ROM_PTR(&esp_neopixel_write_obj) },
#endif
#if MICROPY_ESP8266_APA102
{ MP_ROM_QSTR(MP_QSTR_apa102_write), MP_ROM_PTR(&esp_apa102_write_obj) },
#endif
{ MP_ROM_QSTR(MP_QSTR_dht_readinto), MP_ROM_PTR(&dht_readinto_obj) },
{ MP_ROM_QSTR(MP_QSTR_freemem), MP_ROM_PTR(&esp_freemem_obj) },
{ MP_ROM_QSTR(MP_QSTR_meminfo), MP_ROM_PTR(&esp_meminfo_obj) },
{ MP_ROM_QSTR(MP_QSTR_check_fw), MP_ROM_PTR(&esp_check_fw_obj) },
Expand Down
17 changes: 0 additions & 17 deletions esp8266/modules/apa102.py

This file was deleted.

32 changes: 0 additions & 32 deletions esp8266/modules/dht.py

This file was deleted.

1 change: 0 additions & 1 deletion esp8266/modules/ds18x20.py

This file was deleted.

1 change: 0 additions & 1 deletion esp8266/modules/onewire.py

This file was deleted.

1 change: 0 additions & 1 deletion esp8266/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
#define MICROPY_FATFS_MAX_SS (4096)
#define MICROPY_FATFS_LFN_CODE_PAGE (437) /* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
#define MICROPY_VFS_FAT (1)
#define MICROPY_ESP8266_APA102 (1)
#define MICROPY_ESP8266_NEOPIXEL (1)

extern void ets_event_poll(void);
Expand Down
0