SX1272/6 radio driver.
More...
Go to the source code of this file.
|
typedef uint8_t | cr_t |
|
typedef uint8_t | sf_t |
|
typedef uint8_t | bw_t |
|
typedef uint8_t | dr_t |
|
typedef uint32_t | rps_t |
|
|
enum | {
RADIO_RST =0,
RADIO_TX =1,
RADIO_RX =2,
RADIO_RXON =3
} |
|
enum | _cr_t {
CR_4_5 = 0,
CR_4_6,
CR_4_7,
CR_4_8
} |
|
enum | _sf_t {
FSK = 0,
SF6,
SF7,
SF8,
SF9,
SF10,
SF11,
SF12
} |
|
enum | _bw_t {
BW7_8 = 0,
BW10_4,
BW15_6,
BW20_8,
BW31_25,
BW41_7,
BW62_5,
BW125,
BW250,
BW500
} |
|
enum | { STD_PREAMBLE_LEN = 8
} |
|
enum | { MAX_LEN_FRAME = 64
} |
|
#define RADIO_OSC_STARTUP 1 |
Radio wakeup time from SLEEP mode
#define RADIO_SLEEP_TO_RX 2 |
Radio PLL lock and Mode Ready delay which can vary with the temperature
Radio complete Wake-up Time with margin for temperature compensation
void os_radio |
( |
uint8_t |
mode | ) |
|
Changes the radio mode.
- Parameters
-
mode | The mode in which the radio will be put. This can be RADIO_RST, RADIO_TX, RADIO_RX, or RADIO_RXON. |
void radio_irq_handler |
( |
uint8_t |
dio | ) |
|
The radio driver IRQ handler.
- Parameters
-
dio | The INT number to handle. |
uint8_t radio_rand1 |
( |
void |
| ) |
|
Returns a random byte.
- Return values
-
uint8_t radio_read |
( |
uint8_t |
reg | ) |
|
Reads a radio register.
The function reads the value of a specific SX127x register.
- Parameters
-
reg | The register to read from. |
- Return values
-
void radio_reset |
( |
uint8_t |
val | ) |
|
Resets the SX127x module.
- Parameters
-
val | 1 to put the radio in reset, 0 to release the reset. |
uint8_t radio_rssi |
( |
void |
| ) |
|
Returns the current RSSI.
The function returns the current RSSI in dBm + 157 dBm. The SX127x has to be in RX mode.
- Return values
-
void radio_write |
( |
uint8_t |
addr, |
|
|
uint8_t |
data |
|
) |
| |
Writes a radio register.
The function writes a value to a specific SX127x register.
- Parameters
-
addr | The register to write to. |
data | The value to write. |