Internal function interfaces for kw41zrf driver. More...
Internal function interfaces for kw41zrf driver.
Definition in file kw41zrf_intern.h.
Go to the source code of this file.
#define | KW41ZRF_PM_BLOCKER KINETIS_PM_VLPS |
#define | KW41ZRF_ENABLE_LEDS (0) |
#define | KW41ZRF_LED_NDSM_ON |
#define | KW41ZRF_LED_NDSM_OFF |
#define | KW41ZRF_LED_TX_ON |
#define | KW41ZRF_LED_TX_OFF |
#define | KW41ZRF_LED_RX_ON |
#define | KW41ZRF_LED_RX_OFF |
#define | KW41ZRF_LED_IRQ_ON |
#define | KW41ZRF_LED_IRQ_OFF |
enum | kw41zrf_powermode_t { KW41ZRF_POWER_IDLE = 0, KW41ZRF_POWER_DSM } |
KW41Z transceiver power modes. More... | |
enum | kw41zrf_timer_timebase { KW41ZRF_TIMEBASE_500000HZ = 0b010, KW41ZRF_TIMEBASE_250000HZ = 0b011, KW41ZRF_TIMEBASE_125000HZ = 0b100, KW41ZRF_TIMEBASE_62500HZ = 0b101, KW41ZRF_TIMEBASE_31250HZ = 0b110, KW41ZRF_TIMEBASE_15625HZ = 0b111 } |
Timebase settings. | |
typedef enum kw41zrf_timer_timebase | kw41zrf_timer_timebase_t |
Timebase settings. | |
static void | kw41zrf_mask_irqs (void) |
Mask all transceiver interrupts. | |
static void | kw41zrf_unmask_irqs (void) |
Unmask all transceiver interrupts. | |
void | kw41zrf_set_irq_callback (void(*cb)(void *arg), void *arg) |
Set the callback function for the radio ISR. More... | |
void | kw41zrf_set_power_mode (kw41zrf_t *dev, kw41zrf_powermode_t pm) |
Set power mode for device. More... | |
int | kw41zrf_can_switch_to_idle (kw41zrf_t *dev) |
Determine if the transceiver is busy doing TX or RX. More... | |
void | kw41zrf_set_sequence (kw41zrf_t *dev, uint32_t seq) |
Set sequence state of device. More... | |
static void | kw41zrf_abort_sequence (kw41zrf_t *dev) |
Abort the current autosequence. More... | |
static uint32_t | kw41zrf_is_dsm (void) |
Check if the radio is in deep sleep mode. More... | |
static void | kw41zrf_timer_load (kw41zrf_t *dev, uint32_t value) |
Set event timer counter value. More... | |
static uint32_t | kw41zrf_timer_get (kw41zrf_t *dev) |
Get current event timer counter value. More... | |
static void | kw41zrf_timer_set (kw41zrf_t *dev, volatile uint32_t *cmp_reg, uint32_t timeout) |
Set a timeout value for the given compare register of the Event Timer. More... | |
static void | kw41zrf_timer_init (kw41zrf_t *dev, kw41zrf_timer_timebase_t tb) |
Initialize the Event Timer Block (up counter) More... | |
static uint32_t | kw41zrf_get_timestamp (kw41zrf_t *dev) |
Returns timestamp of the beginning of the most recently received packet. More... | |
enum kw41zrf_powermode_t |
KW41Z transceiver power modes.
Enumerator | |
---|---|
KW41ZRF_POWER_IDLE | All parts powered. |
KW41ZRF_POWER_DSM | Deep sleep mode. |
Definition at line 100 of file kw41zrf_intern.h.
|
inlinestatic |
Abort the current autosequence.
[in] | dev | kw41zrf device descriptor |
Definition at line 176 of file kw41zrf_intern.h.
int kw41zrf_can_switch_to_idle | ( | kw41zrf_t * | dev | ) |
Determine if the transceiver is busy doing TX or RX.
[in] | dev | kw41zrf device descriptor |
|
inlinestatic |
Returns timestamp of the beginning of the most recently received packet.
The latched timestamp corresponds to the point where the SFD detection was triggered for the most recent packet, i.e. right before the first byte of the packet.
[in] | dev | kw41zrf device descriptor |
Definition at line 272 of file kw41zrf_intern.h.
|
inlinestatic |
Check if the radio is in deep sleep mode.
Definition at line 199 of file kw41zrf_intern.h.
void kw41zrf_set_irq_callback | ( | void(*)(void *arg) | cb, |
void * | arg | ||
) |
Set the callback function for the radio ISR.
This callback will be called from ISR context when a radio_1 interrupt occurs
[in] | cb | Pointer to callback function |
[in] | arg | Argument that will be passed to the callback |
void kw41zrf_set_power_mode | ( | kw41zrf_t * | dev, |
kw41zrf_powermode_t | pm | ||
) |
Set power mode for device.
[in] | dev | kw41zrf device descriptor |
[in] | pm | power mode value |
void kw41zrf_set_sequence | ( | kw41zrf_t * | dev, |
uint32_t | seq | ||
) |
Set sequence state of device.
[in] | dev | kw41zrf device descriptor |
[in] | seq | sequence |
|
inlinestatic |
Get current event timer counter value.
[in] | dev | kw41zrf device descriptor |
Definition at line 223 of file kw41zrf_intern.h.
|
inlinestatic |
Initialize the Event Timer Block (up counter)
The Event Timer Block provides:
[in] | dev | kw41zrf device descriptor |
[in] | tb | timer base value |
Definition at line 254 of file kw41zrf_intern.h.
|
inlinestatic |
Set event timer counter value.
[in] | dev | kw41zrf device descriptor |
[in] | value | new time |
Definition at line 210 of file kw41zrf_intern.h.
|
inlinestatic |
Set a timeout value for the given compare register of the Event Timer.
[in] | dev | kw41zrf device descriptor |
[out] | cmp_reg | pointer to timer compare register, &ZLL->TxCMP |
[in] | timeout | timer offset from current time |
Definition at line 236 of file kw41zrf_intern.h.