34#ifndef _FREERTOS_DRIVERS_TI_TIVAFLASH_HXX_
35#define _FREERTOS_DRIVERS_TI_TIVAFLASH_HXX_
62 const char *
name,
const void *ptr,
size_t length, uint32_t page_size)
64 ,
base_(static_cast<const uint8_t *>(ptr))
88 return ~subpage_mask();
109 return reinterpret_cast<uint32_t
>(
base_);
const char * name
device name
void disable() OVERRIDE
This will be called when reference count goes from non-zero to 0.
size_t pageSize_
Page size (how often to erase).
uint32_t write_page_mask()
Returns a bitmask with one bits to get the page address.
TivaFlash(const char *name, const void *ptr, size_t length, uint32_t page_size)
Constructor.
size_t len_
Number of bytes in the file.
uint32_t write_page_size()
Returns a bitmask with one bits to get the page address.
uint32_t page_mask()
Returns a bitmask with one bits to get the page address.
void enable() OVERRIDE
This will be called once when reference-count goes from 0 to positive.
uint32_t subpage_mask()
Returns a bitmask with one bits to get the within-page address.
void flush_buffers() OVERRIDE
Instructs the device driver to drop all TX and RX queues.
const uint8_t * base_
Base pointer.
ssize_t read(File *, void *, size_t) OVERRIDE
Read method.
const uint8_t * read_pointer()
ssize_t write(File *, const void *, size_t) OVERRIDE
Write method.
#define OVERRIDE
Function attribute for virtual functions declaring that this funciton is overriding a funciton that s...
#define HASSERT(x)
Checks that the value of expression x is true, else terminates the current process.