Data Structures | Macros | Functions
ExtFlash.h File Reference

Detailed Description

External flash storage abstraction.

============================================================================


#include <stdlib.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  ExtFlashInfo_t
 

Macros

#define EXT_FLASH_PAGE_SIZE   4096
 

Functions

bool ExtFlash_open (void)
 
void ExtFlash_close (void)
 
ExtFlashInfo_tExtFlash_info (void)
 
bool ExtFlash_read (size_t offset, size_t length, uint8_t *buf)
 
bool ExtFlash_erase (size_t offset, size_t length)
 
bool ExtFlash_write (size_t offset, size_t length, const uint8_t *buf)
 
bool ExtFlash_test (void)
 

Macro Definition Documentation

§ EXT_FLASH_PAGE_SIZE

#define EXT_FLASH_PAGE_SIZE   4096

Function Documentation

§ ExtFlash_open()

bool ExtFlash_open ( void  )

Initialize storage driver.

Returns
True when successful.

§ ExtFlash_close()

void ExtFlash_close ( void  )

Close the storage driver

§ ExtFlash_info()

ExtFlashInfo_t* ExtFlash_info ( void  )

Get flash information

§ ExtFlash_read()

bool ExtFlash_read ( size_t  offset,
size_t  length,
uint8_t *  buf 
)

Read storage content

Returns
True when successful.

§ ExtFlash_erase()

bool ExtFlash_erase ( size_t  offset,
size_t  length 
)

Erase storage sectors corresponding to the range.

Returns
True when successful.

§ ExtFlash_write()

bool ExtFlash_write ( size_t  offset,
size_t  length,
const uint8_t *  buf 
)

Write to storage sectors.

Returns
True when successful.

§ ExtFlash_test()

bool ExtFlash_test ( void  )

Test the flash (power on self-test)

Returns
True when successful.
Copyright 2018, Texas Instruments Incorporated