@@ -17,17 +17,17 @@ typedef struct {
17
17
typedef struct {
18
18
const char * header ;
19
19
uint8_t * bytes ;
20
- uint16_t bytes_count ;
20
+ uint8_t bytes_count ;
21
21
22
22
ByteInputCallback input_callback ;
23
23
ByteChangedCallback changed_callback ;
24
24
void * callback_context ;
25
25
26
26
bool selected_high_nibble ;
27
- uint16_t selected_byte ;
27
+ uint8_t selected_byte ;
28
28
int8_t selected_row ; // row -1 - input, row 0 & 1 - keyboard
29
29
uint8_t selected_column ;
30
- uint16_t first_visible_byte ;
30
+ uint8_t first_visible_byte ;
31
31
} ByteInputModel ;
32
32
33
33
static const uint8_t keyboard_origin_x = 7 ;
@@ -164,7 +164,7 @@ static void byte_input_draw_input(Canvas* canvas, ByteInputModel* model) {
164
164
canvas_draw_icon (canvas , 2 , 19 , & I_ButtonLeftSmall_3x5 );
165
165
canvas_draw_icon (canvas , 123 , 19 , & I_ButtonRightSmall_3x5 );
166
166
167
- for (uint16_t i = model -> first_visible_byte ;
167
+ for (uint8_t i = model -> first_visible_byte ;
168
168
i < model -> first_visible_byte + MIN (model -> bytes_count , max_drawable_bytes );
169
169
i ++ ) {
170
170
uint8_t byte_position = i - model -> first_visible_byte ;
@@ -253,7 +253,7 @@ static void byte_input_draw_input_selected(Canvas* canvas, ByteInputModel* model
253
253
canvas_draw_icon (canvas , 2 , 19 , & I_ButtonLeftSmall_3x5 );
254
254
canvas_draw_icon (canvas , 122 , 19 , & I_ButtonRightSmall_3x5 );
255
255
256
- for (uint16_t i = model -> first_visible_byte ;
256
+ for (uint8_t i = model -> first_visible_byte ;
257
257
i < model -> first_visible_byte + MIN (model -> bytes_count , max_drawable_bytes );
258
258
i ++ ) {
259
259
uint8_t byte_position = i - model -> first_visible_byte ;
@@ -305,7 +305,7 @@ static void byte_input_draw_input_selected(Canvas* canvas, ByteInputModel* model
305
305
* @param value char value
306
306
* @param high_nibble set high nibble
307
307
*/
308
- static void byte_input_set_nibble (uint8_t * data , uint16_t position , char value , bool high_nibble ) {
308
+ static void byte_input_set_nibble (uint8_t * data , uint8_t position , char value , bool high_nibble ) {
309
309
switch (value ) {
310
310
case '0' :
311
311
case '1' :
@@ -750,7 +750,7 @@ void byte_input_set_result_callback(
750
750
ByteChangedCallback changed_callback ,
751
751
void * callback_context ,
752
752
uint8_t * bytes ,
753
- uint16_t bytes_count ) {
753
+ uint8_t bytes_count ) {
754
754
with_view_model (
755
755
byte_input -> view ,
756
756
ByteInputModel * model ,
0 commit comments