ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ota_commit.h
Go to the documentation of this file.
1
36
37#pragma once
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
43#include <stdint.h>
44
45#include "ra8_err.h"
46
51typedef enum : uint8_t {
55
66typedef enum : uint32_t {
69
83[[nodiscard]] ra8_err_t ra8_ota_commit_reset(void);
84
125
143[[nodiscard]] ra8_err_t ra8_ota_commit_pending(ra8_ota_bank_t* out_target);
144
177[[nodiscard]] ra8_err_t ra8_ota_commit_set_bank_config(uint32_t raw_value);
178
192[[nodiscard]] ra8_err_t ra8_ota_commit_get_bank_config(uint32_t* out_value);
193
194#ifdef __cplusplus
195}
196#endif
ra8_err_t ra8_ota_commit_set_bank_config(uint32_t raw_value)
Write the bank-config register, masked to the allowed bits.
Definition ota_commit.c:132
ra8_err_t ra8_ota_commit_pending(ra8_ota_bank_t *out_target)
Read back the pending swap target (for tests + diagnostics).
Definition ota_commit.c:119
ra8_ota_bank_config_mask_t
Allowed-bit masks for the bank-config register.
Definition ota_commit.h:66
@ k_ra8_ota_bank_config_allowed
Only the 2-bit BANK_SEL field.
Definition ota_commit.h:67
ra8_ota_bank_t
Bank selector used by ra8_ota_commit_swap_bank.
Definition ota_commit.h:51
@ k_ra8_ota_bank_b
Bank B is the next-boot target.
Definition ota_commit.h:53
@ k_ra8_ota_bank_a
Bank A is the next-boot target.
Definition ota_commit.h:52
ra8_err_t ra8_ota_commit_get_bank_config(uint32_t *out_value)
Read back the bank-config shadow (for tests).
Definition ota_commit.c:151
ra8_err_t ra8_ota_commit_swap_bank(ra8_ota_bank_t target)
Arm the boot ROM to start from target on next reset.
Definition ota_commit.c:90
ra8_err_t ra8_ota_commit_reset(void)
Reset the secure OTA shadow (drops any pending commit).
Definition ota_commit.c:79
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546