Joystick#
Enumerations#
Enumeration for finding the position of Joystick.
Enumeration for Joystick state (ENABLE / DISABLE) enum.
Functions#
sl_status_t sl_si91x_joystick_init(void) Initialize Joystick.
sl_status_t sl_si91x_joystick_get_position(sl_joystick_state_t state, sl_joystick_position_t *pos) Getting the direction of Joystick.
sl_status_t sl_si91x_joystick_start(sl_joystick_state_t state) Start/Enable the Joystick.
sl_status_t sl_si91x_joystick_stop(sl_joystick_state_t state) Stop/Disable the Joystick.
Enumeration Documentation#
sl_joystick_position_t#
sl_joystick_position_t
Enumeration for finding the position of Joystick.
Enumerator | |
---|---|
SL_JOYSTICK_NONE | Not pressed. |
SL_JOYSTICK_C | Center. |
SL_JOYSTICK_N | North. |
SL_JOYSTICK_E | East. |
SL_JOYSTICK_S | South. |
SL_JOYSTICK_W | West. |
58
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/sl_joystick/inc/sl_si91x_joystick.h
sl_joystick_state_t#
sl_joystick_state_t
Enumeration for Joystick state (ENABLE / DISABLE) enum.
Enumerator | |
---|---|
SL_JOYSTICK_DISABLED | Joystick data acquisition is disabled. |
SL_JOYSTICK_ENABLED | Joystick data acquisition is enabled. |
68
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/sl_joystick/inc/sl_si91x_joystick.h
Function Documentation#
sl_si91x_joystick_init#
sl_status_t sl_si91x_joystick_init (void )
sl_status_t sl_si91x_joystick_init(void) Initialize Joystick.
[in] |
Returns
status 0 if successful, SL_STATUS_OK (0x0000) - Success
85
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/sl_joystick/inc/sl_si91x_joystick.h
sl_si91x_joystick_get_position#
sl_status_t sl_si91x_joystick_get_position (sl_joystick_state_t state, sl_joystick_position_t * pos)
sl_status_t sl_si91x_joystick_get_position(sl_joystick_state_t state, sl_joystick_position_t *pos) Getting the direction of Joystick.
[in] | state | : Joystick enable/disable |
[in] | pos | : position of joystick. |
Pre-conditions:
Returns
status 0 if successful, else error code as follow:
SL_STATUS_OK (0x0000) - Success
SL_STATUS_NOT_READY (0x0003) - Module is not ready for requested operation.
104
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/sl_joystick/inc/sl_si91x_joystick.h
sl_si91x_joystick_start#
sl_status_t sl_si91x_joystick_start (sl_joystick_state_t state)
sl_status_t sl_si91x_joystick_start(sl_joystick_state_t state) Start/Enable the Joystick.
[in] | state | : Joystick enable/disable. |
Pre-conditions:
Returns
status 0 if successful, else error code as follow:
SL_STATUS_OK (0x0000) - Success
SL_STATUS_ABORT (0x0006) - Operation aborted.
121
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/sl_joystick/inc/sl_si91x_joystick.h
sl_si91x_joystick_stop#
sl_status_t sl_si91x_joystick_stop (sl_joystick_state_t state)
sl_status_t sl_si91x_joystick_stop(sl_joystick_state_t state) Stop/Disable the Joystick.
[in] | state | : Joystick enable/disable. |
Pre-conditions:
Returns
status 0 if successful, else error code SL_STATUS_OK (0x0000) - Success
SL_STATUS_BUSY (0x0004) - Module is busy.
140
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/sl_joystick/inc/sl_si91x_joystick.h