@@ -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 */
@@ -152,6 +161,17 @@ typedef uint32_t fhss_read_timestamp(const fhss_api_t *api);
152161 */
153162typedef uint16_t fhss_get_retry_period (const fhss_api_t * api , uint8_t * destination_address , uint16_t phy_mtu );
154163
164+ /**
165+ * @brief Write synchronization info to given pointer.
166+ * @param api FHSS instance.
167+ * @param info_ptr Pointer to written data.
168+ * @param info_type Type of the written info (UTT-IE, BT-IE, US-IE, BS-IE).
169+ * @param frame_type_id Frame type of packet which will be written in info element.
170+ * @param tx_time TX time must be referenced to the first symbol following the SFD of the transmitted frame.
171+ * @return -1 on fail, write length otherwise.
172+ */
173+ 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 );
174+
155175/**
156176 * @brief Initialize MAC functions.
157177 * @param api FHSS instance.
@@ -177,6 +197,7 @@ struct fhss_api {
177197 fhss_synch_state_set * synch_state_set ; /**< Change synchronization state. */
178198 fhss_read_timestamp * read_timestamp ; /**< Read timestamp. */
179199 fhss_get_retry_period * get_retry_period ; /**< Get retransmission period. */
200+ fhss_write_synch_info * write_synch_info ; /**< Write synchronization info to TX frame*/
180201 fhss_init_callbacks * init_callbacks ; /**< Initialize MAC functions. */
181202};
182203
0 commit comments