picoos-micro
1.xxxx
|
Data Structures | |
struct | uosFileInfo |
void | uosInit (void) |
void | uosBootDiag (void) |
void | uosResourceDiag (void) |
void | uosSpinInit (void) |
void | uosSpinUSecs (uint16_t uSecs) |
typedef struct uosFileInfo | UosFileInfo |
typedef struct uosFileConf | UosFileConf |
typedef struct uosFSConf | UosFSConf |
typedef struct uosDiskConf | UosDiskConf |
typedef struct uosDisk | UosDisk |
typedef struct uosFS | UosFS |
typedef struct uosFile | UosFile |
typedef struct uosMmcSpiConf | UosMmcSpiConf |
typedef struct uosMmcDisk | UosMmcDisk |
void | uosFileInit (void) |
int | uosFile2Slot (UosFile *file) |
UosFile * | uosSlot2File (int fd) |
int | uosMount (const UosFS *mount) |
UosFile * | uosFileAlloc (void) |
int | uosFileFree (UosFile *file) |
UosFile * | uosFileOpen (const char *fileName, int flags, int mode) |
int | uosFileRead (UosFile *file, char *buf, int max) |
int | uosFileWrite (UosFile *file, const char *buf, int len) |
int | uosFileClose (UosFile *file) |
int | uosFileStat (const char *filename, UosFileInfo *st) |
int | uosFileFStat (UosFile *file, UosFileInfo *st) |
int | uosFileSeek (UosFile *file, int offset, int whence) |
int | uosFileUnlink (const char *filename) |
int | uosFileSync (UosFile *file) |
int | uosAddDisk (const UosDisk *disk) |
const UosDisk * | uosGetDisk (int diskNumber) |
int | uosMountFat (const char *mountPoint, int diskNumber) |
void | uosMmcSpiXmit (const UosMmcDisk *, const uint8_t *data, int len) |
void | uosMmcSpiRcvr (const UosMmcDisk *, uint8_t *data, int len) |
int | uosMountRom (const char *mountPoint, const UosRomFile *data) |
UosRing * | uosRingCreate (int msgSize, int msgCount) |
bool | uosRingPut (UosRing *ring, const void *msg, UINT_t timeout) |
bool | uosRingGet (UosRing *ring, void *msg, UINT_t timeout) |
void | uosRingDestroy (UosRing *ring) |
typedef struct _uosConfigKeyValue | UosConfigKeyValue |
typedef int(* | UosConfigSaver) (void *context, const char *key, const char *value) |
const char * | uosConfigGet (const char *key) |
const char * | uosConfigSet (const char *key, const char *value) |
void | uosConfigInit (void) |
int | uosConfigSaveEntries (void *context, UosConfigSaver saver) |
int | uosConfigSave (const char *filename) |
int | uosConfigLoad (const char *filename) |
typedef struct uosFileInfo UosFileInfo |
File information.
typedef struct uosFileConf UosFileConf |
Config for file operations. Provides function pointers for common operations like read, write & close.
Config for filesystem type. Provides function pointers for fs operations like open & unlink.
typedef struct uosDiskConf UosDiskConf |
Config for disk drives. Provides function pointers for disk access.
typedef struct uosMmcSpiConf UosMmcSpiConf |
Config for MMC/SD card SPI.
typedef struct uosMmcDisk UosMmcDisk |
Disk using MMC/SD card via SPI bus.
typedef struct _uosConfigKeyValue UosConfigKeyValue |
Config data in memory is currently a linked list.
typedef int(* UosConfigSaver) (void *context, const char *key, const char *value) |
Callback function used by uosConfigSaveEntries.
void uosInit | ( | void | ) |
Initialize μ-layer. Must be called before any other API function.
void uosBootDiag | ( | void | ) |
Print memory sizes and required copyright messages when system starts.
void uosResourceDiag | ( | void | ) |
Print information about resource usage. Currently output includes free stack space for each task, free interrupt stack space and number of tasks and events in use.
void uosSpinInit | ( | void | ) |
Initialize possible hardware timer for uosSpinUSecs. Called internally by uosInit().
void uosSpinUSecs | ( | uint16_t | uSecs | ) |
Spin in loop until requested number of microseconds have passed. Uses either hardware timer or delay loop depending of UOSCFG_SPIN_USECS setting.
void uosFileInit | ( | void | ) |
Initialize fs layer. Called automatically by uosInit().
int uosFile2Slot | ( | UosFile * | file | ) |
Convert file object into traditional fd number.
UosFile* uosSlot2File | ( | int | fd | ) |
Convert traditional fd number into file object.
int uosMount | ( | const UosFS * | mount | ) |
Perform internal filesystem mount.
UosFile* uosFileAlloc | ( | void | ) |
Allocate file descriptor (internal use only).
int uosFileFree | ( | UosFile * | file | ) |
Free file descriptor (internal use only).
UosFile* uosFileOpen | ( | const char * | fileName, |
int | flags, | ||
int | mode | ||
) |
Open file from mounted filesystem.
int uosFileRead | ( | UosFile * | file, |
char * | buf, | ||
int | max | ||
) |
Read from file.
int uosFileWrite | ( | UosFile * | file, |
const char * | buf, | ||
int | len | ||
) |
Write to file.
int uosFileClose | ( | UosFile * | file | ) |
Close file.
int uosFileStat | ( | const char * | filename, |
UosFileInfo * | st | ||
) |
Get file information.
int uosFileFStat | ( | UosFile * | file, |
UosFileInfo * | st | ||
) |
Get file information.
int uosFileSeek | ( | UosFile * | file, |
int | offset, | ||
int | whence | ||
) |
Seek.
int uosFileUnlink | ( | const char * | filename | ) |
Remove file.
int uosFileSync | ( | UosFile * | file | ) |
Flush file to disk.
int uosAddDisk | ( | const UosDisk * | disk | ) |
Add a known disk. Returns disk number.
const UosDisk* uosGetDisk | ( | int | diskNumber | ) |
Get disk by drive number.
int uosMountFat | ( | const char * | mountPoint, |
int | diskNumber | ||
) |
Mount a fat filesystem.
void uosMmcSpiXmit | ( | const UosMmcDisk * | , |
const uint8_t * | data, | ||
int | len | ||
) |
Simple implementation of SPI block transmit.
void uosMmcSpiRcvr | ( | const UosMmcDisk * | , |
uint8_t * | data, | ||
int | len | ||
) |
Simple implementation of SPI block receive.
int uosMountRom | ( | const char * | mountPoint, |
const UosRomFile * | data | ||
) |
Mount a rom filesystem.
UosRing* uosRingCreate | ( | int | msgSize, |
int | msgCount | ||
) |
Create new ring buffer mailbox.
bool uosRingPut | ( | UosRing * | ring, |
const void * | msg, | ||
UINT_t | timeout | ||
) |
Put a message to ring buffer. Waits for timeout ticks if there is not room. If called from interrupt handler, timeout must be set to zero (don't wait).
bool uosRingGet | ( | UosRing * | ring, |
void * | msg, | ||
UINT_t | timeout | ||
) |
Get a message from ring buffer. Waits for timeout ticks until there is a message available. If timeout occurs, function returns false.
void uosRingDestroy | ( | UosRing * | ring | ) |
Destroy a ring buffer mailbox.
const char* uosConfigGet | ( | const char * | key | ) |
Get config entry. Returned pointer can be assumed to be valid after call (once key has been allocated, it's place in memory does not change).
const char* uosConfigSet | ( | const char * | key, |
const char * | value | ||
) |
Set config entry by modifying previously set value or by allocating new entry.
void uosConfigInit | ( | void | ) |
Initialize config system. Must be called before any other uosConfig* function.
int uosConfigSaveEntries | ( | void * | context, |
UosConfigSaver | saver | ||
) |
Save all key-value pairs that have been set. Function performs callback to 'saver' for each pair and assumes that callback function takes care of actual saving (to file, flash or whatever is suitable for current environment).
int uosConfigSave | ( | const char * | filename | ) |
Save config entries to file.
int uosConfigLoad | ( | const char * | filename | ) |
Load config entries from file.