esp8266: Replace esp.neopixel with machine.bitstream.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared
2021-08-11 15:14:46 +10:00
committed by Damien George
parent 71f4faac27
commit 39e9c0788f
8 changed files with 97 additions and 102 deletions

View File

@@ -36,7 +36,6 @@
#include "user_interface.h"
#include "mem.h"
#include "ets_alt_task.h"
#include "espneopixel.h"
#include "espapa102.h"
#include "modmachine.h"
@@ -199,16 +198,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);
esp_neopixel_write(mp_obj_get_pin_obj(pin)->phys_port,
(uint8_t *)bufinfo.buf, bufinfo.len, mp_obj_is_true(is800k));
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;
@@ -363,9 +352,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