picoos-micro
1.xxxx
|
Include file of u-layer library for pico]OS. More...
Go to the source code of this file.
Data Structures | |
struct | uosSpiBusConf |
struct | uosSpiBus |
struct | uosSpiDev |
struct | uosFileInfo |
struct | uosFileConf |
struct | uosFSConf |
struct | uosDiskConf |
struct | uosDisk |
struct | uosFS |
struct | uosFile |
struct | uosMmcSpiConf |
struct | uosMmcDisk |
struct | _uosConfigKeyValue |
Macros | |
#define | UOS_BITTAB_TABLE(type, size) |
#define | UOS_BITTAB_INIT(bm) memset(&bm.bitmap, '\0', sizeof(bm.bitmap)) |
#define | UOS_BITTAB_SLOT(bm, elem) (elem == NULL ? -1 : (elem - bm.table)) |
#define | UOS_BITTAB_ELEM(bm, slot) (slot == -1 ? NULL : (bm.table + slot)) |
#define | UOS_BITTAB_ALLOC(bm) uosBitTabAlloc(bm.bitmap, sizeof(bm.table)/sizeof(bm.table[0])) |
#define | UOS_BITTAB_FREE(bm, slot) uosBitTabFree(bm.bitmap, slot) |
#define | UOS_BITTAB_IS_FREE(bm, slot) uosBitTabIsFree(bm.bitmap, slot) |
Functions | |
int | uosBitTabAlloc (uint8_t *bitmap, int size) |
void | uosBitTabFree (uint8_t *bitmap, int slot) |
bool | uosBitTabIsFree (uint8_t *bitmap, int slot) |
void | uosNewlibInit (void) |
void | uosInit (void) |
void | uosBootDiag (void) |
void | uosResourceDiag (void) |
void | uosSpinInit (void) |
void | uosSpinUSecs (uint16_t uSecs) |
typedef struct uosSpiBusConf | UosSpiBusConf |
typedef struct uosSpiBus | UosSpiBus |
typedef struct uosSpiDev | UosSpiDev |
struct | __attribute__ ((aligned(4))) uosSpiDevConf |
void | uosSpiInit (UosSpiBus *bus, const UosSpiBusConf *cf) |
void | uosSpiDevInit (UosSpiDev *dev, const UosSpiDevConf *cf, UosSpiBus *bus) |
void | uosSpiControl (UosSpiBus *bus, bool fullSpeed) |
void | uosSpiBeginNoCS (UosSpiDev *dev) |
void | uosSpiBegin (UosSpiDev *dev) |
void | uosSpiCS (UosSpiDev *dev, bool select) |
uint8_t | uosSpiXchg (UosSpiDev *dev, uint8_t data) |
void | uosSpiXmit (UosSpiDev *dev, const uint8_t *data, int len) |
void | uosSpiRcvr (UosSpiDev *dev, uint8_t *data, int len) |
void | uosSpiEnd (UosSpiDev *dev) |
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) |
Include file of u-layer library for pico]OS.
#define UOS_BITTAB_TABLE | ( | type, | |
size | |||
) |
Macro for defining a table of objects where used/free status is managed by separate bitmap for efficient space usage.
#define UOS_BITTAB_INIT | ( | bm | ) | memset(&bm.bitmap, '\0', sizeof(bm.bitmap)) |
Initialize bitmap table so that all elements are marked free.
#define UOS_BITTAB_SLOT | ( | bm, | |
elem | |||
) | (elem == NULL ? -1 : (elem - bm.table)) |
Macro for converting address of table element into table index.
#define UOS_BITTAB_ELEM | ( | bm, | |
slot | |||
) | (slot == -1 ? NULL : (bm.table + slot)) |
Macro for converting table index into table element pointer.
#define UOS_BITTAB_ALLOC | ( | bm | ) | uosBitTabAlloc(bm.bitmap, sizeof(bm.table)/sizeof(bm.table[0])) |
Macro for allocating an entry from bitmap table.
#define UOS_BITTAB_FREE | ( | bm, | |
slot | |||
) | uosBitTabFree(bm.bitmap, slot) |
Macro for freeing a bitmap table entry.
#define UOS_BITTAB_IS_FREE | ( | bm, | |
slot | |||
) | uosBitTabIsFree(bm.bitmap, slot) |
Macro for checking for free bitmap table entry.
typedef struct uosSpiBusConf UosSpiBusConf |
Config for generic SPI bus.
struct __attribute__ | ( | (aligned(4)) | ) |
Config for generic SPI bus device.
void uosSpiInit | ( | UosSpiBus * | bus, |
const UosSpiBusConf * | cf | ||
) |
Initialize SPI bus. Must be called before any other operations.
Initialize SPI device.
void uosSpiControl | ( | UosSpiBus * | bus, |
bool | fullSpeed | ||
) |
Control SPI bus speed (low or full).
void uosSpiBeginNoCS | ( | UosSpiDev * | dev | ) |
Allocate SPI bus for current task, but do not assert CS.
void uosSpiBegin | ( | UosSpiDev * | dev | ) |
Allocate SPI bus for current task and assert CS.
void uosSpiCS | ( | UosSpiDev * | dev, |
bool | select | ||
) |
Directly manipulate CS line. Call to uosSpiBegin is still required.
uint8_t uosSpiXchg | ( | UosSpiDev * | dev, |
uint8_t | data | ||
) |
Exchange byte on SPI bus.
void uosSpiXmit | ( | UosSpiDev * | dev, |
const uint8_t * | data, | ||
int | len | ||
) |
Transmit multiple bytes on SPI bus.
void uosSpiRcvr | ( | UosSpiDev * | dev, |
uint8_t * | data, | ||
int | len | ||
) |
Receive multiple bytes from SPI bus.
void uosSpiEnd | ( | UosSpiDev * | dev | ) |
Free SPI bus from current task. If chip select was turned low by uosSpiBegin, turn it high again.
int uosBitTabAlloc | ( | uint8_t * | bitmap, |
int | size | ||
) |
Allocate entry from bitmap table.
void uosBitTabFree | ( | uint8_t * | bitmap, |
int | slot | ||
) |
Free an entry that was allocated from bitmap table.
bool uosBitTabIsFree | ( | uint8_t * | bitmap, |
int | slot | ||
) |
Check if entry is free in bitmap table.
void uosNewlibInit | ( | void | ) |
Initialize newlib syscall layer.