lriot 2.1.0.0
lr1110_bootloader.h
Go to the documentation of this file.
1
35#ifndef LR1110_BOOTLOADER_H
36#define LR1110_BOOTLOADER_H
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
42/*
43 * -----------------------------------------------------------------------------
44 * --- DEPENDENCIES ------------------------------------------------------------
45 */
46
48#include "common/lr1110_types.h"
49#include "common/lr1110_hal.h"
50
51/*
52 * -----------------------------------------------------------------------------
53 * --- PUBLIC MACROS -----------------------------------------------------------
54 */
55
56/*
57 * -----------------------------------------------------------------------------
58 * --- PUBLIC CONSTANTS --------------------------------------------------------
59 */
60
61/*
62 * -----------------------------------------------------------------------------
63 * --- PUBLIC TYPES ------------------------------------------------------------
64 */
65
67
68/*
69 * -----------------------------------------------------------------------------
70 * --- PUBLIC FUNCTIONS PROTOTYPES ---------------------------------------------
71 */
72
91 lr1110_bootloader_irq_mask_t* irq_status );
92
101
111
122
136err_t lr1110_bootloader_write_flash_encrypted( lriot_t *ctx, uint32_t offset, const uint32_t* buffer, uint8_t length );
137
151err_t lr1110_bootloader_write_flash_encrypted_full( lriot_t *ctx, uint32_t offset, const uint32_t* buffer, uint32_t length );
152
166err_t lr1110_bootloader_reboot( lriot_t *ctx, bool stay_in_bootloader );
167
177
188
199
200#ifdef __cplusplus
201}
202#endif
203
204#endif // LR1110_BOOTLOADER_H
205
206/* --- EOF ------------------------------------------------------------------ */
err_t lr1110_bootloader_read_chip_eui(lriot_t *ctx, lr1110_bootloader_chip_eui_t chip_eui)
Read and return the Chip EUI.
err_t lr1110_bootloader_write_flash_encrypted_full(lriot_t *ctx, uint32_t offset, const uint32_t *buffer, uint32_t length)
Write encrypted data in program flash memory of the chip.
uint32_t lr1110_bootloader_irq_mask_t
Definition lr1110_bootloader.h:66
err_t lr1110_bootloader_clear_reset_status_info(lriot_t *ctx)
Clear the reset status information stored in stat2.
err_t lr1110_bootloader_write_flash_encrypted(lriot_t *ctx, uint32_t offset, const uint32_t *buffer, uint8_t length)
Write encrypted data in program flash memory of the chip.
err_t lr1110_bootloader_get_status(lriot_t *ctx, lr1110_bootloader_stat1_t *stat1, lr1110_bootloader_stat2_t *stat2, lr1110_bootloader_irq_mask_t *irq_status)
Return the status registers and interrupt flags.
err_t lr1110_bootloader_read_pin(lriot_t *ctx, lr1110_bootloader_pin_t pin)
Returns the 4-byte PIN which can be used to claim a device on cloud services.
err_t lr1110_bootloader_get_version(lriot_t *ctx, lr1110_bootloader_version_t *version)
Return the version of the system (hardware and software)
err_t lr1110_bootloader_read_join_eui(lriot_t *ctx, lr1110_bootloader_join_eui_t join_eui)
Read and return the Join EUI.
err_t lr1110_bootloader_reboot(lriot_t *ctx, bool stay_in_bootloader)
Software reset of the chip.
err_t lr1110_bootloader_erase_flash(lriot_t *ctx)
Erase the whole flash memory of the chip.
Bootloader driver types for LR1110.
uint8_t lr1110_bootloader_chip_eui_t[LR1110_BL_CHIP_EUI_LENGTH]
Fixed-length array to store a chipEUI.
Definition lr1110_bootloader_types.h:93
uint8_t lr1110_bootloader_join_eui_t[LR1110_BL_JOIN_EUI_LENGTH]
Fixed-length array to store a joinEUI.
Definition lr1110_bootloader_types.h:98
uint8_t lr1110_bootloader_pin_t[LR1110_BL_PIN_LENGTH]
Fixed-length array to store a PIN.
Definition lr1110_bootloader_types.h:88
Hardware Abstraction Layer (HAL) interface for LR1110.
Type definitions for LR1110.
Status register 1 structure definition.
Definition lr1110_bootloader_types.h:143
Status register 2 structure definition.
Definition lr1110_bootloader_types.h:152
Bootloader version structure definition.
Definition lr1110_bootloader_types.h:162
LR IoT Click context object.
Definition lriot.h:273