aboutsummaryrefslogtreecommitdiffstats
path: root/src/ginput
diff options
context:
space:
mode:
Diffstat (limited to 'src/ginput')
-rw-r--r--src/ginput/ginput_dial.c26
-rw-r--r--src/ginput/ginput_dial.h18
-rw-r--r--src/ginput/ginput_driver_dial.h2
-rw-r--r--src/ginput/ginput_driver_keyboard.h16
-rw-r--r--src/ginput/ginput_driver_mouse.h8
-rw-r--r--src/ginput/ginput_keyboard.c12
-rw-r--r--src/ginput/ginput_keyboard.h4
-rw-r--r--src/ginput/ginput_keyboard_microcode.c2
-rw-r--r--src/ginput/ginput_mouse.c22
-rw-r--r--src/ginput/ginput_mouse.h8
-rw-r--r--src/ginput/ginput_toggle.c10
-rw-r--r--src/ginput/ginput_toggle.h8
12 files changed, 68 insertions, 68 deletions
diff --git a/src/ginput/ginput_dial.c b/src/ginput/ginput_dial.c
index 7763f209..375e10b1 100644
--- a/src/ginput/ginput_dial.c
+++ b/src/ginput/ginput_dial.c
@@ -21,13 +21,13 @@
static GTIMER_DECL(DialTimer);
static struct DialStatus_t {
- uint16_t sensitivity;
- uint16_t lastvalue;
- uint16_t max;
+ gU16 sensitivity;
+ gU16 lastvalue;
+ gU16 max;
} DialStatus[GINPUT_DIAL_NUM_PORTS];
// The reading callback function
-static void DialCallback(uint16_t instance, uint16_t rawvalue) {
+static void DialCallback(gU16 instance, gU16 rawvalue) {
struct DialStatus_t *pds;
GSourceListener *psl;
GEventDial *pe;
@@ -37,7 +37,7 @@ static void DialCallback(uint16_t instance, uint16_t rawvalue) {
/* Range scale - if needed */
if (pds->max != GINPUT_DIAL_MAX_VALUE)
- rawvalue = (uint16_t)((uint32_t)rawvalue * pds->max / GINPUT_DIAL_MAX_VALUE);
+ rawvalue = (gU16)((gU32)rawvalue * pds->max / GINPUT_DIAL_MAX_VALUE);
/* Forget about changes below our sensitivity threshold */
if (rawvalue >= pds->lastvalue) {
@@ -62,7 +62,7 @@ static void DialCallback(uint16_t instance, uint16_t rawvalue) {
}
}
-GSourceHandle ginputGetDial(uint16_t instance) {
+GSourceHandle ginputGetDial(gU16 instance) {
struct DialStatus_t *pds;
if (instance >= GINPUT_DIAL_NUM_PORTS)
@@ -87,21 +87,21 @@ GSourceHandle ginputGetDial(uint16_t instance) {
return (GSourceHandle)(DialStatus+instance);
}
-void ginputResetDialRange(uint16_t instance) {
+void ginputResetDialRange(gU16 instance) {
if (instance >= GINPUT_DIAL_NUM_PORTS)
return;
ginputSetDialRange(instance, GINPUT_DIAL_MAX_VALUE);
}
-uint16_t ginputGetDialRange(uint16_t instance) {
+gU16 ginputGetDialRange(gU16 instance) {
if (instance >= GINPUT_DIAL_NUM_PORTS)
return 0;
return DialStatus[instance].max;
}
-void ginputSetDialRange(uint16_t instance, uint16_t max) {
+void ginputSetDialRange(gU16 instance, gU16 max) {
struct DialStatus_t *pds;
if (instance >= GINPUT_DIAL_NUM_PORTS)
@@ -111,8 +111,8 @@ void ginputSetDialRange(uint16_t instance, uint16_t max) {
// Rescale the last value and the sensitivity
if (max != pds->max) {
- pds->lastvalue = (uint16_t)((uint32_t)pds->lastvalue * max / pds->max);
- pds->sensitivity = (uint16_t)((uint32_t)pds->sensitivity * max / pds->max);
+ pds->lastvalue = (gU16)((gU32)pds->lastvalue * max / pds->max);
+ pds->sensitivity = (gU16)((gU32)pds->sensitivity * max / pds->max);
pds->max = max;
}
}
@@ -124,7 +124,7 @@ void ginputSetDialRange(uint16_t instance, uint16_t max) {
* @param[in] instance The ID of the dial input instance
* @param[in] diff The amount of level changes
*/
-void ginputSetDialSensitivity(uint16_t instance, uint16_t diff) {
+void ginputSetDialSensitivity(gU16 instance, gU16 diff) {
if (instance >= GINPUT_DIAL_NUM_PORTS)
return;
@@ -139,7 +139,7 @@ void ginputSetDialSensitivity(uint16_t instance, uint16_t diff) {
*
* @return Returns gFalse on an error (eg invalid instance)
*/
-gBool ginputGetDialStatus(uint16_t instance, GEventDial *pdial) {
+gBool ginputGetDialStatus(gU16 instance, GEventDial *pdial) {
if (instance >= GINPUT_DIAL_NUM_PORTS)
return gFalse;
pdial->type = GEVENT_DIAL;
diff --git a/src/ginput/ginput_dial.h b/src/ginput/ginput_dial.h
index faf246c3..93c59e3c 100644
--- a/src/ginput/ginput_dial.h
+++ b/src/ginput/ginput_dial.h
@@ -35,9 +35,9 @@
typedef struct GEventDial_t {
GEventType type; // The type of this event (GEVENT_DIAL)
- uint16_t instance; // The dial instance
- uint16_t value; // The dial value
- uint16_t maxvalue; // The maximum dial value
+ gU16 instance; // The dial instance
+ gU16 value; // The dial value
+ gU16 maxvalue; // The maximum dial value
} GEventDial;
/*===========================================================================*/
@@ -51,14 +51,14 @@ typedef struct GEventDial_t {
*
* @return The soure handle of the created dial instance
*/
-GSourceHandle ginputGetDial(uint16_t instance);
+GSourceHandle ginputGetDial(gU16 instance);
/**
* @brief Reset the value back to the hardware default
*
* @param[in] instance The ID of the dial input instance
*/
-void ginputResetDialRange(uint16_t instance);
+void ginputResetDialRange(gU16 instance);
/**
* @brief Get the maximum value
@@ -68,7 +68,7 @@ void ginputResetDialRange(uint16_t instance);
*
* @return The maximum value
*/
-uint16_t ginputGetDialRange(uint16_t instance);
+gU16 ginputGetDialRange(gU16 instance);
/**
* @brief Set the maximum value
@@ -77,7 +77,7 @@ uint16_t ginputGetDialRange(uint16_t instance);
* @param[in] instance The ID of the dial input instance
* @param[in] max The maximum value to be set
*/
-void ginputSetDialRange(uint16_t instance, uint16_t max);
+void ginputSetDialRange(gU16 instance, gU16 max);
/**
* @brief Set the level change required before a dial even is generated (threshold)
@@ -86,7 +86,7 @@ void ginputSetDialRange(uint16_t instance, uint16_t max);
* @param[in] instance The ID of the dial input instance
* @param[in] diff The amount of level changes
*/
-void ginputSetDialSensitivity(uint16_t instance, uint16_t diff);
+void ginputSetDialSensitivity(gU16 instance, gU16 diff);
/**
* @brief Get the current dial status
@@ -96,7 +96,7 @@ void ginputSetDialSensitivity(uint16_t instance, uint16_t diff);
*
* @return Returns gFalse on an error (eg invalid instance)
*/
-gBool ginputGetDialStatus(uint16_t instance, GEventDial *pdial);
+gBool ginputGetDialStatus(gU16 instance, GEventDial *pdial);
#endif /* GINPUT_NEED_DIAL */
diff --git a/src/ginput/ginput_driver_dial.h b/src/ginput/ginput_driver_dial.h
index 86d90c60..ca41e7d7 100644
--- a/src/ginput/ginput_driver_dial.h
+++ b/src/ginput/ginput_driver_dial.h
@@ -21,7 +21,7 @@
#include "ginput_lld_dial_config.h"
-typedef void (*DialCallbackFn)(uint16_t instance, uint16_t rawvalue);
+typedef void (*DialCallbackFn)(gU16 instance, gU16 rawvalue);
/*===========================================================================*/
/* External declarations. */
diff --git a/src/ginput/ginput_driver_keyboard.h b/src/ginput/ginput_driver_keyboard.h
index 0d107274..84c73b9b 100644
--- a/src/ginput/ginput_driver_keyboard.h
+++ b/src/ginput/ginput_driver_keyboard.h
@@ -24,15 +24,15 @@
typedef struct GKeyboard {
GDriver d; // The driver overheads and vmt
- uint16_t cntc; // The byte count in c
- uint16_t cntsc; // The byte count in sc
+ gU16 cntc; // The byte count in c
+ gU16 cntsc; // The byte count in sc
char c[8]; // The utf8 code for the current key
char sc[8]; // The scancode for the current key
- uint32_t keystate; // The keyboard state.
- uint16_t flags;
+ gU32 keystate; // The keyboard state.
+ gU16 flags;
#define GKEYBOARD_FLG_NEEDREAD 0x0001
- uint16_t laystate; // The layout state.
- const uint8_t * pLayout; // The current keyboard layout
+ gU16 laystate; // The layout state.
+ const gU8 * pLayout; // The current keyboard layout
// Other driver specific fields may follow.
} GKeyboard;
@@ -40,10 +40,10 @@ typedef struct GKeyboardVMT {
GDriverVMT d; // Device flags are part of the general vmt
#define GKEYBOARD_VFLG_NOPOLL 0x0001 // Do not poll this device - it is purely interrupt driven
#define GKEYBOARD_VFLG_DYNAMICONLY 0x8000 // This keyboard driver should not be statically initialized eg Win32
- const uint8_t * defLayout; // The default keyboard layout
+ const gU8 * defLayout; // The default keyboard layout
gBool (*init)(GKeyboard *m, unsigned driverinstance); // Required
void (*deinit)(GKeyboard *m); // Optional
- int (*getdata)(GKeyboard *k, uint8_t *pch, int sz); // Required. Get zero or more scancode bytes. Returns the number of scancode bytes returns
+ int (*getdata)(GKeyboard *k, gU8 *pch, int sz); // Required. Get zero or more scancode bytes. Returns the number of scancode bytes returns
void (*putdata)(GKeyboard *k, char ch); // Optional. Send a single byte to the keyboard.
} GKeyboardVMT;
diff --git a/src/ginput/ginput_driver_mouse.h b/src/ginput/ginput_driver_mouse.h
index 7a0eb7fc..48d0bc60 100644
--- a/src/ginput/ginput_driver_mouse.h
+++ b/src/ginput/ginput_driver_mouse.h
@@ -24,7 +24,7 @@
typedef struct GMouseReading {
gCoord x, y, z;
- uint16_t buttons;
+ gU16 buttons;
} GMouseReading;
#if !GINPUT_TOUCH_NOCALIBRATE
@@ -41,7 +41,7 @@ typedef struct GMouseReading {
typedef struct GMouse {
GDriver d; // The driver overheads and vmt
GMouseReading r; // The current position and state
- uint16_t flags; // Flags
+ gU16 flags; // Flags
#define GMOUSE_FLG_CLICK_TIMER 0x0001 // Currently timing a click
#define GMOUSE_FLG_INDELTA 0x0002 // Currently in a up/down transition test
#define GMOUSE_FLG_CLIP 0x0004 // Clip reading to the display
@@ -88,8 +88,8 @@ typedef struct GMouseVMT {
gBool (*init)(GMouse *m, unsigned driverinstance); // Required
void (*deinit)(GMouse *m); // Optional
gBool (*get)(GMouse *m, GMouseReading *prd); // Required
- void (*calsave)(GMouse *m, const void *buf, size_t sz); // Optional
- gBool (*calload)(GMouse *m, void *buf, size_t sz); // Optional
+ void (*calsave)(GMouse *m, const void *buf, gMemSize sz); // Optional
+ gBool (*calload)(GMouse *m, void *buf, gMemSize sz); // Optional
} GMouseVMT;
#define gmvmt(m) ((const GMouseVMT const *)((m)->d.vmt))
diff --git a/src/ginput/ginput_keyboard.c b/src/ginput/ginput_keyboard.c
index e99be138..2ab84a11 100644
--- a/src/ginput/ginput_keyboard.c
+++ b/src/ginput/ginput_keyboard.c
@@ -90,7 +90,7 @@ static void SendKeyboardEvent(GKeyboard *k) {
#define FLAG_INIT 0x02
#if GKEYBOARD_LAYOUT_OFF
- static void microengine(GKeyboard *k, uint8_t code, uint8_t flags) {
+ static void microengine(GKeyboard *k, gU8 code, gU8 flags) {
if (flags)
return;
@@ -101,10 +101,10 @@ static void SendKeyboardEvent(GKeyboard *k) {
k->cntc = k->cntsc = 0;
}
#else
- static void microengine(GKeyboard *k, uint8_t code, uint8_t flags) {
- const uint8_t *pc;
- const uint8_t *nrec;
- uint8_t ver, diff, p1, p2;
+ static void microengine(GKeyboard *k, gU8 code, gU8 flags) {
+ const gU8 *pc;
+ const gU8 *nrec;
+ gU8 ver, diff, p1, p2;
#if MICROCODE_DEBUG
unsigned cnt;
#endif
@@ -446,7 +446,7 @@ static void SendKeyboardEvent(GKeyboard *k) {
static void KeyboardPoll(void *param) {
GKeyboard * k;
- uint8_t scancodes[8];
+ gU8 scancodes[8];
int sz, i;
(void) param;
diff --git a/src/ginput/ginput_keyboard.h b/src/ginput/ginput_keyboard.h
index 275bc7f5..78878f37 100644
--- a/src/ginput/ginput_keyboard.h
+++ b/src/ginput/ginput_keyboard.h
@@ -30,7 +30,7 @@
typedef struct GEventKeyboard_t {
GEventType type; // The type of this event (GEVENT_KEYBOARD)
- uint16_t bytecount; // The number of bytes in c[]. Note this will only ever represent 0 or 1 characters. This is set to 0 for state transitions.
+ gU16 bytecount; // The number of bytes in c[]. Note this will only ever represent 0 or 1 characters. This is set to 0 for state transitions.
char c[8]; // The utf8 code for the key or a special key code
// Normal characters with special meaning. They are a maximum of 1 byte in length.
#define GKEY_NULL 0
@@ -104,7 +104,7 @@ typedef struct GEventKeyboard_t {
#define GKEY_LAYOUT_FIRST 0xC0 // Special characters the layout can return start here.
#define GKEY_DRIVER_FIRST 0xE0 // Special characters the driver can return start here.
- uint32_t keystate; // The keyboard state.
+ gU32 keystate; // The keyboard state.
#define GKEYSTATE_KEYUP_BIT 0
#define GKEYSTATE_REPEAT_BIT 1
#define GKEYSTATE_SPECIAL_BIT 2
diff --git a/src/ginput/ginput_keyboard_microcode.c b/src/ginput/ginput_keyboard_microcode.c
index 7f916437..ea907373 100644
--- a/src/ginput/ginput_keyboard_microcode.c
+++ b/src/ginput/ginput_keyboard_microcode.c
@@ -20,7 +20,7 @@
#error "Keyboard Layout SCANCODE2_US is not fully implemented yet"
- uint8_t KeyboardLayout_ScancodeSet2_US[] = {
+ gU8 KeyboardLayout_ScancodeSet2_US[] = {
KMC_HEADERSTART, KMC_HEADER_ID1, KMC_HEADER_ID2, KMC_HEADER_VER_1,
KMC_RECORDSTART, 0x03, // Handle E0 codes (ignore for now assuming a single character)
diff --git a/src/ginput/ginput_mouse.c b/src/ginput/ginput_mouse.c
index 72818735..ac434f6e 100644
--- a/src/ginput/ginput_mouse.c
+++ b/src/ginput/ginput_mouse.c
@@ -245,15 +245,15 @@ static void GetMouseReading(GMouse *m) {
#if !GINPUT_TOUCH_NOTOUCH
{
const GMouseJitter *pj;
- uint32_t diff;
+ gU32 diff;
// Are we in pen or finger mode
pj = (m->flags & GMOUSE_FLG_FINGERMODE) ? &gmvmt(m)->finger_jitter : &gmvmt(m)->pen_jitter;
// Is this just movement jitter
if (pj->move > 0) {
- diff = (uint32_t)(r.x - m->r.x) * (uint32_t)(r.x - m->r.x) + (uint32_t)(r.y - m->r.y) * (uint32_t)(r.y - m->r.y);
- if (diff < (uint32_t)pj->move * (uint32_t)pj->move) {
+ diff = (gU32)(r.x - m->r.x) * (gU32)(r.x - m->r.x) + (gU32)(r.y - m->r.y) * (gU32)(r.y - m->r.y);
+ if (diff < (gU32)pj->move * (gU32)pj->move) {
r.x = m->r.x;
r.y = m->r.y;
}
@@ -261,8 +261,8 @@ static void GetMouseReading(GMouse *m) {
// Check if the click has moved outside the click area and if so cancel the click
if (pj->click > 0 && (m->flags & GMOUSE_FLG_CLICK_TIMER)) {
- diff = (uint32_t)(r.x - m->clickpos.x) * (uint32_t)(r.x - m->clickpos.x) + (uint32_t)(r.y - m->clickpos.y) * (uint32_t)(r.y - m->clickpos.y);
- if (diff > (uint32_t)pj->click * (uint32_t)pj->click)
+ diff = (gU32)(r.x - m->clickpos.x) * (gU32)(r.x - m->clickpos.x) + (gU32)(r.y - m->clickpos.y) * (gU32)(r.y - m->clickpos.y);
+ if (diff > (gU32)pj->click * (gU32)pj->click)
m->flags &= ~GMOUSE_FLG_CLICK_TIMER;
}
}
@@ -270,7 +270,7 @@ static void GetMouseReading(GMouse *m) {
// Step 5 - Click, context-click and other meta event detection
{
- uint16_t upbtns, dnbtns;
+ gU16 upbtns, dnbtns;
// Calculate button transitions
dnbtns = r.buttons & ~m->r.buttons;
@@ -461,11 +461,11 @@ static void MousePoll(void *param) {
+ c2 * ((float)points[0].x * (float)points[1].y - (float)points[1].x * (float)points[0].y)) / dx;
}
- static uint32_t CalibrateMouse(GMouse *m) {
+ static gU32 CalibrateMouse(GMouse *m) {
gCoord w, h;
gPoint cross[4]; // The locations of the test points on the display
gPoint points[4]; // The x, y readings obtained from the mouse for each test point
- uint32_t err;
+ gU32 err;
#if GDISP_NEED_TEXT
gFont font1, font2;
#endif
@@ -516,7 +516,7 @@ static void MousePoll(void *param) {
// Loop through the calibration points
for(i = 0; i < maxpoints; i++) {
- int32_t px, py;
+ gI32 px, py;
unsigned j;
// Draw the current calibration point
@@ -597,7 +597,7 @@ static void MousePoll(void *param) {
// Is this accurate enough?
err = (points[3].x - cross[3].x) * (points[3].x - cross[3].x) + (points[3].y - cross[3].y) * (points[3].y - cross[3].y);
- if (err > (uint32_t)pj->calibrate * (uint32_t)pj->calibrate) {
+ if (err > (gU32)pj->calibrate * (gU32)pj->calibrate) {
#if GDISP_NEED_TEXT
// No - Display error and return
gdispGFillStringBox(m->display,
@@ -803,7 +803,7 @@ gBool ginputGetMouseStatus(unsigned instance, GEventMouse *pe) {
#endif
#if !GINPUT_TOUCH_NOCALIBRATE_GUI
- uint32_t ginputCalibrateMouse(unsigned instance) {
+ gU32 ginputCalibrateMouse(unsigned instance) {
GMouse *m;
// Find the instance
diff --git a/src/ginput/ginput_mouse.h b/src/ginput/ginput_mouse.h
index 65c9243b..2e8f2f77 100644
--- a/src/ginput/ginput_mouse.h
+++ b/src/ginput/ginput_mouse.h
@@ -36,7 +36,7 @@ typedef struct GEventMouse_t {
gCoord x, y, z; // The position of the mouse.
// - For touch devices, Z is the current pressure if supported (values are device specific)
// - For mice, Z is the 3rd dimension if supported (values are device specific)
- uint16_t buttons; // A bit is set if the button is down or a meta event has occurred.
+ gU16 buttons; // A bit is set if the button is down or a meta event has occurred.
#define GINPUT_MOUSE_BTN_MASK 0x000F // The "button is down" mask
#define GINPUT_MOUSE_BTN_LEFT 0x0001 // The left mouse button is currently down
#define GINPUT_MOUSE_BTN_RIGHT 0x0002 // The right mouse button is currently down
@@ -145,7 +145,7 @@ gBool ginputGetMouseStatus(unsigned instance, GEventMouse *pmouse);
* @return The calibration error squared if calibration fails, or 0 on success or if the driver dosen't need calibration.
* @note An invalid instance will also return 0.
*/
-uint32_t ginputCalibrateMouse(unsigned instance);
+gU32 ginputCalibrateMouse(unsigned instance);
/**
* @brief Load a set of mouse calibration data
@@ -159,7 +159,7 @@ uint32_t ginputCalibrateMouse(unsigned instance);
* called if GINPUT_TOUCH_USER_CALIBRATION_LOAD has been set to GFXON in the
* users gfxconf.h file.
*/
-gBool LoadMouseCalibration(unsigned instance, void *data, size_t sz);
+gBool LoadMouseCalibration(unsigned instance, void *data, gMemSize sz);
/**
* @brief Save a set of mouse calibration data
@@ -173,7 +173,7 @@ gBool LoadMouseCalibration(unsigned instance, void *data, size_t sz);
* called if GINPUT_TOUCH_USER_CALIBRATION_SAVE has been set to GFXON in the
* users gfxconf.h file.
*/
-gBool SaveMouseCalibration(unsigned instance, const void *data, size_t sz);
+gBool SaveMouseCalibration(unsigned instance, const void *data, gMemSize sz);
#endif /* GINPUT_NEED_MOUSE */
diff --git a/src/ginput/ginput_toggle.c b/src/ginput/ginput_toggle.c
index 09681d24..1040a6f8 100644
--- a/src/ginput/ginput_toggle.c
+++ b/src/ginput/ginput_toggle.c
@@ -24,7 +24,7 @@
static GTIMER_DECL(ToggleTimer);
static struct GEventToggleStatus_t {
- uint8_t status;
+ gU8 status;
} ToggleStatus[GINPUT_TOGGLE_NUM_PORTS];
// Our polling function
@@ -35,7 +35,7 @@ static void TogglePoll(void *param) {
GSourceListener *psl;
GEventToggle *pe;
unsigned i, bits, mask;
- uint8_t state;
+ gU8 state;
// Loop while there are bits to get
for(ptc = GInputToggleConfigTable, i=0; i < GINPUT_TOGGLE_NUM_PORTS; ptc++) {
@@ -92,7 +92,7 @@ static void TogglePoll(void *param) {
}
/* Hardware Toggle/Switch/Button Functions */
-GSourceHandle ginputGetToggle(uint16_t instance) {
+GSourceHandle ginputGetToggle(gU16 instance) {
const GToggleConfig *ptc;
if (instance >= GINPUT_TOGGLE_NUM_PORTS)
@@ -110,7 +110,7 @@ GSourceHandle ginputGetToggle(uint16_t instance) {
}
// If invert is true, invert the on/off sense for the toggle
-void ginputInvertToggle(uint16_t instance, gBool invert) {
+void ginputInvertToggle(gU16 instance, gBool invert) {
if (instance >= GINPUT_TOGGLE_NUM_PORTS)
return;
if (invert) {
@@ -129,7 +129,7 @@ void ginputInvertToggle(uint16_t instance, gBool invert) {
/* Get the current toggle status.
* Returns gFalse on error (eg invalid instance)
*/
-gBool ginputGetToggleStatus(uint16_t instance, GEventToggle *ptoggle) {
+gBool ginputGetToggleStatus(gU16 instance, GEventToggle *ptoggle) {
// Win32 threads don't seem to recognise priority and/or pre-emption
// so we add a sleep here to prevent 100% polled applications from locking up.
gfxSleepMilliseconds(1);
diff --git a/src/ginput/ginput_toggle.h b/src/ginput/ginput_toggle.h
index d8f76029..94699ced 100644
--- a/src/ginput/ginput_toggle.h
+++ b/src/ginput/ginput_toggle.h
@@ -47,7 +47,7 @@
typedef struct GEventToggle_t {
GEventType type; // The type of this event (GEVENT_TOGGLE)
- uint16_t instance; // The toggle instance
+ gU16 instance; // The toggle instance
gBool on; // True if the toggle/button is on
} GEventToggle;
@@ -66,7 +66,7 @@ typedef struct GEventToggle_t {
*
* @return The source handle of the created instance
*/
-GSourceHandle ginputGetToggle(uint16_t instance);
+GSourceHandle ginputGetToggle(gU16 instance);
/**
* @brief Can be used to invert the sense of a toggle
@@ -74,7 +74,7 @@ GSourceHandle ginputGetToggle(uint16_t instance);
* @param[in] instance The ID of the toggle input instance
* @param[in] invert If gTrue, will be inverted
*/
-void ginputInvertToggle(uint16_t instance, gBool invert);
+void ginputInvertToggle(gU16 instance, gBool invert);
/**
* @brief Get the current toggle status
@@ -84,7 +84,7 @@ void ginputInvertToggle(uint16_t instance, gBool invert);
*
* @return Returns gFalse on an error (eg invalid instance)
*/
-gBool ginputGetToggleStatus(uint16_t instance, GEventToggle *ptoggle);
+gBool ginputGetToggleStatus(gU16 instance, GEventToggle *ptoggle);
#endif /* GINPUT_NEED_TOGGLE */