Internal interfaces for MRF24J40 drivers.
More...
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"
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...
|
|
◆ 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] | dev | device 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] | dev | device 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] | dev | device enable the LNA on |
Definition at line 152 of file mrf24j40_internal.h.
◆ mrf24j40_hardware_reset()
Trigger a hardware reset.
- Parameters
-
◆ mrf24j40_init()
initialization as described in datasheet
- Parameters
-
[in] | dev | device 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] | dev | device to read from |
[in] | addr | address 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] | dev | device to read from |
[in] | addr | address 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] | dev | device to write to |
[in] | addr | address of the register to write |
[in] | value | value 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] | dev | device to write to |
[in] | addr | address of the register to write |
[in] | value | value to write to the given register |
◆ mrf24j40_reset_tasks()
Reset the pending task list of a device.
- Parameters
-
[in] | dev | device 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] | dev | device to read from |
[in] | offset | starting address to read from [valid 0x00-0x1ff] |
[out] | data | buffer to read data into |
[in] | len | number 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] | dev | device to write to |
[in] | offset | address in the TX Normal FIFO to write to [valid 0x00-0x1ff] |
[in] | data | data to copy into FIFO |
[in] | len | number of bytes to write to FIFO |
◆ mrf24j40_update_tasks()
Check for pending interrupts and update task list.
- Parameters
-