diff --git a/Makefile b/Makefile index c8c0386..812f265 100755 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ DEFINES += MAJOR_VERSION=$(APPVERSION_M) MINOR_VERSION=$(APPVERSION_N) PATCH_VER ifeq ($(TARGET_NAME),TARGET_NANOS) ICONNAME=nanos_icon_password_manager.gif -else ifeq ($(TARGET_NAME),TARGET_NANOX) +else ICONNAME=nanox_icon_password_manager.gif endif @@ -67,7 +67,7 @@ ifneq ($(TARGET_NAME), TARGET_BLUE) DEFINES += HAVE_UX_FLOW endif -ifeq ($(TARGET_NAME),TARGET_NANOX) +ifneq ($(TARGET_NAME),TARGET_NANOS) DEFINES += HAVE_GLO096 DEFINES += HAVE_BAGL BAGL_WIDTH=128 BAGL_HEIGHT=64 DEFINES += HAVE_BAGL_ELLIPSIS # long label truncation feature @@ -82,10 +82,10 @@ endif DEBUG:=0 ifneq ($(DEBUG),0) DEFINES += HAVE_STACK_OVERFLOW_CHECK -ifeq ($(TARGET_NAME),TARGET_NANOX) -DEFINES += HAVE_PRINTF PRINTF=mcu_usb_printf -else +ifeq ($(TARGET_NAME),TARGET_NANOS) DEFINES += HAVE_PRINTF PRINTF=screen_printf +else +DEFINES += HAVE_PRINTF PRINTF=mcu_usb_printf endif else DEFINES += PRINTF\(...\)= @@ -108,7 +108,7 @@ ifeq ($(GCCPATH),) $(info GCCPATH is not set: arm-none-eabi-* will be used from PATH) endif -CC := $(CLANGPATH)clang +CC := $(CLANGPATH)clang #CFLAGS += -O0 CFLAGS += -O3 -Os @@ -116,7 +116,7 @@ AS := $(GCCPATH)arm-none-eabi-gcc LD := $(GCCPATH)arm-none-eabi-gcc LDFLAGS += -O3 -Os -LDLIBS += -lm -lgcc -lc +LDLIBS += -lm -lgcc -lc # import rules to compile glyphs(/pone) include $(BOLOS_SDK)/Makefile.glyphs diff --git a/src/keyboards/bolos_ux_nanox_keyboard.c b/src/keyboards/bolos_ux_nanox_keyboard.c index a660495..741973e 100644 --- a/src/keyboards/bolos_ux_nanox_keyboard.c +++ b/src/keyboards/bolos_ux_nanox_keyboard.c @@ -8,7 +8,7 @@ #include "glyphs.h" -#ifdef TARGET_NANOX +#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) const bagl_element_t screen_common_keyboard_elements[] = { diff --git a/src/keyboards/keyboard.h b/src/keyboards/keyboard.h index 0fc7479..5cfb13a 100644 --- a/src/keyboards/keyboard.h +++ b/src/keyboards/keyboard.h @@ -46,7 +46,7 @@ typedef struct keyboard_ctx { char words_buffer[25]; -#ifdef TARGET_NANOX +#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) char title[20]; #endif diff --git a/src/keyboards/text_keyboard.c b/src/keyboards/text_keyboard.c index b7f3621..0463970 100644 --- a/src/keyboards/text_keyboard.c +++ b/src/keyboards/text_keyboard.c @@ -26,7 +26,7 @@ const bagl_icon_details_t* const screen_keyboard_classes_icons[] = { &C_icon_backspace, &C_icon_validate, &C_icon_classes, -#if defined(TARGET_NANOX) +#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) &C_icon_lowercase_invert, &C_icon_uppercase_invert, &C_icon_digits_invert, @@ -48,7 +48,7 @@ void screen_keyboard_render_icon(unsigned int value) { #if defined(TARGET_NANOS) icon = (bagl_icon_details_t*) PIC(screen_keyboard_classes_icons[value]); G_ux.tmp_element.component.y = 5; -#elif defined(TARGET_NANOX) +#elif defined(TARGET_NANOX) || defined(TARGET_NANOS2) uint8_t inverted = G_ux.tmp_element.component.userid == 0x02; icon = (bagl_icon_details_t*) PIC(screen_keyboard_classes_icons[value + (inverted ? 6 : 0)]); G_ux.tmp_element.component.y -= 7; diff --git a/src/password_ui_flows.c b/src/password_ui_flows.c index a3b2ac4..c589122 100644 --- a/src/password_ui_flows.c +++ b/src/password_ui_flows.c @@ -283,7 +283,7 @@ new_password_approve_step, pb, #if defined(TARGET_NANOS) display_nickname_explanation(), -#elif defined(TARGET_NANOX) +#elif defined(TARGET_NANOX) || defined(TARGET_NANOS2) enter_password_nickname(), #endif { @@ -340,7 +340,7 @@ void create_password_entry() { } void enter_password_nickname() { -#if defined(TARGET_NANOX) +#if defined(TARGET_NANOX) || defined(TARGET_NANOS2) strcpy(G_keyboard_ctx.title, "Enter nickname"); #endif os_memset(G_keyboard_ctx.words_buffer, 0, sizeof(G_keyboard_ctx.words_buffer)); @@ -471,7 +471,7 @@ enter_keyboard_setting(1, HID_MAPPING_QWERTY_INTL), &is_selected_icon, #if defined(TARGET_NANOS) "Qwerty Intl", - #elif defined(TARGET_NANOX) + #elif defined(TARGET_NANOX) || defined(TARGET_NANOS2) "Qwerty International", #endif });