#include <stdint.h>
#include <stdbool.h>
#include <assert.h>
#include "pico/platform.h"
#include "picoboot_constants.h"
Go to the source code of this file.
|
#define | PICOBOOT_MAGIC 0x431fd10bu |
|
#define | PICOBOOT_IF_RESET 0x41 |
|
#define | PICOBOOT_IF_CMD_STATUS 0x42 |
|
|
enum | picoboot_cmd_id {
PC_EXCLUSIVE_ACCESS = 0x1
, PC_REBOOT = 0x2
, PC_FLASH_ERASE = 0x3
, PC_READ = 0x84
,
PC_WRITE = 0x5
, PC_EXIT_XIP = 0x6
, PC_ENTER_CMD_XIP = 0x7
, PC_EXEC = 0x8
,
PC_VECTORIZE_FLASH = 0x9
, PC_REBOOT2 = 0xa
, PC_GET_INFO = 0x8b
, PC_OTP_READ = 0x8c
,
PC_OTP_WRITE = 0xd
} |
|
enum | picoboot_status {
PICOBOOT_OK = 0
, PICOBOOT_UNKNOWN_CMD = 1
, PICOBOOT_INVALID_CMD_LENGTH = 2
, PICOBOOT_INVALID_TRANSFER_LENGTH = 3
,
PICOBOOT_INVALID_ADDRESS = 4
, PICOBOOT_BAD_ALIGNMENT = 5
, PICOBOOT_INTERLEAVED_WRITE = 6
, PICOBOOT_REBOOTING = 7
,
PICOBOOT_UNKNOWN_ERROR = 8
, PICOBOOT_INVALID_STATE = 9
, PICOBOOT_NOT_PERMITTED = 10
, PICOBOOT_INVALID_ARG = 11
,
PICOBOOT_BUFFER_TOO_SMALL = 12
, PICOBOOT_PRECONDITION_NOT_MET = 13
, PICOBOOT_MODIFIED_DATA = 14
, PICOBOOT_INVALID_DATA = 15
,
PICOBOOT_NOT_FOUND = 16
, PICOBOOT_UNSUPPORTED_MODIFICATION = 17
} |
|
enum | picoboot_exclusive_type { NOT_EXCLUSIVE = 0
, EXCLUSIVE
, EXCLUSIVE_AND_EJECT
} |
|
|
struct __packed | __aligned (4) picoboot_cmd |
|