mrf24j40_internal.h File Reference

Internal interfaces for MRF24J40 drivers. More...

Detailed Description

Internal interfaces for MRF24J40 drivers.

Author
Neo Nenaco neo@n.nosp@m.enac.nosp@m.o.de
Koen Zandberg koen@.nosp@m.berg.nosp@m.zand..nosp@m.net

Definition in file mrf24j40_internal.h.

#include <stdint.h>
#include "mrf24j40.h"
#include "kernel_defines.h"
+ Include dependency graph for mrf24j40_internal.h:

Go to the source code of this file.

int mrf24j40_init (mrf24j40_t *dev)
 initialization as described in datasheet More...
 
uint8_t mrf24j40_reg_read_short (mrf24j40_t *dev, const uint8_t addr)
 Read from a register with a at address addr from device dev. More...
 
void mrf24j40_reg_write_short (mrf24j40_t *dev, const uint8_t addr, const uint8_t value)
 Write to a register at address addr from device dev. More...
 
uint8_t mrf24j40_reg_read_long (mrf24j40_t *dev, const uint16_t addr)
 Read from a register with a at address addr from device dev. More...
 
void mrf24j40_reg_write_long (mrf24j40_t *dev, const uint16_t addr, const uint8_t value)
 Write to a register at address addr from device dev. More...
 
void mrf24j40_tx_normal_fifo_write (mrf24j40_t *dev, const uint16_t offset, const uint8_t *data, const size_t len)
 Write a chunk of data into the TX Normal FIFO area of the given device. More...
 
void mrf24j40_rx_fifo_read (mrf24j40_t *dev, const uint16_t offset, uint8_t *data, const size_t len)
 Read a chunk of data from the RX_FIFO area of the given device. More...
 
void mrf24j40_reset_tasks (mrf24j40_t *dev)
 Reset the pending task list of a device. More...
 
void mrf24j40_update_tasks (mrf24j40_t *dev)
 Check for pending interrupts and update task list. More...
 
void mrf24j40_hardware_reset (mrf24j40_t *dev)
 Trigger a hardware reset. More...
 
static void mrf24j40_enable_auto_pa_lna (mrf24j40_t *dev)
 Enable automatic External Power Amplifier & Low Noise Amplifier control. More...
 
static void mrf24j40_disable_auto_pa_lna (mrf24j40_t *dev)
 Disable automatic External Power Amplifier & Low Noise Amplifier control. More...
 
static void mrf24j40_enable_lna (mrf24j40_t *dev)
 Enable only the External Low Noise Amplifier. More...
 

Function Documentation

◆ mrf24j40_disable_auto_pa_lna()

static void mrf24j40_disable_auto_pa_lna ( mrf24j40_t dev)
inlinestatic

Disable automatic External Power Amplifier & Low Noise Amplifier control.

Parameters
[in]devdevice to disable the PA & LNA on

Definition at line 141 of file mrf24j40_internal.h.

◆ mrf24j40_enable_auto_pa_lna()

static void mrf24j40_enable_auto_pa_lna ( mrf24j40_t dev)
inlinestatic

Enable automatic External Power Amplifier & Low Noise Amplifier control.

Parameters
[in]devdevice to enable the PA & LNA on

Definition at line 130 of file mrf24j40_internal.h.

◆ mrf24j40_enable_lna()

static void mrf24j40_enable_lna ( mrf24j40_t dev)
inlinestatic

Enable only the External Low Noise Amplifier.

Parameters
[in]devdevice enable the LNA on

Definition at line 152 of file mrf24j40_internal.h.

◆ mrf24j40_hardware_reset()

void mrf24j40_hardware_reset ( mrf24j40_t dev)

Trigger a hardware reset.

Parameters
[in]devdevice to reset

◆ mrf24j40_init()

int mrf24j40_init ( mrf24j40_t dev)

initialization as described in datasheet

Parameters
[in]devdevice to initialize
Returns
0 on success, error otherwise

◆ mrf24j40_reg_read_long()

uint8_t mrf24j40_reg_read_long ( mrf24j40_t dev,
const uint16_t  addr 
)

Read from a register with a at address addr from device dev.

Register with 10bit address

Parameters
[in]devdevice to read from
[in]addraddress of the register to read
Returns
the value of the specified register

◆ mrf24j40_reg_read_short()

uint8_t mrf24j40_reg_read_short ( mrf24j40_t dev,
const uint8_t  addr 
)

Read from a register with a at address addr from device dev.

Register with 8bit address

Parameters
[in]devdevice to read from
[in]addraddress of the register to read
Returns
the value of the specified register

◆ mrf24j40_reg_write_long()

void mrf24j40_reg_write_long ( mrf24j40_t dev,
const uint16_t  addr,
const uint8_t  value 
)

Write to a register at address addr from device dev.

Register with 10bit address

Parameters
[in]devdevice to write to
[in]addraddress of the register to write
[in]valuevalue to write to the given register

◆ mrf24j40_reg_write_short()

void mrf24j40_reg_write_short ( mrf24j40_t dev,
const uint8_t  addr,
const uint8_t  value 
)

Write to a register at address addr from device dev.

Register with 8bit address

Parameters
[in]devdevice to write to
[in]addraddress of the register to write
[in]valuevalue to write to the given register

◆ mrf24j40_reset_tasks()

void mrf24j40_reset_tasks ( mrf24j40_t dev)

Reset the pending task list of a device.

Parameters
[in]devdevice to reset tasks of

◆ mrf24j40_rx_fifo_read()

void mrf24j40_rx_fifo_read ( mrf24j40_t dev,
const uint16_t  offset,
uint8_t *  data,
const size_t  len 
)

Read a chunk of data from the RX_FIFO area of the given device.

Parameters
[in]devdevice to read from
[in]offsetstarting address to read from [valid 0x00-0x1ff]
[out]databuffer to read data into
[in]lennumber of bytes to read from FIFO

◆ mrf24j40_tx_normal_fifo_write()

void mrf24j40_tx_normal_fifo_write ( mrf24j40_t dev,
const uint16_t  offset,
const uint8_t *  data,
const size_t  len 
)

Write a chunk of data into the TX Normal FIFO area of the given device.

Parameters
[in]devdevice to write to
[in]offsetaddress in the TX Normal FIFO to write to [valid 0x00-0x1ff]
[in]datadata to copy into FIFO
[in]lennumber of bytes to write to FIFO

◆ mrf24j40_update_tasks()

void mrf24j40_update_tasks ( mrf24j40_t dev)

Check for pending interrupts and update task list.

Parameters
[in]devdevice to read