@@ -38,6 +38,15 @@ typedef struct fhss_callback fhss_callback_t;
38
38
#define FHSS_SYNCH_REQUEST_FRAME 1 /**< FHSS synchronization request frame */
39
39
#define FHSS_DATA_FRAME 2 /**< FHSS data frame */
40
40
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
+
41
50
/**
42
51
* @brief FHSS synchronization info length.
43
52
*/
@@ -152,6 +161,17 @@ typedef uint32_t fhss_read_timestamp(const fhss_api_t *api);
152
161
*/
153
162
typedef uint16_t fhss_get_retry_period (const fhss_api_t * api , uint8_t * destination_address , uint16_t phy_mtu );
154
163
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
+
155
175
/**
156
176
* @brief Initialize MAC functions.
157
177
* @param api FHSS instance.
@@ -177,6 +197,7 @@ struct fhss_api {
177
197
fhss_synch_state_set * synch_state_set ; /**< Change synchronization state. */
178
198
fhss_read_timestamp * read_timestamp ; /**< Read timestamp. */
179
199
fhss_get_retry_period * get_retry_period ; /**< Get retransmission period. */
200
+ fhss_write_synch_info * write_synch_info ; /**< Write synchronization info to TX frame*/
180
201
fhss_init_callbacks * init_callbacks ; /**< Initialize MAC functions. */
181
202
};
182
203
0 commit comments