PebbleOS v4.44.0-79-gafcb109f5
Loading...
Searching...
No Matches
Flash backend

Log messages stored in the debug flash region, one generation per boot. More...

Typedefs

typedef bool(* pbl_log_flash_dump_line_cb_t) (uint8_t *message, uint32_t length)
 Called with each stored message of a dumped generation.
 
typedef void(* pbl_log_flash_dump_done_cb_t) (bool success)
 Called once a dump finishes.
 

Functions

void pbl_log_flash_init (void)
 Start a new log generation and enable the flash backend.
 
bool pbl_log_flash_dump (int generation, pbl_log_flash_dump_line_cb_t line_cb, pbl_log_flash_dump_done_cb_t done_cb)
 Dump a log generation, one message per system task callback.
 

Detailed Description

Log messages stored in the debug flash region, one generation per boot.

Typedef Documentation

◆ pbl_log_flash_dump_done_cb_t

typedef void(* pbl_log_flash_dump_done_cb_t) (bool success)

Called once a dump finishes.

Parameters
successfalse if the generation does not exist or a message could not be consumed.

◆ pbl_log_flash_dump_line_cb_t

typedef bool(* pbl_log_flash_dump_line_cb_t) (uint8_t *message, uint32_t length)

Called with each stored message of a dumped generation.

Parameters
messageBinary log message.
lengthMessage length, in bytes.
Returns
true if the message was consumed, false to retry it.

Function Documentation

◆ pbl_log_flash_dump()

bool pbl_log_flash_dump ( int  generation,
pbl_log_flash_dump_line_cb_t  line_cb,
pbl_log_flash_dump_done_cb_t  done_cb 
)

Dump a log generation, one message per system task callback.

Parameters
generation0 for the current boot, 1 for the previous one, and so on.
line_cbCalled with each message.
done_cbCalled once the dump finishes, also when the generation does not exist.
Returns
true if the generation exists.

◆ pbl_log_flash_init()

void pbl_log_flash_init ( void  )

Start a new log generation and enable the flash backend.