Skip to content

Commit

Permalink
WIP10: osu
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane Portron committed Oct 21, 2024
1 parent 09c952f commit a9829f7
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 13 deletions.
13 changes: 6 additions & 7 deletions io/include/os_io_seph_ux.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#pragma once

/* Includes ------------------------------------------------------------------*/
#include "ux.h"
#include "decorators.h"

#ifdef HAVE_BAGL
#include "ux_bagl.h"
Expand All @@ -30,7 +30,7 @@ typedef enum {
} os_io_touch_debug_mode_t;

/* Exported types, structures, unions ----------------------------------------*/
#ifdef HAVE_SE_TOUCH

typedef struct io_touch_info_s {
uint16_t x;
uint16_t y;
Expand All @@ -39,7 +39,7 @@ typedef struct io_touch_info_s {
uint8_t h;
uint8_t swipe;
} io_touch_info_t;
#endif // HAVE_SE_TOUCH


/* Exported defines --------------------------------------------------------*/
#define SERIALIZED_NBGL_MAX_LEN (100)
Expand All @@ -49,10 +49,9 @@ typedef struct io_touch_info_s {
/* Exported variables --------------------------------------------------------*/

/* Exported functions prototypes--------------------------------------------- */
void io_seph_ux_init_button(void);
void io_process_itc_ux_event(uint8_t *buffer_in, size_t buffer_in_length);
void io_process_event(uint8_t *buffer_in, size_t buffer_in_length);
unsigned int os_ux_blocking(bolos_ux_params_t *params);
void io_seph_ux_init_button(void);
void io_process_itc_ux_event(uint8_t *buffer_in, size_t buffer_in_length);
void io_process_event(uint8_t *buffer_in, size_t buffer_in_length);

#ifdef HAVE_BAGL
void io_seph_ux_display_bagl_element(const bagl_element_t *element);
Expand Down
2 changes: 1 addition & 1 deletion io/src/os_io_seph_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ int os_io_seph_cmd_set_touch_state(uint8_t enable)
buffer[0] = SEPROXYHAL_TAG_SET_TOUCH_STATE;
buffer[1] = 0;
buffer[2] = 1;
buffer[3] = (enable ? 0x00 : 0x01);
buffer[3] = (enable ? 0x01 : 0x00);

return os_io_tx_cmd(OS_IO_PACKET_TYPE_SEPH, buffer, 4, NULL);
}
Expand Down
4 changes: 4 additions & 0 deletions lib_cxng/src/cx_rng.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
#ifndef CX_RNG_H
#define CX_RNG_H

#ifdef BOLOS_OS_UPGRADER_APP
#include "osu_defines.h"
#endif

#ifdef HAVE_RNG

#include <stdint.h>
Expand Down
2 changes: 1 addition & 1 deletion lib_nbgl/src/nbgl_layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ static uint8_t nbTouchableControls = 0;
/**********************
* STATIC PROTOTYPES
**********************/
extern const char *get_ux_loc_string(UX_LOC_STRINGS_INDEX index);
//extern const char *get_ux_loc_string(UX_LOC_STRINGS_INDEX index);

#ifdef HAVE_FAST_HOLD_TO_APPROVE
// Unit step in % of touchable progress bar
Expand Down
1 change: 0 additions & 1 deletion lib_nbgl/src/nbgl_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ extern bool last_bold_state, verbose;
/**********************
* STATIC PROTOTYPES
**********************/
extern const char *get_ux_loc_string(UX_LOC_STRINGS_INDEX index);

/**********************
* GLOBAL FUNCTIONS
Expand Down
2 changes: 2 additions & 0 deletions lib_stusb/src/usbd_ledger.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "usbd_ledger_cdc.h"
#include "os_io_seph_cmd.h"
#include "seproxyhal_protocol.h"
#include "hal_timers.h"

#pragma GCC diagnostic ignored "-Wcast-qual"

Expand Down Expand Up @@ -474,6 +475,7 @@ void USBD_LEDGER_start(uint16_t pid, uint16_t vid, char *name, uint16_t class_ma
USBD_Init(&usbd_ledger_data.usbd_handle, (USBD_DescriptorsTypeDef *) &LEDGER_Desc, 0);
USBD_RegisterClass(&usbd_ledger_data.usbd_handle, (USBD_ClassTypeDef *) &USBD_LEDGER_CLASS);
USBD_Start(&usbd_ledger_data.usbd_handle);
os_delay_ms(400);
usbd_ledger_data.classes = class_mask;
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib_u2f/src/u2f_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static u2f_error_t process_packet(u2f_transport_t *handle, uint8_t *buffer, uint
goto end;
}

// Check packet will fit in the rx buffer
// Check if packet will fit in the rx buffer
handle->rx_message_length = (uint16_t) U2BE(buffer, 1) + 3;
if (handle->rx_message_length > handle->rx_message_buffer_size) {
error = CTAP1_ERR_OTHER;
Expand Down
5 changes: 3 additions & 2 deletions lib_ux_nbgl/ux_nbgl.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@
#include "os_task.h"
#include "nbgl_screen.h"
#include "nbgl_touch.h"
#include "seproxyhal_protocol.h"

#include <string.h>

#define BUTTON_LEFT 1
#define BUTTON_RIGHT 2
#define BUTTON_LEFT SEPROXYHAL_TAG_BUTTON_PUSH_EVENT_LEFT
#define BUTTON_RIGHT SEPROXYHAL_TAG_BUTTON_PUSH_EVENT_RIGHT

/**
* Common structure for applications to perform asynchronous UX aside IO operations
Expand Down

0 comments on commit a9829f7

Please sign in to comment.