mrf24j40_internal.h File Reference

Internal interfaces for MRF24J40 drivers. More...

Detailed Description

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

Go to the source code of this file.

Functions

void mrf24j40_init (mrf24j40_t *dev)
 initialization as decribed in datasheet
 
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_read (mrf24j40_t *dev, const uint16_t offset, uint8_t *data, const size_t len)
 Read a chunk of data from the TX Normal FIFO area of the given device. 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_rx_fifo_write (mrf24j40_t *dev, const uint16_t offset, const uint8_t *data, const size_t len)
 Write a chunk of data into 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...
 

Function Documentation

◆ mrf24j40_hardware_reset()

void mrf24j40_hardware_reset ( mrf24j40_t dev)
Parameters
[in]devdevice to reset

◆ mrf24j40_reg_read_long()

uint8_t mrf24j40_reg_read_long ( mrf24j40_t dev,
const uint16_t  addr 
)

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 
)

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 
)

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 
)

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)
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 
)
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_rx_fifo_write()

void mrf24j40_rx_fifo_write ( mrf24j40_t dev,
const uint16_t  offset,
const uint8_t *  data,
const size_t  len 
)
Parameters
[in]devdevice to write to
[in]offsetaddress in the RX FIFO to write to [valid 0x00-0x1ff]
[in]datadata to copy into FIFO
[in]lennumber of bytes to write to FIFO

◆ mrf24j40_tx_normal_fifo_read()

void mrf24j40_tx_normal_fifo_read ( mrf24j40_t dev,
const uint16_t  offset,
uint8_t *  data,
const size_t  len 
)
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 
)
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)
Parameters
[in]devdevice to read