Go to the source code of this file.
Classes | |
struct | FunctionWrapper |
Functions | |
_PRIVATE void | handle_polling (void) |
JOYSTICK_Error | JOYSTICK_Init (void) |
Initializes the joystick peripheral with the given options. | |
void | JOYSTICK_Deinit (void) |
Deinitializes the joystick, by removing all functions associated with the actions, and removing the polling job from the RIT. | |
void | JOYSTICK_EnableAction (JOYSTICK_Action action) |
Enables the specified action, thus enabling the binding with the associated functionality, if set. | |
void | JOYSTICK_DisableAction (JOYSTICK_Action action) |
Disables the specific action, and disables the binding with its functionality, without un-binding it completely. | |
void | JOYSTICK_SetFunction (JOYSTICK_Action action, JOYSTICK_Function function) |
Sets a functionality for the given action. | |
void | JOYSTICK_UnsetFunction (JOYSTICK_Action action) |
Unsets a functionality for the given action, if previously set. | |
Variables | |
_PRIVATE FunctionWrapper | functions [JOY_ACTION_COUNT] = {0} |
Array of function pointers containing the hanlder for each joystick function. | |
_PRIVATE void handle_polling | ( | void | ) |
Definition at line 18 of file joystick.c.
void JOYSTICK_Deinit | ( | void | ) |
Deinitializes the joystick, by removing all functions associated with the actions, and removing the polling job from the RIT.
Definition at line 58 of file joystick.c.
void JOYSTICK_DisableAction | ( | JOYSTICK_Action | action | ) |
Disables the specific action, and disables the binding with its functionality, without un-binding it completely.
action | The action to disable. |
Definition at line 86 of file joystick.c.
void JOYSTICK_EnableAction | ( | JOYSTICK_Action | action | ) |
Enables the specified action, thus enabling the binding with the associated functionality, if set.
action | The action to enable. |
Definition at line 65 of file joystick.c.
JOYSTICK_Error JOYSTICK_Init | ( | void | ) |
Initializes the joystick peripheral with the given options.
options | Joystick options from the JOYSTICK_Config enum |
Definition at line 41 of file joystick.c.
void JOYSTICK_SetFunction | ( | JOYSTICK_Action | action, |
JOYSTICK_Function | function | ||
) |
Sets a functionality for the given action.
action | The action associated to the functionality |
function | The functionality. |
Definition at line 107 of file joystick.c.
void JOYSTICK_UnsetFunction | ( | JOYSTICK_Action | action | ) |
Unsets a functionality for the given action, if previously set.
action | The action to un-bind. |
Definition at line 115 of file joystick.c.
_PRIVATE FunctionWrapper functions[JOY_ACTION_COUNT] = {0} |
Array of function pointers containing the hanlder for each joystick function.
Definition at line 14 of file joystick.c.