Nordic Semiconductor nRF5 AirFuel SDK  version 2.2.0
pru_pstorage.h
Go to the documentation of this file.
1 /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved.
2  *
3  * The information contained herein is property of Nordic Semiconductor ASA.
4  * Terms and conditions of usage are described in detail in NORDIC
5  * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
6  *
7  * Licensees are granted free, non-transferable use of the information. NO
8  * WARRANTY of ANY KIND is provided. This heading must NOT be removed from
9  * the file.
10  *
11  */
12 
20 #ifdef PRU_PSTORAGE_ENABLE
21 
22 #ifndef __PRU_PSTORAGE_H__
23 #define __PRU_PSTORAGE_H__
24 
25 
26 #include <stdint.h>
27 #include <stdbool.h>
28 
29 /******************************************************************************/
32 /******************************************************************************/
33 
35 typedef struct pru_pstorage_appdata {
36  uint32_t padding;
37  uint8_t charge_complete;
40 
41 
47 void pru_pstorage_sys_evt_handler(uint32_t event);
48 
49 
56 
57 
64 void pru_pstorage_status(bool *p_complete, bool *p_success);
65 
66 
74 
75 
79 
80 #endif /* __PRU_PSTORAGE_H__ */
81 
82 
84 #endif // PRU_PSTORAGE_ENABLE
85 
void pru_pstorage_erase_appdata(void)
Erase all of PRU appdata.
Definition: pru_pstorage.c:102
struct pru_pstorage_appdata pru_pstorage_appdata_t
PRU pstorage data container.
void pru_pstorage_write(pru_pstorage_appdata_t *p_appdata)
Writes application data to flash.
Definition: pru_pstorage.c:69
void pru_pstorage_status(bool *p_complete, bool *p_success)
Read status of pstorage operation.
Definition: pru_pstorage.c:116
void pru_pstorage_sys_evt_handler(uint32_t event)
Handles system callbacks.
Definition: pru_pstorage.c:51
PRU pstorage data container.
Definition: pru_pstorage.h:35
bool pru_pstorage_read(pru_pstorage_appdata_t *p_appdata)
Reads application data from flash.
Definition: pru_pstorage.c:94