mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-04-19 09:26:54 +02:00
The new keyboard device (keydev) interface implements the kernel's view of a keyboard providing input events. Its main role is to abstract all the globals of the KEYSC driver and getkey functions into a separate object: the "keyboard device". The device implements event transformations such as modifiers and repeats, instead of leaving them to getkey. While this can seem surprising at first, a real keyboard controller is responsible for repeats and modifier actions depend on the state of the keyboard which is only tracked in real-time. In this commit, getkey() has not changed yet apart from indirectly using the keydev interface with pollevent(). It will be changed soon to use event transforms in keydev_read(), and will be left in charge of providing repeat profiles, handling return-to-menu, backlight changes and timeouts, all of which are user convenience features.
46 lines
1.6 KiB
C
46 lines
1.6 KiB
C
//---
|
|
// gint:defs:attributes - Macros for compiler-specific attributes
|
|
//---
|
|
|
|
#ifndef GINT_DEFS_ATTRIBUTES
|
|
#define GINT_DEFS_ATTRIBUTES
|
|
|
|
/* Objects from specific sections */
|
|
#define GSECTION(x) __attribute__((section(x)))
|
|
/* Objects from the gint's uninitialized BSS section */
|
|
#define GBSS __attribute__((section(".gint.bss")))
|
|
/* Additional sections that are only needed on SH3 */
|
|
#define GDATA3 __attribute__((section(".gint.data.sh3")))
|
|
#define GBSS3 __attribute__((section(".gint.bss.sh3")))
|
|
/* Objects for the ILRAM, XRAM and YRAM regions */
|
|
#define GILRAM __attribute__((section(".ilram")))
|
|
#define GXRAM __attribute__((section(".xram")))
|
|
#define GYRAM __attribute__((section(".yram")))
|
|
|
|
/* Unused parameters or variables */
|
|
#define GUNUSED __attribute__((unused))
|
|
/* Functions that *must* be inlined */
|
|
#define GINLINE __attribute__((always_inline)) inline
|
|
|
|
/* Aligned variables */
|
|
#define GALIGNED(x) __attribute__((aligned(x)))
|
|
/* Packed structures. I require explicit alignment because if it's unspecified,
|
|
GCC cannot optimize access size, and reads to memory-mapped I/O with invalid
|
|
access sizes silently fail - honestly you don't want this to happen */
|
|
#define GPACKED(x) __attribute__((packed, aligned(x)))
|
|
/* Packed enumerations */
|
|
#define GPACKEDENUM __attribute__((packed))
|
|
/* Transparent unions */
|
|
#define GTRANSPARENT __attribute__((transparent_union))
|
|
|
|
/* Weak symbols */
|
|
#define GWEAK __attribute__((weak))
|
|
|
|
/* Constructors */
|
|
#define GCONSTRUCTOR __attribute__((constructor))
|
|
#define GDESTRUCTOR __attribute__((destructor))
|
|
|
|
/* Functions that do not return */
|
|
#define GNORETURN __attribute__((noreturn))
|
|
|
|
#endif /* GINT_DEFS_ATTRIBUTES */
|