| SX126x-Arduino 2.0.1

Data Structures | Macros | Functions | Variables
board.h File Reference
`#include <Arduino.h>`
`#include <stdbool.h>`
`#include <stdlib.h>`
`#include <stdio.h>`
`#include <string.h>`
`#include <stdint.h>`
`#include "radio/radio.h"`
`#include "radio/sx126x/sx126x.h"`
`#include "boards/sx126x/sx126x-board.h"`
`#include "timer.h"`
`#include "sx126x-debug.h"`

Go to the source code of this file.

## Data Structures
struct | hw_config

## Macros
#define | SX1261_CHIP 1
#define | SX1262_CHIP 2
#define | SX1268_CHIP 2

## Functions
uint32_t | lora_hardware_init (hw_config hwConfig)
| Initializes the target board peripherals. More...
uint32_t | lora_hardware_re_init (hw_config hwConfig)
| Initializes the target board peripherals after deep sleep wake up. More...
uint32_t | lora_isp4520_init (int chipType)
| Initializes the ISP4520 board peripherals. More...
uint32_t | lora_rak4630_init (void)
| Initializes the RAK4630 board peripherals. More...
void | lora_hardware_uninit (void)
| De-initializes the target board peripherals to decrease power consumption. More...
uint32_t | BoardGetRandomSeed (void)
| Returns a pseudo random seed generated using the MCU Unique ID. More...
void | BoardGetUniqueId (uint8_t *id)
| Gets the board 64 bits unique ID. More...
uint8_t | BoardGetBatteryLevel (void)
| Get batttery value TO BE IMPLEMENTED. More...
void | BoardDisableIrq (void)
| Disable interrupts. More...
void | BoardEnableIrq (void)
| Enable interrupts. More...
bool | start_lora_task (void)
| Initialize LoRa handler task (ESP32 & nRF52) More...

## Variables
hw_config | _hwConfig

## Macro Definition Documentation

## ◆ SX1261_CHIP

#define SX1261_CHIP 1

## ◆ SX1262_CHIP

#define SX1262_CHIP 2

Examples
  LoRaWanPio\src\main.cpp, Sensor-Gateway-Deepsleep\LoRa-Gateway\src\main.cpp, and Sensor-Gateway-Deepsleep\LoRa-TempSensor\src\main.cpp.

## ◆ SX1268_CHIP

#define SX1268_CHIP 2

## Function Documentation

## ◆ lora_hardware_init()

uint32_t lora_hardware_init | ( | hw_config | hwConfig | ) |

Initializes the target board peripherals.

Parameters

  [hwConfig] | hw_config describes the HW connection between the MCU and the SX126x

## ◆ lora_hardware_re_init()

uint32_t lora_hardware_re_init | ( | hw_config | hwConfig | ) |

Initializes the target board peripherals after deep sleep wake up.

Parameters

  [hwConfig] | hw_config describes the HW connection between the MCU and the SX126x

## ◆ lora_isp4520_init()

uint32_t lora_isp4520_init | ( | int | chipType | ) |

Initializes the ISP4520 board peripherals.

Parameters

  [chipType] | chipType selects either SX1262/1268 or SX1261

## ◆ lora_rak4630_init()

uint32_t lora_rak4630_init | ( | void |  | ) |

Initializes the RAK4630 board peripherals.

## ◆ lora_hardware_uninit()

void lora_hardware_uninit | ( | void |  | ) |

De-initializes the target board peripherals to decrease power consumption.

## ◆ BoardGetRandomSeed()

uint32_t BoardGetRandomSeed | ( | void |  | ) |

Returns a pseudo random seed generated using the MCU Unique ID.

Return values

  seed | Generated pseudo random seed

## ◆ BoardGetUniqueId()

void BoardGetUniqueId | ( | uint8_t * | id | ) |

Gets the board 64 bits unique ID.

Parameters

  [id] | id Pointer to an array that will contain the Unique ID

## ◆ BoardGetBatteryLevel()

uint8_t BoardGetBatteryLevel | ( | void |  | ) |

Get batttery value TO BE IMPLEMENTED.

## ◆ BoardDisableIrq()

void BoardDisableIrq | ( | void |  | ) |

Disable interrupts.

Remarks
  IRQ nesting is managed

## ◆ BoardEnableIrq()

void BoardEnableIrq | ( | void |  | ) |

Enable interrupts.

Remarks
  IRQ nesting is managed

## ◆ start_lora_task()

bool start_lora_task | ( | void |  | ) |

Initialize LoRa handler task (ESP32 & nRF52)

## Variable Documentation

## ◆ _hwConfig

hw_config _hwConfig