15 void *
const buf_p,
const size_t page_size)
20 bank_p->
page_rw_p = (
unsigned char *) buf_p + page_size;
21 memcpy(bank_p->
page_rw_p, buf_p, page_size);
void * hipcPbankGetWritablePage(struct HIPC_pbank *const bank_p)
Gets a current writable page.
enum HIPC_errno hipcPbankSwitchRequest(struct HIPC_pbank *const bank_p)
Requests to switch pages.
size_t hipcPbankGetPageSize(struct HIPC_pbank *const bank_p)
Gets page size.
const void * hipcPbankGetReadOnlyPage(struct HIPC_pbank *const bank_p)
Gets a current read only page.
enum HIPC_pbank_stat hipcPbankGetStat(struct HIPC_pbank *const bank_p)
Gets current status of a bank.
enum HIPC_pbank_stat stat
int hipcPbankSwitchAccept(struct HIPC_pbank *const bank_p)
Accepts a switching request and switches pages if switching is requested.
void hipcPbankInit(struct HIPC_pbank *const bank_p, void *const buf_p, const size_t page_size)
Initializes a parameter bank.
enum HIPC_errno hipcPbankSwitchComplete(struct HIPC_pbank *const bank_p)
Makes both pages have the same latest contents and completes the switching.
enum HIPC_errno hipcPbankSwitchReqWaitCmpl(struct HIPC_pbank *const bank_p)
Calls hipcPbankSwitchRequest(), waits for acceptance of the request, and calls hipcPbankSwitchComplet...