 |
Wirepas SDK
|
|
Go to the documentation of this file.
13 #ifndef BL_INTERFACE_H_
14 #define BL_INTERFACE_H_
20 #if defined(EFR32_PLATFORM)
38 #define BL_MEMORY_AREA_UNDEFINED 0xFFFFFFFF
216 #if defined(NRF91_PLATFORM)
224 const char * at_commands;
225 } bl_platform_nrf91_t;
226 #elif defined(EFR32_PLATFORM)
233 const CMU_HFXOInit_TypeDef * hfxoInit;
237 const CMU_LFXOInit_TypeDef * lfxoInit;
238 } bl_platform_efr32_t;
244 #if defined(NRF52_PLATFORM)
249 #elif defined(NRF91_PLATFORM)
253 const bl_platform_nrf91_t * nrf91;
254 #elif defined(EFR32_PLATFORM)
258 const bl_platform_efr32_t * efr32;
334 uint32_t * sector_base,
335 size_t * number_of_sector);
369 uint8_t * num_areas);
458 void (*clear_wdt)(void));
508 (*bl_hardware_getCapabilities_f)(void);
uint32_t page_write_call_time
bl_memory_area_id_t area_id
void(* bl_debug_flow_f)(dflow_tag_e tag)
Add flow debugging point.
@ BL_SCRAT_WRITE_STATUS_INVALID_HEADER
bl_interface_res_e(* bl_memory_area_getIdfromType_f)(bl_memory_area_id_t *id, bl_memory_area_type_e type)
Return the memory area id of the FIRST area with provided type.
bl_scrat_setBootable_f setBootable
const hardware_services_t * hardware_services_p
uint32_t sector_erase_time
@ BL_SCRAT_WRITE_STATUS_INVALID_START
uint32_t area_physical_address
@ BL_SCRAT_WRITE_STATUS_FLASH_ERROR
bl_interface_res_e(* bl_memory_area_startRead_f)(bl_memory_area_id_t id, void *to, uint32_t from, size_t amount)
Read bytes from a memory area.
@ BL_SCRAT_WRITE_STATUS_COMPLETED_ERROR
@ BL_MEM_AREA_TYPE_MODEMFW
bl_memory_area_startErase_f startErase
bl_scrat_write_status_e
Scratchpad write status.
@ BL_MEM_AREA_TYPE_APPLICATION
@ BL_MEM_AREA_TYPE_PERSISTENT
bl_memory_area_isBusy_f isBusy
uint32_t is_busy_call_time
uint8_t(* bl_memory_area_getMaxNumAreas_f)(void)
Return the total number of areas supported by the bootloader.
bl_memory_area_startWrite_f startWrite
bl_memory_area_getMaxNumAreas_f getMaxNumAreas
@ BL_SCRAT_WRITE_STATUS_COMPLETED_OK
bl_interface_res_e(* bl_scrat_setBootable_f)(void)
Set scratchpad as bootable.
Global interface entry point with a version id.
const typedef bl_hardware_capabilities_t *(* bl_hardware_getCapabilities_f)(void)
Returns board hardware capabilities.
uint32_t byte_write_call_time
bl_memory_area_type_e type
bl_scrat_setStatus_f setStatus
bl_scrat_getInfo_f getInfo
bl_interface_res_e(* bl_memory_area_getAreaHeader_f)(bl_memory_area_id_t id, bl_memory_area_header_t *header)
Return a structure containing the information stored in the header at the beginning of the area.
bl_interface_res_e(* bl_scrat_write_f)(uint32_t to, const void *from, size_t amount, bl_scrat_write_status_e *status)
Write bytes to scratchpad area.
const scratchpad_services_t * scratchpad_services_p
bl_interface_res_e
Bootloader interface operations result.
@ BL_SCRAT_WRITE_STATUS_NOT_ONGOING
@ BL_MEM_AREA_TYPE_SCRATCHPAD
bl_hardware_getCapabilities_f getCapabilities
bl_debug_flow_f debug_flow
@ BL_SCRAT_IS_INVALID_HEADER
Scratchpad info definition.
bl_interface_res_e(* bl_memory_area_startErase_f)(bl_memory_area_id_t id, uint32_t *sector_base, size_t *number_of_sector)
Erase a sector of a memory area.
bl_scrat_valid_e
Scratchpad validity.
void(* bl_memory_area_getAreaList_f)(bl_memory_area_id_t *list, uint8_t *num_areas)
Return the list of areas defined in the bootloader.
bl_interface_res_e(* bl_memory_area_startWrite_f)(bl_memory_area_id_t id, uint32_t to, const void *from, size_t amount)
Write bytes to a memory area.
Hardware features that can be installed on a board.
bl_interface_res_e(* bl_scrat_read_f)(void *to, uint32_t from, size_t amount)
Read bytes from a scratchpad file.
uint32_t sector_erase_call_time
bool(* bl_memory_area_isBusy_f)(bl_memory_area_id_t id)
Checks if underlying flash driver is busy.
@ BL_SCRAT_WRITE_STATUS_INVALID_NUM_BYTES
bl_scrat_getValidity_f getValidity
bl_interface_res_e(* bl_scrat_clear_f)(void(*clear_wdt)(void))
Erase the scratchpad area.
bl_memory_area_getAreaInfo_f getAreaInfo
bl_memory_area_getIdfromType_f getIdfromType
bl_memory_area_type_e
Types of Memory Areas.
Flash memory info definition.
const dflow_services_t * dflow_services_p
@ BL_SCRAT_WRITE_STATUS_OK
uint32_t bl_memory_area_id_t
Memory Area id definition.
bl_interface_res_e(* bl_scrat_getInfo_f)(bl_scrat_info_t *info)
Fills a structure with info about the scratchpad.
@ BL_MEM_AREA_TYPE_BOOTLOADER
@ BL_SCRAT_IS_INVALID_CRC
@ BL_SCRAT_WRITE_STATUS_INVALID_NULL_BYTES
bl_interface_res_e(* bl_scrat_begin_f)(uint32_t num_bytes, uint8_t seq, void(*clear_wdt)(void))
Prepare scratchpad memory for storing new data.
bl_interface_res_e(* bl_memory_area_getAreaInfo_f)(bl_memory_area_id_t id, bl_memory_area_info_t *info)
Fills a structure with info about memory area.
bl_memory_area_startRead_f startRead
bl_interface_res_e(* bl_scrat_getValidity_f)(bl_scrat_valid_e *validity)
Check if the scratchpad contains valid data.
Memory Area info definition.
const memory_area_services_t * memory_area_services_p
bl_scrat_type_e
Scratchpad type enum.
bl_interface_res_e(* bl_scrat_setStatus_f)(uint32_t status)
bl_memory_area_getAreaHeader_f getAreaHeader
bl_memory_area_getAreaList_f getAreaList