kw2xrf_intern.h File Reference

Internal function interfaces for kw2xrf driver. More...

Detailed Description

Internal function interfaces for kw2xrf driver.

Author
Johann Fischer j.fis.nosp@m.cher.nosp@m.@phyt.nosp@m.ec.d.nosp@m.e

Definition in file kw2xrf_intern.h.

#include <stdint.h>
#include "kw2xrf.h"
+ Include dependency graph for kw2xrf_intern.h:

Go to the source code of this file.

enum  kw2xrf_powermode_t { KW2XRF_HIBERNATE = 0, KW2XRF_DOZE, KW2XRF_IDLE, KW2XRF_AUTODOZE }
 Power Modes.
 
enum  kw2xrf_timer_timebase {
  KW2XRF_TIMEBASE_500000HZ = 2, KW2XRF_TIMEBASE_250000HZ, KW2XRF_TIMEBASE_125000HZ, KW2XRF_TIMEBASE_62500HZ,
  KW2XRF_TIMEBASE_31250HZ, KW2XRF_TIMEBASE_15625HZ
}
 Timebase values.
 
typedef enum kw2xrf_timer_timebase kw2xrf_timer_timebase_t
 Timebase values.
 
static void kw2xrf_set_dreg_bit (kw2xrf_t *dev, uint8_t reg, uint8_t bit)
 Set a certain bit of a kw2xrf register. More...
 
static void kw2xrf_clear_dreg_bit (kw2xrf_t *dev, uint8_t reg, uint8_t bit)
 Clear a certain bit of a kw2xrf register. More...
 
static void kw2xrf_enable_irq_b (kw2xrf_t *dev)
 Enable any transceiver interrupt to assert IRQ_B. More...
 
static void kw2xrf_mask_irq_b (kw2xrf_t *dev)
 Mask all transceiver interrupts to assert IRQ_B. More...
 
void kw2xrf_disable_interrupts (kw2xrf_t *dev)
 Disable all interrupts on transceiver. More...
 
void kw2xrf_update_overwrites (kw2xrf_t *dev)
 
void kw2xrf_set_out_clk (kw2xrf_t *dev)
 
void kw2xrf_set_power_mode (kw2xrf_t *dev, kw2xrf_powermode_t pm)
 Set power mode for device. More...
 
int kw2xrf_can_switch_to_idle (kw2xrf_t *dev)
 
void kw2xrf_timer_init (kw2xrf_t *dev, kw2xrf_timer_timebase_t tb)
 Initialize the Event Timer Block (up counter) More...
 
void kw2xrf_timer2_seq_start_on (kw2xrf_t *dev)
 Enable start sequence time. More...
 
void kw2xrf_timer2_seq_start_off (kw2xrf_t *dev)
 Disable start sequence timer. More...
 
void kw2xrf_timer3_seq_abort_on (kw2xrf_t *dev)
 Enable abort sequence timer. More...
 
void kw2xrf_timer3_seq_abort_off (kw2xrf_t *dev)
 Disable abort sequence timer. More...
 
void kw2xrf_trigger_tx_ops_enable (kw2xrf_t *dev, uint32_t timeout)
 Use T2CMP or T2PRIMECMP to Trigger Transceiver Operations. More...
 
void kw2xrf_trigger_tx_ops_disable (kw2xrf_t *dev)
 Disable Trigger for Transceiver Operations. More...
 
void kw2xrf_abort_rx_ops_enable (kw2xrf_t *dev, uint32_t timeout)
 Use T3CMP to Abort an RX operation. More...
 
void kw2xrf_abort_rx_ops_disable (kw2xrf_t *dev)
 Disable Trigger to Abort an RX operation. More...
 
void kw2xrf_seq_timeout_on (kw2xrf_t *dev, uint32_t timeout)
 Enable sequence timeout. More...
 
void kw2xrf_seq_timeout_off (kw2xrf_t *dev)
 Disable sequence timeout. More...
 
uint32_t kw2xrf_get_timestamp (kw2xrf_t *dev)
 Returns Timestamp of the actual received packet. More...
 

Function Documentation

◆ kw2xrf_abort_rx_ops_disable()

void kw2xrf_abort_rx_ops_disable ( kw2xrf_t dev)

Disable Trigger to Abort an RX operation.

Parameters
[in]devkw2xrf device descriptor

◆ kw2xrf_abort_rx_ops_enable()

void kw2xrf_abort_rx_ops_enable ( kw2xrf_t dev,
uint32_t  timeout 
)

Use T3CMP to Abort an RX operation.

Parameters
[in]devkw2xrf device descriptor
[in]timeouttimeout value

◆ kw2xrf_can_switch_to_idle()

int kw2xrf_can_switch_to_idle ( kw2xrf_t dev)
Parameters
[in]dev
Returns

◆ kw2xrf_clear_dreg_bit()

static void kw2xrf_clear_dreg_bit ( kw2xrf_t dev,
uint8_t  reg,
uint8_t  bit 
)
inlinestatic

Clear a certain bit of a kw2xrf register.

Parameters
[in]devkw2xrf device descriptor
[in]regaddress of register
[in]bitset this bit

Definition at line 60 of file kw2xrf_intern.h.

◆ kw2xrf_disable_interrupts()

void kw2xrf_disable_interrupts ( kw2xrf_t dev)

Disable all interrupts on transceiver.

Parameters
[in]devkw2xrf device descriptor

◆ kw2xrf_enable_irq_b()

static void kw2xrf_enable_irq_b ( kw2xrf_t dev)
inlinestatic

Enable any transceiver interrupt to assert IRQ_B.

Parameters
[in]devkw2xrf device descriptor

Definition at line 72 of file kw2xrf_intern.h.

◆ kw2xrf_get_timestamp()

uint32_t kw2xrf_get_timestamp ( kw2xrf_t dev)

Returns Timestamp of the actual received packet.

Parameters
[in]devkw2xrf device descriptor
Returns
timestamp value

◆ kw2xrf_mask_irq_b()

static void kw2xrf_mask_irq_b ( kw2xrf_t dev)
inlinestatic

Mask all transceiver interrupts to assert IRQ_B.

Parameters
[in]devkw2xrf device descriptor

Definition at line 82 of file kw2xrf_intern.h.

◆ kw2xrf_seq_timeout_off()

void kw2xrf_seq_timeout_off ( kw2xrf_t dev)

Disable sequence timeout.

Parameters
[in]devkw2xrf device descriptor

◆ kw2xrf_seq_timeout_on()

void kw2xrf_seq_timeout_on ( kw2xrf_t dev,
uint32_t  timeout 
)

Enable sequence timeout.

Parameters
[in]devkw2xrf device descriptor
[in]timeouttimeout value

◆ kw2xrf_set_dreg_bit()

static void kw2xrf_set_dreg_bit ( kw2xrf_t dev,
uint8_t  reg,
uint8_t  bit 
)
inlinestatic

Set a certain bit of a kw2xrf register.

Parameters
[in]devkw2xrf device descriptor
[in]regaddress of register
[in]bitset this bit

Definition at line 46 of file kw2xrf_intern.h.

◆ kw2xrf_set_out_clk()

void kw2xrf_set_out_clk ( kw2xrf_t dev)
Parameters
[in]devkw2xrf device descriptor

◆ kw2xrf_set_power_mode()

void kw2xrf_set_power_mode ( kw2xrf_t dev,
kw2xrf_powermode_t  pm 
)

Set power mode for device.

Parameters
[in]devkw2xrf device descriptor
[in]pmpower mode value

◆ kw2xrf_timer2_seq_start_off()

void kw2xrf_timer2_seq_start_off ( kw2xrf_t dev)

Disable start sequence timer.

Parameters
[in]devkw2xrf device descriptor

◆ kw2xrf_timer2_seq_start_on()

void kw2xrf_timer2_seq_start_on ( kw2xrf_t dev)

Enable start sequence time.

Parameters
[in]devkw2xrf device descriptor

◆ kw2xrf_timer3_seq_abort_off()

void kw2xrf_timer3_seq_abort_off ( kw2xrf_t dev)

Disable abort sequence timer.

Parameters
[in]devkw2xrf device descriptor

◆ kw2xrf_timer3_seq_abort_on()

void kw2xrf_timer3_seq_abort_on ( kw2xrf_t dev)

Enable abort sequence timer.

Parameters
[in]devkw2xrf device descriptor

◆ kw2xrf_timer_init()

void kw2xrf_timer_init ( kw2xrf_t dev,
kw2xrf_timer_timebase_t  tb 
)

Initialize the Event Timer Block (up counter)

The Event Timer Block provides:

  • Abort an RX and CCA sequence at pre-determined time
  • Latches "timestamp" value during packet reception
  • Initiates timer-triggered sequences
Parameters
[in]devkw2xrf device descriptor
[in]tbtimer base value

◆ kw2xrf_trigger_tx_ops_disable()

void kw2xrf_trigger_tx_ops_disable ( kw2xrf_t dev)

Disable Trigger for Transceiver Operations.

Parameters
[in]devkw2xrf device descriptor

◆ kw2xrf_trigger_tx_ops_enable()

void kw2xrf_trigger_tx_ops_enable ( kw2xrf_t dev,
uint32_t  timeout 
)

Use T2CMP or T2PRIMECMP to Trigger Transceiver Operations.

Parameters
[in]devkw2xrf device descriptor
[in]timeouttimeout value

◆ kw2xrf_update_overwrites()

void kw2xrf_update_overwrites ( kw2xrf_t dev)
Parameters
[in]devkw2xrf device descriptor