Firmware SDK
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
bc_eeprom

Driver for internal EEPROM memory. More...

Enumerations

enum  bc_eepromc_event_t {
  BC_EEPROM_EVENT_ASYNC_WRITE_ERROR = 0,
  BC_EEPROM_EVENT_ASYNC_WRITE_DONE = 1
}
 

Functions

bool bc_eeprom_write (uint32_t address, const void *buffer, size_t length)
 Write buffer to EEPROM area and verify it. More...
 
bool bc_eeprom_async_write (uint32_t address, const void *buffer, size_t length, void(*event_handler)(bc_eepromc_event_t, void *), void *event_param)
 Async write buffer to EEPROM area and verify it. More...
 
void bc_eeprom_async_cancel (void)
 Cancel async write.
 
bool bc_eeprom_read (uint32_t address, void *buffer, size_t length)
 Read buffer from EEPROM area. More...
 
size_t bc_eeprom_get_size (void)
 Return size of EEPROM area. More...
 

Detailed Description

Driver for internal EEPROM memory.

Enumeration Type Documentation

Enumerator
BC_EEPROM_EVENT_ASYNC_WRITE_ERROR 

EEPROM event sync write error.

BC_EEPROM_EVENT_ASYNC_WRITE_DONE 

EEPROM event sync write done.

Definition at line 10 of file bc_eeprom.h.

Function Documentation

bool bc_eeprom_async_write ( uint32_t  address,
const void *  buffer,
size_t  length,
void(*)(bc_eepromc_event_t, void *)  event_handler,
void *  event_param 
)

Async write buffer to EEPROM area and verify it.

Parameters
[in]addressEEPROM start address (starts at 0)
[in]bufferPointer to source buffer
[in]lengthNumber of bytes to be written
[in]event_handlerFunction address
[in]event_paramOptional event parameter (can be NULL)
Returns
true On success start
false On failure start

Definition at line 70 of file bc_eeprom.c.

Here is the call graph for this function:

size_t bc_eeprom_get_size ( void  )

Return size of EEPROM area.

Returns
Size of EEPROM area in bytes

Definition at line 132 of file bc_eeprom.c.

bool bc_eeprom_read ( uint32_t  address,
void *  buffer,
size_t  length 
)

Read buffer from EEPROM area.

Parameters
[in]addressEEPROM start address (starts at 0)
[out]bufferPointer to destination buffer
[in]lengthNumber of bytes to be read
Returns
true On success
false On failure

Definition at line 113 of file bc_eeprom.c.

bool bc_eeprom_write ( uint32_t  address,
const void *  buffer,
size_t  length 
)

Write buffer to EEPROM area and verify it.

Parameters
[in]addressEEPROM start address (starts at 0)
[in]bufferPointer to source buffer
[in]lengthNumber of bytes to be written
Returns
true On success
false On failure

Definition at line 31 of file bc_eeprom.c.