|
rcbench
Servo and ESC test bench: panel, IOmcu and shared C
|
The IOmcu's firmware update over the link: link_update_dev on this board's flash and boot ROM. More...
#include <stdbool.h>#include <stdint.h>Go to the source code of this file.
Functions | |
| void | update_hw_init (bool(*busy)(void)) |
| Read the boot ROM's word on this boot – which slot runs, whether it is on trial – and check the partition table against the layout this build has. | |
| void | update_hw_ctl_read (void *ctx, uint8_t off, uint8_t n, uint16_t *out) |
| The two pages' handlers, for the link_page_t table. | |
| uint8_t | update_hw_ctl_write (void *ctx, uint8_t off, uint8_t n, const uint16_t *in) |
| Writes the UPDATE_CTL page, for the link_page_t table. | |
| void | update_hw_data_read (void *ctx, uint8_t off, uint8_t n, uint16_t *out) |
| Reads the UPDATE_DATA page, for the link_page_t table. | |
| uint8_t | update_hw_data_write (void *ctx, uint8_t off, uint8_t n, const uint16_t *in) |
| Writes the UPDATE_DATA page, for the link_page_t table. | |
| void | update_hw_poll (uint32_t now_ms) |
| Once per pass: a slice of a hash, the restart after ACTIVATE, an owed erase of the other slot's first sector, the end of a session that has had no update request for 5s. | |
| bool | update_hw_holds_arm (void) |
| True while ARM is refused: an update session or an image on trial. | |
| bool | update_hw_refuses_arm (uint8_t off, uint8_t n, const uint16_t *in) |
| Whether a CONTROL write is refused for the update (link_update_dev.h). | |
| int | update_hw_slot (void) |
| For the console: the slot running, 0 or 1, or -1 without a table. | |
| bool | update_hw_on_trial (void) |
| For the console: whether the running image waits for its BUY. | |
The IOmcu's firmware update over the link: link_update_dev on this board's flash and boot ROM.
The flash holds the partition table of partitions.json: slots A and B of 2036KiB each, and the store. The image runs from one slot; the update writes the other through the store's flash windows (out_store.h), restarts into it as a flash update boot, and the boot ROM keeps it once the panel writes BUY. Without a partition table – an image loaded before the table was installed – UPDATE_CTL reports no slots and every command that writes is refused.
SPDX-License-Identifier: MIT
| void update_hw_ctl_read | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| uint16_t * | out ) |
The two pages' handlers, for the link_page_t table.
| ctx | Unused. |
| off | First register to read. |
| n | Number of registers to read. |
| out | Receives the register values. |
| uint8_t update_hw_ctl_write | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| const uint16_t * | in ) |
Writes the UPDATE_CTL page, for the link_page_t table.
| ctx | Unused. |
| off | First register to write. |
| n | Number of registers to write. |
| in | The register values to write. |
| void update_hw_data_read | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| uint16_t * | out ) |
Reads the UPDATE_DATA page, for the link_page_t table.
| ctx | Unused. |
| off | First register to read. |
| n | Number of registers to read. |
| out | Receives the register values. |
| uint8_t update_hw_data_write | ( | void * | ctx, |
| uint8_t | off, | ||
| uint8_t | n, | ||
| const uint16_t * | in ) |
Writes the UPDATE_DATA page, for the link_page_t table.
| ctx | Unused. |
| off | First register to write. |
| n | Number of registers to write. |
| in | The register values to write. |
| bool update_hw_holds_arm | ( | void | ) |
True while ARM is refused: an update session or an image on trial.
| void update_hw_init | ( | bool(* | busy )(void) | ) |
Read the boot ROM's word on this boot – which slot runs, whether it is on trial – and check the partition table against the layout this build has.
busy says whether flash may not be written now: the bank driving, the supply on, a servo programming session.
| busy | Returns true while flash may not be written now. |
| bool update_hw_on_trial | ( | void | ) |
For the console: whether the running image waits for its BUY.
| void update_hw_poll | ( | uint32_t | now_ms | ) |
Once per pass: a slice of a hash, the restart after ACTIVATE, an owed erase of the other slot's first sector, the end of a session that has had no update request for 5s.
| now_ms | The pass's clock in ms. |
| bool update_hw_refuses_arm | ( | uint8_t | off, |
| uint8_t | n, | ||
| const uint16_t * | in ) |
Whether a CONTROL write is refused for the update (link_update_dev.h).
| off | First register of the write. |
| n | Number of registers in the write. |
| in | The register values of the write. |
| int update_hw_slot | ( | void | ) |
For the console: the slot running, 0 or 1, or -1 without a table.