get/set interfaces for kw41zrf driver More...
get/set interfaces for kw41zrf driver
Definition in file kw41zrf_getset.h.
Include dependency graph for kw41zrf_getset.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Enumerations | |
| enum | kw41zrf_xcvseq { XCVSEQ_IDLE = 0b000 , XCVSEQ_RECEIVE = 0b001 , XCVSEQ_TRANSMIT = 0b010 , XCVSEQ_CCA = 0b011 , XCVSEQ_TX_RX = 0b100 , XCVSEQ_CONTINUOUS_CCA = 0b101 , XCVSEQ_DSM_IDLE = 0b1000 } |
| Transceiver sequence identifiers. More... | |
Functions | |
| void | kw41zrf_set_tx_power (kw41zrf_t *dev, int16_t txpower) |
| Set tx power of given device. | |
| int16_t | kw41zrf_get_tx_power (kw41zrf_t *dev) |
| Get tx power value of given device. | |
| int | kw41zrf_set_channel (kw41zrf_t *dev, uint8_t val) |
| Set channel of given device. | |
| uint8_t | kw41zrf_get_channel (kw41zrf_t *dev) |
| Get channel of given device. | |
| void | kw41zrf_set_pan (kw41zrf_t *dev, uint16_t pan) |
| Set PAN ID of a given device. | |
| void | kw41zrf_set_pan_coord (bool is_coord) |
| Set if the kw41zrf device is a coordinator. | |
| uint16_t | kw41zrf_get_pan (kw41zrf_t *dev) |
| Get PAN ID of given device. | |
| void | kw41zrf_set_addr_short (kw41zrf_t *dev, const network_uint16_t *addr) |
| Set short address of a given device. | |
| void | kw41zrf_set_addr_long (kw41zrf_t *dev, const eui64_t *addr) |
| Set long address of a given device. | |
| void | kw41zrf_get_addr_short (kw41zrf_t *dev, network_uint16_t *addr) |
| Get short address of a given device. | |
| void | kw41zrf_get_addr_long (kw41zrf_t *dev, eui64_t *addr) |
| Get long address of a given device. | |
| int8_t | kw41zrf_get_cca_threshold (kw41zrf_t *dev) |
| Get CCA threshold of a given device. | |
| void | kw41zrf_set_cca_threshold (kw41zrf_t *dev, int8_t value) |
| Set CCA threshold of a given device. | |
| void | kw41zrf_set_cca_type (kw41zrf_t *dev, uint8_t type) |
| Set CCA type of a kw41zrf device. | |
| uint8_t | kw41zrf_get_cca_type (kw41zrf_t *dev) |
| Get CCA type of a kw41zrf device. | |
| void | kw41zrf_set_cca3_mode (uint8_t mode) |
| Set CCA3 mode of a kw41zrf device. | |
| int8_t | kw41zrf_get_ed_level (kw41zrf_t *dev) |
| Get latest ED measurement from the device. | |
| int | kw41zrf_cca (kw41zrf_t *dev) |
| Perform one CCA measurement and return the result. | |
| void | kw41zrf_set_rx_watermark (kw41zrf_t *dev, uint8_t value) |
| Set receive watermark to signal when the packet buffer is part full. | |
| void | kw41zrf_set_option (kw41zrf_t *dev, uint8_t option, uint8_t state) |
| Set netopt a given device. | |
| uint8_t | kw41zrf_get_1st_free_idx_sap0 (void) |
| Get the first free index of the Source Address Present partition_0. | |
| void | kw41zrf_set_partition_enable (uint8_t en, uint8_t partition_shift) |
| Enable or disable a partition. | |
| uint8_t | kw41zrf_get_partition_enable (uint32_t partition_mask, uint8_t partition_shift) |
| Get partition enable status. | |
| uint8_t | kw41zrf_get_partition_start (uint32_t partition_mask, uint8_t partition_shift) |
| Get partition start value. | |
| uint8_t | kw41zrf_get_lqi_value (kw41zrf_t *dev) |
| Get Link Quality Indicator(LQI) value. | |
| int8_t | kw41zrf_get_rssi_value (kw41zrf_t *dev) |
| Get Received Signal Strength Indicator(RSSI) value. | |
Internal device option flags | |
| #define | KW41ZRF_OPT_CCA_BEFORE_TX (0x01u) |
| Cca before TX. | |
| #define | KW41ZRF_OPT_PROMISCUOUS (0x02u) |
| Promiscuous mode. | |
| #define | KW41ZRF_OPT_PRELOADING (0x04u) |
| Preloading. | |
| #define | KW41ZRF_OPT_AUTOACK (0x80u) |
| Automatic transmission of ACKs. | |
| #define | KW41ZRF_OPT_ACK_PENDING (0x81u) |
| Pending bit on auto ACKs. | |
| #define KW41ZRF_OPT_ACK_PENDING (0x81u) |
Pending bit on auto ACKs.
Definition at line 34 of file kw41zrf_getset.h.
| #define KW41ZRF_OPT_AUTOACK (0x80u) |
Automatic transmission of ACKs.
Definition at line 33 of file kw41zrf_getset.h.
| #define KW41ZRF_OPT_CCA_BEFORE_TX (0x01u) |
Cca before TX.
Definition at line 30 of file kw41zrf_getset.h.
| #define KW41ZRF_OPT_PRELOADING (0x04u) |
Preloading.
Definition at line 32 of file kw41zrf_getset.h.
| #define KW41ZRF_OPT_PROMISCUOUS (0x02u) |
Promiscuous mode.
Definition at line 31 of file kw41zrf_getset.h.
| enum kw41zrf_xcvseq |
Transceiver sequence identifiers.
Definition at line 38 of file kw41zrf_getset.h.
| int kw41zrf_cca | ( | kw41zrf_t * | dev | ) |
Perform one CCA measurement and return the result.
| [in] | dev | kw41zrf device descriptor |
| 0 | if channel is idle |
| 1 | if channel is busy |
| uint8_t kw41zrf_get_1st_free_idx_sap0 | ( | void | ) |
Get the first free index of the Source Address Present partition_0.
Get long address of a given device.
| [in] | dev | kw41zrf device descriptor |
| [out] | addr | current long address |
| void kw41zrf_get_addr_short | ( | kw41zrf_t * | dev, |
| network_uint16_t * | addr ) |
Get short address of a given device.
| [in] | dev | kw41zrf device descriptor |
| [out] | addr | current short address |
| int8_t kw41zrf_get_cca_threshold | ( | kw41zrf_t * | dev | ) |
Get CCA threshold of a given device.
| [in] | dev | kw41zrf device descriptor |
| uint8_t kw41zrf_get_cca_type | ( | kw41zrf_t * | dev | ) |
Get CCA type of a kw41zrf device.
| [in] | dev | kw41zrf device descriptor |
| uint8_t kw41zrf_get_channel | ( | kw41zrf_t * | dev | ) |
Get channel of given device.
| [in] | dev | kw41zrf device descriptor |
| int8_t kw41zrf_get_ed_level | ( | kw41zrf_t * | dev | ) |
Get latest ED measurement from the device.
| [in] | dev | kw41zrf device descriptor |
|
inline |
Get Link Quality Indicator(LQI) value.
| [in] | dev | kw41zrf device descriptor |
Definition at line 259 of file kw41zrf_getset.h.
| uint16_t kw41zrf_get_pan | ( | kw41zrf_t * | dev | ) |
Get PAN ID of given device.
| [in] | dev | kw41zrf device descriptor |
| uint8_t kw41zrf_get_partition_enable | ( | uint32_t | partition_mask, |
| uint8_t | partition_shift ) |
Get partition enable status.
| [in] | partition_mask | Mask for the partition bits |
| [in] | partition_shift | Bit position for the partition |
| uint8_t kw41zrf_get_partition_start | ( | uint32_t | partition_mask, |
| uint8_t | partition_shift ) |
Get partition start value.
| [in] | partition_mask | Mask for the partition bits |
| [in] | partition_shift | Bit position for the partition |
|
inline |
Get Received Signal Strength Indicator(RSSI) value.
| [in] | dev | kw41zrf device descriptor |
Definition at line 273 of file kw41zrf_getset.h.
| int16_t kw41zrf_get_tx_power | ( | kw41zrf_t * | dev | ) |
Get tx power value of given device.
| [in] | dev | kw41zrf device descriptor |
Set long address of a given device.
| [in] | dev | kw41zrf device descriptor |
| [in] | addr | long address |
| void kw41zrf_set_addr_short | ( | kw41zrf_t * | dev, |
| const network_uint16_t * | addr ) |
Set short address of a given device.
| [in] | dev | kw41zrf device descriptor |
| [in] | addr | short address |
| void kw41zrf_set_cca3_mode | ( | uint8_t | mode | ) |
Set CCA3 mode of a kw41zrf device.
| [in] | mode | CCA3 Mode 0: energy detection AND carrier sensing 1: energy detection OR carrier sensing |
| void kw41zrf_set_cca_threshold | ( | kw41zrf_t * | dev, |
| int8_t | value ) |
Set CCA threshold of a given device.
| [in] | dev | kw41zrf device descriptor |
| [in] | value | CCA threshold |
| void kw41zrf_set_cca_type | ( | kw41zrf_t * | dev, |
| uint8_t | type ) |
Set CCA type of a kw41zrf device.
| [in] | dev | kw41zrf device descriptor |
| [in] | type | CCA type |
| int kw41zrf_set_channel | ( | kw41zrf_t * | dev, |
| uint8_t | val ) |
Set channel of given device.
| [in] | dev | kw41zrf device descriptor |
| [in] | val | channel |
| void kw41zrf_set_option | ( | kw41zrf_t * | dev, |
| uint8_t | option, | ||
| uint8_t | state ) |
Set netopt a given device.
| [in] | dev | kw41zrf device descriptor |
| [in] | option | Netopt option type |
| [in] | state | state |
| void kw41zrf_set_pan | ( | kw41zrf_t * | dev, |
| uint16_t | pan ) |
Set PAN ID of a given device.
| [in] | dev | kw41zrf device descriptor |
| [in] | pan | PAN ID value |
| void kw41zrf_set_pan_coord | ( | bool | is_coord | ) |
Set if the kw41zrf device is a coordinator.
| [in] | is_coord | is device a coordinator |
| void kw41zrf_set_partition_enable | ( | uint8_t | en, |
| uint8_t | partition_shift ) |
Enable or disable a partition.
| [in] | en | Enable (1) or disable (0) |
| [in] | partition_shift | Bit position for the partition |
| void kw41zrf_set_rx_watermark | ( | kw41zrf_t * | dev, |
| uint8_t | value ) |
Set receive watermark to signal when the packet buffer is part full.
| [in] | dev | kw41zrf device descriptor |
| [in] | value | watermark |
| void kw41zrf_set_tx_power | ( | kw41zrf_t * | dev, |
| int16_t | txpower ) |
Set tx power of given device.
| [in] | dev | kw41zrf device descriptor |
| [in] | txpower | transmit power in dBm |