|
Defines |
#define | MIN(x, y) (x < y ? x : y) |
#define | MAX(x, y) (x > y ? x : y) |
#define | FMOD(x, y) (x < y ? x : (x) - (y)) |
#define | BUF_SPACE (FMOD((control->size - control->write) + control->read - 1, control->size)) |
#define | BUF_FILLED (FMOD((control->size - control->read) + control->write, control->size)) |
#define | SEM_LOCK if (control && control->host_attached) sem.lock(); |
#define | SEM_UNLOCK if (control && control->host_attached) sem.unlock(); |
Functions |
int | circularwrite (unsigned char *dest, size_t size, const unsigned char *src, size_t start, size_t n) |
int | circularread (unsigned char *dest, const unsigned char *src, size_t size, size_t start, size_t n) |