Trident IoT Z-Wave SDK
 
Loading...
Searching...
No Matches
zpal_bootloader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Silicon Laboratories Inc. <https://www.silabs.com/>
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
12#ifndef ZPAL_BOOTLOADER_H_
13#define ZPAL_BOOTLOADER_H_
14
15#include <stdbool.h>
16#include "zpal_status.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
65
74
79#define ZPAL_BOOTLOADER_CAPABILITY_STORAGE (1 << 0)
80
88#define ZPAL_BOOTLOADER_VERSION_MAJOR_SHIFT (24U)
92#define ZPAL_BOOTLOADER_VERSION_MINOR_SHIFT (16U)
96#define ZPAL_BOOTLOADER_VERSION_BUGFIX_SHIFT (0U)
100#define ZPAL_BOOTLOADER_VERSION_MAJOR_MASK (0xFF000000U)
104#define ZPAL_BOOTLOADER_VERSION_MINOR_MASK (0x00FF0000U)
108#define ZPAL_BOOTLOADER_VERSION_BUGFIX_MASK (0x0000FFFFU)
121
130
139
146
155zpal_status_t zpal_bootloader_write_data(uint32_t offset, uint8_t * data, uint16_t length);
156
163bool zpal_bootloader_is_first_boot(bool *updated_successfully);
164
170
176#ifdef __cplusplus
177}
178#endif
179
180#endif /* ZPAL_BOOTLOADER_H_ */
zpal_status_t zpal_bootloader_init(void)
Initialize components of the bootloader so the app can use the interface. This typically includes ini...
zpal_status_t zpal_bootloader_verify_image(void)
Verify that the image is valid.
void zpal_bootloader_reboot_and_install(void)
Reboot into the bootloader to install something. If there is a storage component and a slot is marked...
zpal_bootloader_type_t
Type of bootloader.
Definition zpal_bootloader.h:61
void zpal_bootloader_reset_page_counters(void)
Resets the bootloader page counters. Used when initiating an upgrade to jump back to the start of the...
bool zpal_bootloader_is_first_boot(bool *updated_successfully)
Returns whether the software is running on the first boot after a new firmware image was written.
zpal_status_t zpal_bootloader_write_data(uint32_t offset, uint8_t *data, uint16_t length)
Writes a fragment of a firmware image to the bootloader storage.
void zpal_bootloader_get_info(zpal_bootloader_info_t *info)
Get information about the bootloader on this device. The information returned is fetched from the mai...
@ ZPAL_BOOTLOADER_PRESENT
Bootloader present.
Definition zpal_bootloader.h:63
@ ZPAL_BOOTLOADER_NOT_PRESENT
No bootloader present.
Definition zpal_bootloader.h:62
zpal_status_t
ZPAL statuses to be used by ZPAL APIs.
Definition zpal_status.h:38
Information about the current bootloader.
Definition zpal_bootloader.h:69
uint32_t version
Version number of the bootloader. See Zpal-bootloader-info-version for masking.
Definition zpal_bootloader.h:71
zpal_bootloader_type_t type
The type of bootloader.
Definition zpal_bootloader.h:70
uint32_t capabilities
Capability mask for the bootloader.
Definition zpal_bootloader.h:72