PebbleOS v4.48.0-75-g7416f78a1
Loading...
Searching...
No Matches
Flash imaging

Regions of flash the host can write over the console. More...

Data Structures

struct  pbl_console_imaging_region
 Region of flash the host can write. More...
 

Macros

#define PBL_CONSOLE_IMAGING_REGION_DEFINE(_name, _id, _query, _finalize)
 Define a region of flash the host can write.
 

Detailed Description

Regions of flash the host can write over the console.

The host queries a region by its ID to learn where to write it, and finalizes it once written. The application defines the regions it lets the host write.

static int prv_query(uint32_t *address, uint32_t *size) {
*address = PART_FOO_OFFSET;
*size = PART_FOO_SIZE;
return 0;
}
PBL_CONSOLE_IMAGING_REGION_DEFINE(foo, 3, prv_query, nullptr);
#define PBL_CONSOLE_IMAGING_REGION_DEFINE(_name, _id, _query, _finalize)
Define a region of flash the host can write.
Definition imaging.h:58

Macro Definition Documentation

◆ PBL_CONSOLE_IMAGING_REGION_DEFINE

#define PBL_CONSOLE_IMAGING_REGION_DEFINE (   _name,
  _id,
  _query,
  _finalize 
)
Value:
static const struct pbl_console_imaging_region _pbl_console_imaging_region_##_name \
PBL_ITERABLE_SECTION(const struct pbl_console_imaging_region, con_img_regs, \
#_name) = {.id = (_id), .query = (_query), .finalize = (_finalize)}
#define PBL_ITERABLE_SECTION(type, tag, key)
Add the object to an iterable section, a table gathered at link time from any file.
Definition section.h:144
Region of flash the host can write.
Definition imaging.h:31
uint8_t id
ID the host refers to the region by.
Definition imaging.h:33
int(* query)(uint32_t *address, uint32_t *size)
Get the extents of the region, before the host writes it.
Definition imaging.h:41

Define a region of flash the host can write.

Parameters
_nameRegion name.
_idID the host refers to the region by.
_queryFunction that gets the extents of the region.
_finalizeFunction run once the region is written, or NULL.