Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Joystick interface (5-way)

A 5-way joystick (left, right, up, down, press) interface using 5 GPIOs.

Functions

static __always_inline int is_joystick_down (void)
 This function test it the joystick is down. More...
 
static __always_inline int is_joystick_left (void)
 This function test it the joystick is on the left. More...
 
static __always_inline int is_joystick_pressed (void)
 This function test it the joystick is pressed. More...
 
static __always_inline int is_joystick_right (void)
 This function test it the joystick is on the right. More...
 
static __always_inline int is_joystick_up (void)
 This function test it the joystick is up. More...
 

static __always_inline int is_joystick_down ( void  )
static

This function test it the joystick is down.

Returns
true if the joystick is down, otherwise 0.

References gpio_get_pin_value().

Referenced by device_cdc_task().

static __always_inline int is_joystick_left ( void  )
static

This function test it the joystick is on the left.

Returns
true if the joystick is on the left, otherwise 0.

References gpio_get_pin_value().

Referenced by device_cdc_task().

static __always_inline int is_joystick_pressed ( void  )
static

This function test it the joystick is pressed.

Returns
true if the joystick is pressed, otherwise 0.

References gpio_get_pin_value().

Referenced by device_cdc_task().

static __always_inline int is_joystick_right ( void  )
static

This function test it the joystick is on the right.

Returns
true if the joystick is on the right, otherwise 0.

References gpio_get_pin_value().

Referenced by device_cdc_task().

static __always_inline int is_joystick_up ( void  )
static

This function test it the joystick is up.

Returns
true if the joystick is up, otherwise 0.

References gpio_get_pin_value().

Referenced by device_cdc_task().