diff --git a/include/openthread/platform/radio.h b/include/openthread/platform/radio.h index f1f3066b3..6f9d337fd 100644 --- a/include/openthread/platform/radio.h +++ b/include/openthread/platform/radio.h @@ -82,16 +82,25 @@ enum }; /** - * This enum represents radio capabilities. + * This type represents radio capabilities. + * + * The value is a bit-field indicating the capabilities supported by the radio. See `OT_RADIO_CAPS_*` definitions. * */ -typedef enum otRadioCaps { - OT_RADIO_CAPS_NONE = 0, ///< None - OT_RADIO_CAPS_ACK_TIMEOUT = 1, ///< Radio supports AckTime event - OT_RADIO_CAPS_ENERGY_SCAN = 2, ///< Radio supports Energy Scans - OT_RADIO_CAPS_TRANSMIT_RETRIES = 4, ///< Radio supports transmission retry logic with collision avoidance (CSMA). - OT_RADIO_CAPS_CSMA_BACKOFF = 8, ///< Radio supports CSMA backoff for frame transmission (but no retry). -} otRadioCaps; +typedef uint8_t otRadioCaps; + +/** + * This enumeration defines constants that are used to indicate different radio capabilities. See `otRadioCaps`. + * + */ +enum +{ + OT_RADIO_CAPS_NONE = 0, ///< Radio supports no capability. + OT_RADIO_CAPS_ACK_TIMEOUT = 1 << 0, ///< Radio supports AckTime event. + OT_RADIO_CAPS_ENERGY_SCAN = 1 << 1, ///< Radio supports Energy Scans. + OT_RADIO_CAPS_TRANSMIT_RETRIES = 1 << 2, ///< Radio supports tx retry logic with collision avoidance (CSMA). + OT_RADIO_CAPS_CSMA_BACKOFF = 1 << 3, ///< Radio supports CSMA backoff for frame transmission (but no retry). +}; #define OT_PANID_BROADCAST 0xffff ///< IEEE 802.15.4 Broadcast PAN ID