34#ifndef _FREERTOS_DRIVERS_TI_CC32XXDEVICEFILE_HXX_
35#define _FREERTOS_DRIVERS_TI_CC32XXDEVICEFILE_HXX_
75 ssize_t
write(
unsigned int index,
const void *buf,
size_t len)
override;
83 ssize_t
read(
unsigned int index,
void *buf,
size_t len)
override;
93 int open(
File* file,
const char *path,
int flags,
int mode)
override;
Common base class for all CC32xxDeviceFile access.
int32_t handle
file handle
CC32xxDeviceFile(const char *name, size_t max_size_on_create=3000)
Constructor.
~CC32xxDeviceFile()
Destructor.
uint32_t size
size of file in bytes
int fstat(File *file, struct stat *stat) override
Get the status information of a file or device.
uint32_t maxSize
max size of file in bytes
int32_t maxSizeOnCreate
max size of file upon creation
ssize_t read(unsigned int index, void *buf, size_t len) override
Read from the CC32xxDeviceFile.
bool writeEnable
is the file open for write
ssize_t write(unsigned int index, const void *buf, size_t len) override
Write to the CC32xxDeviceFile.
int open(File *file, const char *path, int flags, int mode) override
Open a device.
void disable() OVERRIDE
function to disable device
Base class for implementing block devices and other file drivers which can be seeked and addressed by...
const char * name
device name
#define OVERRIDE
Function attribute for virtual functions declaring that this funciton is overriding a funciton that s...
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Removes default copy-constructor and assignment added by C++.
static int stat(struct _reent *reent, const char *path, struct stat *stat)
Get the status information of a file or device.