diff --git a/esp32/Makefile b/esp32/Makefile index 41d60cfee..3559ba12b 100644 --- a/esp32/Makefile +++ b/esp32/Makefile @@ -48,7 +48,8 @@ INC += -I../lib/timeutils INC += -I../../components/badge INC += -I../../components/ugfx-glue INC += -I../../components/graph -INC += -I../../components/sha2017 +INC += -I../../components/graphics +INC += -I../../components/badge-ota INC += -I../../components/bpp-recv INC += -I../../components/bpp-if INC += -I../../components/ed25519/include @@ -687,7 +688,7 @@ BADGE_COMPONENTS_O = $(addprefix $(PROJECT_PATH)/components/,\ badge/badge_power.o \ badge/badge_eink_dev.o \ badge/badge_eink_lut.o \ - badge/badge_eink_fb.o \ + badge/badge_fb.o \ badge/badge_nvs.o \ badge/badge.o \ graph/font.o \ @@ -697,9 +698,9 @@ BADGE_COMPONENTS_O = $(addprefix $(PROJECT_PATH)/components/,\ ugfx-glue/ginput_lld_toggle.o \ ugfx-glue/gfx_mk.o \ ugfx-glue/gfx_userfs.o \ - sha2017/letsencrypt.o \ - sha2017/sha2017_ota_graphics.o \ - sha2017/sha2017_ota.o \ + badge-ota/letsencrypt.o \ + graphics/graphics.o \ + badge-ota/badge_ota.o \ badge-first-run/badge_first_run.o \ png/adler32.o \ png/crc32.o \ diff --git a/esp32/main.c b/esp32/main.c index 748797c7b..362e44e89 100644 --- a/esp32/main.c +++ b/esp32/main.c @@ -37,7 +37,7 @@ #include "soc/cpu.h" #include "rom/rtc.h" -#include "sha2017_ota.h" +#include "badge_ota.h" #include "esprtcmem.h" #include "py/stackctrl.h" @@ -204,7 +204,7 @@ void app_main(void) { switch (magic) { case 1: printf("Starting OTA\n"); - sha2017_ota_update(); + badge_ota_update(); break; #ifdef CONFIG_SHA_BPP_ENABLE diff --git a/esp32/modbadge.c b/esp32/modbadge.c index fb1fce4e5..4ac651694 100644 --- a/esp32/modbadge.c +++ b/esp32/modbadge.c @@ -417,7 +417,7 @@ STATIC mp_obj_t badge_eink_png(mp_obj_t obj_x, mp_obj_t obj_y, mp_obj_t obj_file uint32_t dst_min_x = x < 0 ? -x : 0; uint32_t dst_min_y = y < 0 ? -y : 0; - int res = lib_png_load_image(pr, &badge_eink_fb[y * BADGE_EINK_WIDTH + x], dst_min_x, dst_min_y, BADGE_EINK_WIDTH - x, BADGE_EINK_HEIGHT - y, BADGE_EINK_WIDTH); + int res = lib_png_load_image(pr, &badge_fb[y * BADGE_EINK_WIDTH + x], dst_min_x, dst_min_y, BADGE_EINK_WIDTH - x, BADGE_EINK_HEIGHT - y, BADGE_EINK_WIDTH); lib_png_destroy(pr); if (is_bytes) { lib_mem_destroy(reader_p); diff --git a/esp32/modbadge.h b/esp32/modbadge.h index 4cb746fb0..88a894926 100644 --- a/esp32/modbadge.h +++ b/esp32/modbadge.h @@ -5,8 +5,8 @@ #include "badge.h" #include "badge_pins.h" +#include "badge_fb.h" #include "badge_eink.h" -#include "badge_eink_fb.h" #include "badge_eink_dev.h" #include "badge_power.h" #include "badge_leds.h" @@ -29,4 +29,4 @@ // #include "madison_gurkha.h" // #include "leaseweb.h" -#include "sha2017_ota.h" +#include "badge_ota.h" diff --git a/esp32/modfreedomgfx_eink.c b/esp32/modfreedomgfx_eink.c index 0d9fcbcca..6407aee41 100644 --- a/esp32/modfreedomgfx_eink.c +++ b/esp32/modfreedomgfx_eink.c @@ -28,15 +28,15 @@ #include "modfreedomgfx_eink.h" #include -#include +#include #include extern bool ugfx_screen_flipped; uint8_t* freedomgfxInit(void) { - badge_eink_fb_init(); - return badge_eink_fb; + badge_fb_init(); + return badge_fb; } void freedomgfxDeinit(void) @@ -55,5 +55,5 @@ void freedomgfxDraw() badge_eink_flags_t flags = DISPLAY_FLAG_FULL_UPDATE | DISPLAY_FLAG_8BITPIXEL; if(ugfx_screen_flipped) flags |= DISPLAY_FLAG_ROTATE_180; - badge_eink_display(badge_eink_fb, flags); + badge_eink_display(badge_fb, flags); } diff --git a/unix/Makefile b/unix/Makefile index 749fdb095..3d76f721a 100644 --- a/unix/Makefile +++ b/unix/Makefile @@ -24,7 +24,7 @@ INC += -I$(TOP) INC += -I$(BUILD) INC += -I../../components/ugfx-glue INC += -I../../components/badge -INC += -I../../components/sha2017 +INC += -I../../components/badge-ota INC += -I../../esp-idf/components/esp32/include/ INC += -I../../ugfx/src/gdisp/mcufont INC += -I../../ugfx @@ -168,7 +168,7 @@ SRC_C = \ modbadge.c \ ../../ugfx/drivers/multiple/SDL/gdisp_lld_SDL.c \ ginput_lld_toggle.c \ - ../../components/sha2017/letsencrypt.c \ + ../../components/badge-ota/letsencrypt.c \ gfx_mk.c \ modos.c \ moduos_vfs.c \