Skip to content

Commit b643622

Browse files
author
Jarkko Paso
authored
Merge pull request ARMmbed#1532 from ARMmbed/IOTTHD-2049
Iotthd 2049
2 parents b741f98 + 55861f3 commit b643622

File tree

12 files changed

+91
-31
lines changed

12 files changed

+91
-31
lines changed

nanostack/fhss_api.h

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ typedef struct fhss_callback fhss_callback_t;
3838
#define FHSS_SYNCH_REQUEST_FRAME 1 /**< FHSS synchronization request frame */
3939
#define FHSS_DATA_FRAME 2 /**< FHSS data frame */
4040

41+
/**
42+
* @brief FHSS information element types.
43+
*/
44+
#define FHSS_UTT_IE 0 /**< UTT-IE */
45+
#define FHSS_BT_IE 1 /**< BT-IE */
46+
#define FHSS_US_IE 2 /**< US-IE */
47+
#define FHSS_BS_IE 3 /**< BS-IE */
48+
#define FHSS_PLAIN_SYNCH_INFO 4 /**< Plain synchronization information */
49+
4150
/**
4251
* @brief FHSS synchronization info length.
4352
*/
@@ -74,7 +83,6 @@ typedef bool fhss_use_broadcast_queue(const fhss_api_t *api, bool is_broadcast_a
7483
* @param is_broadcast_addr Destination address type of packet (true if broadcast address).
7584
* @param destination_address Destination MAC address.
7685
* @param frame_type Frame type of packet (Frames types are defined by FHSS api).
77-
* @param synch_info Pointer to where FHSS synchronization info is written (if synch frame).
7886
* @param frame_length MSDU length of the frame.
7987
* @param phy_header_length PHY header length.
8088
* @param phy_tail_length PHY tail length.
@@ -84,7 +92,7 @@ typedef bool fhss_use_broadcast_queue(const fhss_api_t *api, bool is_broadcast_a
8492
* @return -3 Broadcast packet on Unicast channel (not allowed), push packet back to queue.
8593
* @return -4 Synchronization info missing.
8694
*/
87-
typedef int fhss_tx_handle(const fhss_api_t *api, bool is_broadcast_addr, uint8_t *destination_address, int frame_type, uint8_t *synch_info, uint16_t frame_length, uint8_t phy_header_length, uint8_t phy_tail_length);
95+
typedef int fhss_tx_handle(const fhss_api_t *api, bool is_broadcast_addr, uint8_t *destination_address, int frame_type, uint16_t frame_length, uint8_t phy_header_length, uint8_t phy_tail_length);
8896

8997
/**
9098
* @brief Check TX permission.
@@ -152,6 +160,17 @@ typedef uint32_t fhss_read_timestamp(const fhss_api_t *api);
152160
*/
153161
typedef uint16_t fhss_get_retry_period(const fhss_api_t *api, uint8_t *destination_address, uint16_t phy_mtu);
154162

163+
/**
164+
* @brief Write synchronization info to given pointer.
165+
* @param api FHSS instance.
166+
* @param info_ptr Pointer to written data.
167+
* @param info_type Type of the written info (UTT-IE, BT-IE, US-IE, BS-IE).
168+
* @param frame_type_id Frame type of packet which will be written in info element.
169+
* @param tx_time TX time must be referenced to the first symbol following the SFD of the transmitted frame.
170+
* @return -1 on fail, write length otherwise.
171+
*/
172+
typedef int16_t fhss_write_synch_info(const fhss_api_t *api, uint8_t *info_ptr, int info_type, int frame_type_id, uint32_t tx_time);
173+
155174
/**
156175
* @brief Initialize MAC functions.
157176
* @param api FHSS instance.
@@ -177,6 +196,7 @@ struct fhss_api {
177196
fhss_synch_state_set *synch_state_set; /**< Change synchronization state. */
178197
fhss_read_timestamp *read_timestamp; /**< Read timestamp. */
179198
fhss_get_retry_period *get_retry_period; /**< Get retransmission period. */
199+
fhss_write_synch_info *write_synch_info; /**< Write synchronization info to TX frame*/
180200
fhss_init_callbacks *init_callbacks; /**< Initialize MAC functions. */
181201
};
182202

@@ -256,6 +276,18 @@ typedef int mac_broadcast_notify(const fhss_api_t *fhss_api, uint32_t broadcast_
256276
*/
257277
typedef int mac_read_coordinator_mac_address(const fhss_api_t *fhss_api, uint8_t *mac_address);
258278

279+
/**
280+
* @brief Read synchronization info for a specific peer.
281+
* @param fhss_api FHSS instance.
282+
* @param info_ptr Pointer to info data.
283+
* @param mac_address MAC address pointer.
284+
* @param info_type Type of the read info (UTT-IE, BT-IE, US-IE, BS-IE).
285+
* @param rx_timestamp Time of reception of the element.
286+
* @return >=0 Length of the info.
287+
* @return -1 Fail.
288+
*/
289+
typedef int mac_read_synch_info(const fhss_api_t *fhss_api, uint8_t *info_ptr, uint8_t *mac_address, int info_type, uint32_t rx_timestamp);
290+
259291
/**
260292
* \brief Struct fhss_callback defines functions that software MAC needs to implement.
261293
* Function pointers are passed to FHSS using fhss_init_callbacks function.
@@ -270,6 +302,7 @@ struct fhss_callback {
270302
mac_tx_poll *tx_poll; /**< Poll TX queue. */
271303
mac_broadcast_notify *broadcast_notify; /**< Broadcast channel notification from FHSS. */
272304
mac_read_coordinator_mac_address *read_coord_mac_address; /**< Read coordinator MAC address. */
305+
mac_read_synch_info *read_synch_info; /**< Read information element for a specific MAC address. */
273306
};
274307

275308
#ifdef __cplusplus

nanostack/fhss_config.h

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ typedef struct fhss_configuration
6969
*/
7070
typedef struct fhss_timer
7171
{
72-
/** Start timeout (1us) */
72+
/** Start timeout (1us). Timer must support multiple simultaneous timeouts */
7373
int (*fhss_timer_start)(uint32_t, void (*fhss_timer_callback)(const fhss_api_t *fhss_api, uint16_t), const fhss_api_t *fhss_api);
7474

7575
/** Stop timeout */
76-
int (*fhss_timer_stop)(const fhss_api_t *fhss_api);
76+
int (*fhss_timer_stop)(void (*fhss_timer_callback)(const fhss_api_t *fhss_api, uint16_t), const fhss_api_t *fhss_api);
7777

7878
/** Get remaining time of started timeout*/
79-
uint32_t (*fhss_get_remaining_slots)(const fhss_api_t *fhss_api);
79+
uint32_t (*fhss_get_remaining_slots)(void (*fhss_timer_callback)(const fhss_api_t *fhss_api, uint16_t), const fhss_api_t *fhss_api);
8080

8181
/** Get timestamp since initialization of driver. Overflow of 32-bit counter is allowed (1us) */
8282
uint32_t (*fhss_get_timestamp)(const fhss_api_t *fhss_api);
@@ -103,6 +103,12 @@ typedef struct fhss_synch_configuration
103103

104104
/** Number of superframes. */
105105
uint8_t fhss_number_of_superframes;
106+
107+
/** Broadcast interval. Interval between started broadcast channels. (milliseconds) */
108+
uint32_t fhss_broadcast_interval;
109+
110+
/** Broadcast dwell time. (milliseconds) */
111+
uint8_t fhss_bc_dwell_interval;
106112
} fhss_synch_configuration_t;
107113

108114

source/MAC/IEEE802_15_4/mac_pd_sap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,13 @@ void mac_pd_sap_state_machine(protocol_interface_rf_mac_setup_s *rf_mac_setup)
220220
// FHSS synchronization info is written in the end of transmitted (Beacon) buffer
221221
dev_driver_tx_buffer_s *tx_buf = &rf_mac_setup->dev_driver_tx_buffer;
222222
synch_info = tx_buf->buf + rf_mac_setup->dev_driver->phy_driver->phy_header_length + tx_buf->len - FHSS_SYNCH_INFO_LENGTH;
223+
//TODO: Add proper frame type when they are defined
224+
rf_mac_setup->fhss_api->write_synch_info(rf_mac_setup->fhss_api, synch_info, FHSS_PLAIN_SYNCH_INFO, 0, 0);
223225
}
224226
// Change to destination channel and write synchronization info to Beacon frames here
225227
int tx_handle_retval = rf_mac_setup->fhss_api->tx_handle(rf_mac_setup->fhss_api, !mac_is_ack_request_set(active_buf),
226228
active_buf->DstAddr, mac_convert_frame_type_to_fhss(active_buf->fcf_dsn.frametype),
227-
synch_info, active_buf->mac_payload_length, rf_mac_setup->dev_driver->phy_driver->phy_header_length,
229+
active_buf->mac_payload_length, rf_mac_setup->dev_driver->phy_driver->phy_header_length,
228230
rf_mac_setup->dev_driver->phy_driver->phy_tail_length);
229231
// When FHSS TX handle returns -1, transmission of the packet is currently not allowed -> restart CCA timer
230232
if (tx_handle_retval == -1) {

source/Service_Libs/fhss/fhss.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ static int fhss_reset_synch_monitor(fhss_synch_monitor_s *synch_monitor, bool re
311311
static int fhss_reset(fhss_structure_t *fhss_structure)
312312
{
313313
if (fhss_structure) {
314-
fhss_structure->platform_functions.fhss_timer_stop(fhss_structure->fhss_api);
314+
fhss_structure->platform_functions.fhss_timer_stop(fhss_superframe_handler, fhss_structure->fhss_api);
315315
fhss_struct->synch_panid = 0xffff;
316316
fhss_beacon_periodic_stop(fhss_structure);
317317
fhss_struct->current_superframe = 0;
@@ -374,7 +374,7 @@ void fhss_start_timer(fhss_structure_t *fhss_structure, uint32_t time, void (*ca
374374

375375
uint32_t fhss_get_remaining_time_to_next_superframe(const fhss_structure_t *fhss_structure)
376376
{
377-
const uint32_t slots = fhss_structure->platform_functions.fhss_get_remaining_slots(fhss_structure->fhss_api);
377+
const uint32_t slots = fhss_structure->platform_functions.fhss_get_remaining_slots(fhss_superframe_handler, fhss_structure->fhss_api);
378378
const uint32_t time = slots * fhss_structure->platform_functions.fhss_resolution_divider;
379379
return time;
380380
}
@@ -657,7 +657,7 @@ int fhss_sync_with_beacon(fhss_structure_t *fhss_structure,
657657
fhss_structure->uc_channel_index -= (fhss_structure->number_of_channels - payload->number_of_broadcast_channels);
658658
}
659659

660-
fhss_structure->platform_functions.fhss_timer_stop(fhss_structure->fhss_api);
660+
fhss_structure->platform_functions.fhss_timer_stop(fhss_superframe_handler, fhss_structure->fhss_api);
661661
// start timer to elapse at approximately same time as the parent will.
662662
const int32_t time_to_next_superframe = payload->remaining_slots;
663663
remaining_time_own = fhss_get_remaining_time_to_next_superframe(fhss_structure);

source/Service_Libs/fhss/fhss_configuration_interface.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ fhss_api_t *ns_fhss_create(const fhss_configuration_t *fhss_configuration, const
5151
this->synch_state_set = &fhss_synch_state_set_cb;
5252
this->read_timestamp = &fhss_read_timestamp_cb;
5353
this->get_retry_period = &fhss_get_retry_period_cb;
54+
this->write_synch_info = &fhss_write_synch_info_cb;
5455
this->init_callbacks = &fhss_init_callbacks_cb;
5556
return this;
5657
}

source/Service_Libs/fhss/fhss_mac_interface.c

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ bool fhss_use_broadcast_queue_cb(const fhss_api_t *api, bool is_broadcast_addr,
5656
return is_broadcast_addr;
5757
}
5858

59-
int fhss_tx_handle_cb(const fhss_api_t *api, bool is_broadcast_addr, uint8_t *destination_address, int frame_type, uint8_t *synch_info, uint16_t frame_length, uint8_t phy_header_length, uint8_t phy_tail_length)
59+
int fhss_tx_handle_cb(const fhss_api_t *api, bool is_broadcast_addr, uint8_t *destination_address, int frame_type, uint16_t frame_length, uint8_t phy_header_length, uint8_t phy_tail_length)
6060
{
6161
fhss_structure_t *fhss_structure = fhss_get_object_with_api(api);
6262
if (!fhss_structure) {
@@ -71,12 +71,7 @@ int fhss_tx_handle_cb(const fhss_api_t *api, bool is_broadcast_addr, uint8_t *de
7171
}
7272
}
7373
}
74-
if (frame_type == FHSS_SYNCH_FRAME) {
75-
if (!synch_info) {
76-
return -4;
77-
}
78-
fhss_beacon_build(fhss_structure, synch_info);
79-
} else if (fhss_check_tx_allowed(fhss_structure, is_broadcast_addr, frame_length, frame_type, phy_header_length, phy_tail_length) == false) {
74+
if (fhss_check_tx_allowed(fhss_structure, is_broadcast_addr, frame_length, frame_type, phy_header_length, phy_tail_length) == false) {
8075
return -1;
8176
}
8277
// If sending Beacon request on parents Unicast channel
@@ -297,6 +292,25 @@ uint16_t fhss_get_retry_period_cb(const fhss_api_t *api, uint8_t *destination_ad
297292
return retry_period;
298293
}
299294

295+
int16_t fhss_write_synch_info_cb(const fhss_api_t *api, uint8_t *info_ptr, int info_type, int frame_type_id, uint32_t tx_time)
296+
{
297+
fhss_structure_t *fhss_structure = fhss_get_object_with_api(api);
298+
(void) frame_type_id;
299+
(void) tx_time;
300+
if (!fhss_structure) {
301+
return -1;
302+
}
303+
if (info_type == FHSS_PLAIN_SYNCH_INFO) {
304+
if (!info_ptr) {
305+
return -1;
306+
}
307+
fhss_beacon_build(fhss_structure, info_ptr);
308+
return FHSS_SYNCH_INFO_LENGTH;
309+
}
310+
return -1;
311+
}
312+
313+
300314
int fhss_init_callbacks_cb(const fhss_api_t *api, fhss_callback_t *callbacks)
301315
{
302316
fhss_structure_t *fhss_structure = fhss_get_object_with_api(api);

source/Service_Libs/fhss/fhss_mac_interface.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@
2020

2121
bool fhss_is_broadcast_channel_cb(const fhss_api_t *api);
2222
bool fhss_use_broadcast_queue_cb(const fhss_api_t *api, bool is_broadcast_addr, int frame_type);
23-
int fhss_tx_handle_cb(const fhss_api_t *api, bool is_broadcast_addr, uint8_t *destination_address, int frame_type, uint8_t *synch_info, uint16_t frame_length, uint8_t phy_header_length, uint8_t phy_tail_length);
23+
int fhss_tx_handle_cb(const fhss_api_t *api, bool is_broadcast_addr, uint8_t *destination_address, int frame_type, uint16_t frame_length, uint8_t phy_header_length, uint8_t phy_tail_length);
2424
bool fhss_check_tx_conditions_cb(const fhss_api_t *api, bool is_broadcast_addr, uint8_t handle, int frame_type, uint16_t frame_length, uint8_t phy_header_length, uint8_t phy_tail_length);
2525
void fhss_receive_frame_cb(const fhss_api_t *api, uint16_t pan_id, uint8_t *source_address, uint32_t timestamp, uint8_t *synch_info, int frame_type);
2626
void fhss_data_tx_done_cb(const fhss_api_t *api, bool waiting_ack, bool tx_completed, uint8_t handle);
2727
bool fhss_data_tx_fail_cb(const fhss_api_t *api, uint8_t handle, int frame_type);
2828
void fhss_synch_state_set_cb(const fhss_api_t *api, fhss_states fhss_state, uint16_t pan_id);
2929
uint32_t fhss_read_timestamp_cb(const fhss_api_t *api);
3030
uint16_t fhss_get_retry_period_cb(const fhss_api_t *api, uint8_t *destination_address, uint16_t phy_mtu);
31+
int16_t fhss_write_synch_info_cb(const fhss_api_t *api, uint8_t *info_ptr, int info_type, int frame_type_id, uint32_t tx_time);
3132
int fhss_init_callbacks_cb(const fhss_api_t *api, fhss_callback_t *callbacks);
3233

3334
#endif /* FHSS_MAC_INTERFACE_H_ */

test/nanostack/unittest/service_libs/fhss_config/test_fhss_config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ bool test_ns_fhss_create()
8383
if (fhss_mac_interface_stub.int8_value != 7) {
8484
return false;
8585
}
86-
api->tx_handle(api, true, NULL, FHSS_DATA_FRAME, NULL, 0, 0, 0);
86+
api->tx_handle(api, true, NULL, FHSS_DATA_FRAME, 0, 0, 0);
8787
if (fhss_mac_interface_stub.int8_value != 8) {
8888
return false;
8989
}

test/nanostack/unittest/service_libs/fhss_mac_interface/test_fhss_mac_interface.c

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,41 +80,36 @@ bool test_fhss_use_broadcast_queue_cb()
8080
bool test_fhss_tx_handle_cb()
8181
{
8282
fhss_api_t fhss_api;
83-
uint8_t synch_info[FHSS_SYNCH_INFO_LENGTH];
8483

8584
// By setting bool value false, fhss_struct can not be found
8685
fhss_stub.bool_value = false;
87-
if (fhss_tx_handle_cb(&fhss_api, true, NULL, FHSS_DATA_FRAME, NULL, 0, 0, 0) != -2) {
86+
if (fhss_tx_handle_cb(&fhss_api, true, NULL, FHSS_DATA_FRAME, 0, 0, 0) != -2) {
8887
return false;
8988
}
9089
// By setting bool value true, fhss_struct can be found
9190
fhss_stub.bool_value = true;
9291
// Broadcast data on unicast channel should return -3
9392
fhss_channel_stub.channel_bool_value = false;
94-
if (fhss_tx_handle_cb(&fhss_api, true, NULL, FHSS_DATA_FRAME, NULL, 0, 0, 0) != -3) {
95-
return false;
96-
}
97-
// Synch frame without synch info should return -4
98-
if (fhss_tx_handle_cb(&fhss_api, true, NULL, FHSS_SYNCH_FRAME, NULL, 0, 0, 0) != -4) {
93+
if (fhss_tx_handle_cb(&fhss_api, true, NULL, FHSS_DATA_FRAME, 0, 0, 0) != -3) {
9994
return false;
10095
}
10196
// Test sending of Beacon
102-
if (fhss_tx_handle_cb(&fhss_api, true, NULL, FHSS_SYNCH_FRAME, synch_info, 0, 0, 0) != 0) {
97+
if (fhss_tx_handle_cb(&fhss_api, true, NULL, FHSS_SYNCH_FRAME, 0, 0, 0) != 0) {
10398
return false;
10499
}
105100
// When TX is not allowed, should return -1 for data frame
106101
fhss_stub.tx_allowed_bool_value = false;
107-
if (fhss_tx_handle_cb(&fhss_api, false, NULL, FHSS_DATA_FRAME, synch_info, 0, 0, 0) != -1) {
102+
if (fhss_tx_handle_cb(&fhss_api, false, NULL, FHSS_DATA_FRAME, 0, 0, 0) != -1) {
108103
return false;
109104
}
110105
// When TX is allowed, should return 0 for data frame
111106
fhss_stub.tx_allowed_bool_value = true;
112-
if (fhss_tx_handle_cb(&fhss_api, false, NULL, FHSS_DATA_FRAME, synch_info, 0, 0, 0) != 0) {
107+
if (fhss_tx_handle_cb(&fhss_api, false, NULL, FHSS_DATA_FRAME, 0, 0, 0) != 0) {
113108
return false;
114109
}
115110
// Test changing to parent channel to send synch request
116111
fhss_stub.fhss_struct.fhss_state = FHSS_SYNCHRONIZED;
117-
if (fhss_tx_handle_cb(&fhss_api, false, NULL, FHSS_SYNCH_REQUEST_FRAME, synch_info, 0, 0, 0) != 0) {
112+
if (fhss_tx_handle_cb(&fhss_api, false, NULL, FHSS_SYNCH_REQUEST_FRAME, 0, 0, 0) != 0) {
118113
return false;
119114
}
120115
return true;

test/nanostack/unittest/stub/fhss_config_stub.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ fhss_api_t *ns_fhss_create(const fhss_configuration_t *fhss_configuration, const
3636
fhss_config_stub.fhss_api_ptr.synch_state_set = &fhss_synch_state_set_cb;
3737
fhss_config_stub.fhss_api_ptr.read_timestamp = &fhss_read_timestamp_cb;
3838
fhss_config_stub.fhss_api_ptr.get_retry_period = &fhss_get_retry_period_cb;
39+
fhss_config_stub.fhss_api_ptr.write_synch_info = &fhss_write_synch_info_cb;
3940
fhss_config_stub.fhss_api_ptr.init_callbacks = &fhss_init_callbacks_cb;
4041
return &fhss_config_stub.fhss_api_ptr;
4142
}

test/nanostack/unittest/stub/fhss_mac_interface_stub.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ bool fhss_use_broadcast_queue_cb(const fhss_api_t *api, bool is_broadcast_addr,
3333
return fhss_mac_interface_stub.queue_bool_value;
3434
}
3535

36-
int fhss_tx_handle_cb(const fhss_api_t *api, bool is_broadcast_addr, uint8_t *destination_address, int frame_type, uint8_t *synch_info, uint16_t frame_length, uint8_t phy_header_length, uint8_t phy_tail_length)
36+
int fhss_tx_handle_cb(const fhss_api_t *api, bool is_broadcast_addr, uint8_t *destination_address, int frame_type, uint16_t frame_length, uint8_t phy_header_length, uint8_t phy_tail_length)
3737
{
3838
fhss_mac_interface_stub.int8_value++;
3939
return fhss_mac_interface_stub.handle_value;
@@ -79,6 +79,12 @@ uint16_t fhss_get_retry_period_cb(const fhss_api_t *api, uint8_t *destination_ad
7979
{
8080
return 0;
8181
}
82+
83+
int16_t fhss_write_synch_info_cb(const fhss_api_t *api, uint8_t *info_ptr, int info_type, int frame_type_id, uint32_t tx_time)
84+
{
85+
return 0;
86+
}
87+
8288
int fhss_init_callbacks_cb(const fhss_api_t *api, fhss_callback_t *callbacks)
8389
{
8490

test/nanostack/unittest/stub/fhss_mac_interface_stub.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,15 @@ extern fhss_mac_interface_stub_def fhss_mac_interface_stub;
3434

3535
bool fhss_is_broadcast_channel_cb(const fhss_api_t *api);
3636
bool fhss_use_broadcast_queue_cb(const fhss_api_t *api, bool is_broadcast_addr, int frame_type);
37-
int fhss_tx_handle_cb(const fhss_api_t *api, bool is_broadcast_addr, uint8_t *destination_address, int frame_type, uint8_t *synch_info, uint16_t frame_length, uint8_t phy_header_length, uint8_t phy_tail_length);
37+
int fhss_tx_handle_cb(const fhss_api_t *api, bool is_broadcast_addr, uint8_t *destination_address, int frame_type, uint16_t frame_length, uint8_t phy_header_length, uint8_t phy_tail_length);
3838
bool fhss_check_tx_conditions_cb(const fhss_api_t *api, bool is_broadcast_addr, uint8_t handle, int frame_type, uint16_t frame_length, uint8_t phy_header_length, uint8_t phy_tail_length);
3939
void fhss_receive_frame_cb(const fhss_api_t *api, uint16_t pan_id, uint8_t *source_address, uint32_t timestamp, uint8_t *synch_info, int frame_type);
4040
void fhss_data_tx_done_cb(const fhss_api_t *api, bool waiting_ack, bool tx_completed, uint8_t handle);
4141
bool fhss_data_tx_fail_cb(const fhss_api_t *api, uint8_t handle, int frame_type);
4242
void fhss_synch_state_set_cb(const fhss_api_t *api, fhss_states fhss_state, uint16_t pan_id);
4343
uint32_t fhss_read_timestamp_cb(const fhss_api_t *api);
4444
uint16_t fhss_get_retry_period_cb(const fhss_api_t *api, uint8_t *destination_address, uint16_t phy_mtu);
45+
int16_t fhss_write_synch_info_cb(const fhss_api_t *api, uint8_t *info_ptr, int info_type, int frame_type_id, uint32_t tx_time);
4546
int fhss_init_callbacks_cb(const fhss_api_t *api, fhss_callback_t *callbacks);
4647

4748
#ifdef __cplusplus

0 commit comments

Comments
 (0)