@@ -57,6 +57,13 @@ uint16_t common_read_16_bit_inverse(const uint8_t data_buf[__static 2])
57
57
return temp_16 ;
58
58
}
59
59
60
+ uint8_t * common_write_16_bit_inverse (uint16_t value , uint8_t ptr [__static 2 ])
61
+ {
62
+ * ptr ++ = value ;
63
+ * ptr ++ = value >> 8 ;
64
+ return ptr ;
65
+ }
66
+
60
67
uint8_t * common_write_24_bit_inverse (uint_fast24_t value , uint8_t ptr [__static 3 ])
61
68
{
62
69
* ptr ++ = value ;
@@ -134,6 +141,7 @@ static fhss_api_t *test_generate_fhss_api(void)
134
141
fhss_common_stub .fhss_struct .ws -> is_on_bc_channel = false;
135
142
fhss_common_stub .fhss_struct .callbacks .change_channel = & mac_set_channel ;
136
143
fhss_common_stub .fhss_struct .callbacks .read_mac_address = & mac_read_64bit_mac_address ;
144
+ fhss_common_stub .fhss_struct .callbacks .tx_poll = & mac_poll_tx_queue ;
137
145
test_set_platform_api (& fhss_common_stub .fhss_struct .platform_functions );
138
146
fhss_ws_set_callbacks (& fhss_common_stub .fhss_struct );
139
147
return & fhss_api ;
@@ -352,7 +360,7 @@ bool test_fhss_ws_write_synch_info_callback()
352
360
{
353
361
fhss_api_t * api = test_generate_fhss_api ();
354
362
fhss_common_stub .fhss_struct .ws -> fhss_configuration .ws_channel_function = WS_TR51CF ;
355
- uint8_t synch_info [16 ] = {0x05 , 0x15 , 0x02 , 0x00 , 0x00 , 0x00 , 0x00 , 0x05 , 0x15 , 0x01 , 0x04 , 0x00 , 0x00 , 0x00 , 0x00 , 0x3f };
363
+ uint8_t synch_info [100 ] = {0x05 , 0x15 , 0x02 , 0x00 , 0x00 , 0x00 , 0x00 , 0x05 , 0x15 , 0x01 , 0x04 , 0x00 , 0x00 , 0x00 , 0x00 , 0x3f };
356
364
// Test when FHSS struct not found
357
365
disable_fhss_struct ();
358
366
if (fhss_common_stub .fhss_struct .fhss_api -> write_synch_info (api , synch_info , sizeof (synch_info ), DEFAULT_FRAME_TYPE , DEFAULT_TX_TIME ) != -1 ) {
@@ -517,6 +525,7 @@ bool test_fhss_ws_set_parent()
517
525
broadcast_timing_info_t bc_timing_info ;
518
526
memset (& bc_timing_info , 0 , sizeof (broadcast_timing_info_t ));
519
527
fhss_api_t * api = test_generate_fhss_api ();
528
+ fhss_common_stub .fhss_struct .ws -> fhss_configuration .ws_channel_function = WS_TR51CF ;
520
529
521
530
// Test without WS enabled FHSS
522
531
fhss_structure_t fake_fhss_structure ;
0 commit comments