From 7623a9820a7ddf31e82fee9a9e05ca56f8f1870f Mon Sep 17 00:00:00 2001 From: Francisco Molina Date: Wed, 30 Sep 2020 11:16:16 +0200 Subject: [PATCH] sys/net/ieee802154/radio.h: add TX_START --- sys/include/net/ieee802154/radio.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/sys/include/net/ieee802154/radio.h b/sys/include/net/ieee802154/radio.h index 9b1dfa57ea..dd3aec68ff 100644 --- a/sys/include/net/ieee802154/radio.h +++ b/sys/include/net/ieee802154/radio.h @@ -100,6 +100,10 @@ typedef enum { * @brief the device reports the start of a frame (SFD) when received. */ IEEE802154_CAP_IRQ_RX_START, + /** + * @brief the device reports the start of a frame (SFD) was sent. + */ + IEEE802154_CAP_IRQ_TX_START, /** * @brief the device reports the end of the CCA procedure */ @@ -186,6 +190,15 @@ typedef enum { */ IEEE802154_RADIO_INDICATION_RX_START, + /** + * @brief the transceiver sent out a valid SFD + * + * This event is present if radio has @ref IEEE802154_CAP_IRQ_TX_START cap. + * + * @note The SFD of an outgoing ACK (AUTOACK) should not be indicated + */ + IEEE802154_RADIO_INDICATION_TX_START, + /** * @brief the transceiver received a frame and lies in the * internal framebuffer. @@ -1073,6 +1086,22 @@ static inline bool ieee802154_radio_has_irq_rx_start(ieee802154_dev_t *dev) return dev->driver->get_cap(dev, IEEE802154_CAP_IRQ_RX_START); } +/** + * @brief Check if the device supports TX start interrupt + * + * Internally this function calls ieee802154_radio_ops::get_cap with @ref + * IEEE802154_CAP_IRQ_TX_START. + * + * @param[in] dev IEEE802.15.4 device descriptor + * + * @return true if the device has support + * @return false otherwise + */ +static inline bool ieee802154_radio_has_irq_tx_start(ieee802154_dev_t *dev) +{ + return dev->driver->get_cap(dev, IEEE802154_CAP_IRQ_TX_START); +} + /** * @brief Check if the device supports CCA done interrupt *