mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-01-04 07:53:34 +01:00
1315c26099
* Add the power management functions (mostly stable even under overclock; requires some testing, but no known issue) * Add a dynamic configuration system where interfaces can declare descriptors with arbitrary endpoint numbers and additional parameters, and the driver allocates USB resources (endpoints, pipes and FIFO memory) between interfaces at startup. This allows implementations of different classes to be independent from each other. * Add responses to common SETUP requests. * Add pipe logic that allows programs to write data synchronously or asynchronously to pipes, in a single or several fragments, regardless of the buffer size (still WIP with a few details to polish and the API is not public yet). * Add a WIP bulk IN interface that allows sending data to the host. This will eventually support the fxlink protocol.
28 lines
646 B
C
28 lines
646 B
C
//---
|
|
// gint:std:endian - Endianness conversion
|
|
//---
|
|
|
|
#ifndef GINT_STD_ENDIAN
|
|
#define GINT_STD_ENDIAN
|
|
|
|
#include <gint/defs/types.h>
|
|
#include <gint/defs/attributes.h>
|
|
|
|
/* CASIO calculators are configured as big-endian. */
|
|
|
|
#define htobe16(x) (x)
|
|
#define htole16(x) (__builtin_bswap16(x))
|
|
#define be16toh(x) (x)
|
|
#define le16toh(x) (__builtin_bswap16(x))
|
|
|
|
#define htobe32(x) (x)
|
|
#define htole32(x) (__builtin_bswap32(x))
|
|
#define be32toh(x) (x)
|
|
#define le32toh(x) (__builtin_bswap32(x))
|
|
|
|
#define htobe64(x) (x)
|
|
#define htole64(x) (__builtin_bswap64(x))
|
|
#define be64toh(x) (x)
|
|
#define le64toh(x) (__builtin_bswap64(x))
|
|
|
|
#endif /* GINT_STD_ENDIAN */
|