|
| #define | ROM_TABLE_CODE(c1, c2) |
| | Return a bootrom lookup code based on two ASCII characters.
|
| |
|
| typedef void | __attribute__((noreturn)) reset_usb_boot(uint32_t usb_activity_gpio_pin_mask |
| | Reboot the device into BOOTSEL mode.
|
| |
|
| void * | rom_func_lookup (uint32_t code) |
| | Lookup a bootrom function by code.
|
| |
| void * | rom_data_lookup (uint32_t code) |
| | Lookup a bootrom address by code.
|
| |
| bool | rom_funcs_lookup (uint32_t *table, unsigned int count) |
| | Helper function to lookup the addresses of multiple bootrom functions.
|
| |
Access to functions and data in the RP2040 bootrom
This header may be included by assembly code
◆ ROM_TABLE_CODE
| #define ROM_TABLE_CODE |
( |
| c1, |
|
|
| c2 ) |
Value:
Return a bootrom lookup code based on two ASCII characters.
These codes are uses to lookup data or function addresses in the bootrom
- Parameters
-
| c1 | the first character |
| c2 | the second character |
- Returns
- the 'code' to use in rom_func_lookup() or rom_data_lookup()
Definition at line 52 of file bootrom.h.
◆ __attribute__
Reboot the device into BOOTSEL mode.
This function reboots the device into the BOOTSEL mode ('usb boot").
Facilities are provided to enable an "activity light" via GPIO attached LED for the USB Mass Storage Device, and to limit the USB interfaces exposed.
- Parameters
-
| usb_activity_gpio_pin_mask | 0 No pins are used as per a cold boot. Otherwise a single bit set indicating which GPIO pin should be set to output and raised whenever there is mass storage activity from the host. |
| disable_interface_mask | value to control exposed interfaces
- 0 To enable both interfaces (as per a cold boot)
- 1 To disable the USB Mass Storage Interface
- 2 To disable the USB PICOBOOT Interface
|
Definition at line 66 of file bootrom.h.
◆ rom_data_lookup()
| void * rom_data_lookup |
( |
uint32_t | code | ) |
|
Lookup a bootrom address by code.
- Parameters
-
- Returns
- a pointer to the data, or NULL if the code does not match any bootrom function
Definition at line 19 of file bootrom.c.
◆ rom_func_lookup()
| void * rom_func_lookup |
( |
uint32_t | code | ) |
|
Lookup a bootrom function by code.
- Parameters
-
- Returns
- a pointer to the function, or NULL if the code does not match any bootrom function
Definition at line 15 of file bootrom.c.
◆ rom_funcs_lookup()
| bool rom_funcs_lookup |
( |
uint32_t * | table, |
|
|
unsigned int | count ) |
Helper function to lookup the addresses of multiple bootrom functions.
This method looks up the 'codes' in the table, and convert each table entry to the looked up function pointer, if there is a function for that code in the bootrom.
- Parameters
-
| table | an IN/OUT array, elements are codes on input, function pointers on success. |
| count | the number of elements in the table |
- Returns
- true if all the codes were found, and converted to function pointers, false otherwise
Helper function to lookup the addresses of multiple bootrom functions.
Definition at line 26 of file bootrom.c.