Skip to content
Permalink
Browse files

drivers: ieee802154: New API for ACK configuration

Introduce new API function for ieee802154 driver configuration.
Currently this function is used for ACK configuration.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
  • Loading branch information...
rlubos authored and jukkar committed Apr 15, 2019
1 parent 2e0095a commit c5b0a996401f3dd988cd771d868397f63412580b
Showing with 41 additions and 0 deletions.
  1. +41 −0 include/net/ieee802154_radio.h
@@ -54,6 +54,42 @@ struct ieee802154_filter {
/* @endcond */
};

/** IEEE802.15.4 driver configuration types. */
enum ieee802154_config_type {
/** Indicates how radio driver should set Frame Pending bit in ACK
* responses for Data Requests. If enabled, radio driver should
* determine whether to set the bit or not based on the information
* provided with ``IEEE802154_CONFIG_ACK_FPB`` config. Otherwise,
* Frame Pending bit should be set to ``1``(see IEEE Std 802.15.4-2006,
* 7.2.2.3.1).
*/
IEEE802154_CONFIG_AUTO_ACK_FPB,

/** Indicates whether to set ACK Frame Pending bit for specific address
* or not. Disabling the Frame Pending bit with no address provided
* (NULL pointer) should disable it for all enabled addresses.
*/
IEEE802154_CONFIG_ACK_FPB,
};

/** IEEE802.15.4 driver configuration data. */
struct ieee802154_config {
/** Configuration data. */
union {
/** ``IEEE802154_CONFIG_AUTO_ACK_FPB`` */
struct {
bool enabled;
} auto_ack_fpb;

/** ``IEEE802154_CONFIG_ACK_FPB`` */
struct {
u8_t *addr;
bool extended;
bool enabled;
} ack_fpb;
};
};

/**
* @brief IEEE 802.15.4 radio interface API.
*
@@ -96,6 +132,11 @@ struct ieee802154_radio_api {
/** Stop the device */
int (*stop)(struct device *dev);

/** Set specific radio driver configuration. */
int (*configure)(struct device *dev,
enum ieee802154_config_type type,
const struct ieee802154_config *config);

#ifdef CONFIG_NET_L2_IEEE802154_SUB_GHZ
/** Get the available amount of Sub-GHz channels */
u16_t (*get_subg_channel_count)(struct device *dev);

0 comments on commit c5b0a99

Please sign in to comment.
You can’t perform that action at this time.