RMUL2025/User/device/joystick.h
2025-03-09 18:04:03 +08:00

28 lines
747 B
C

#pragma once
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ----------------------------------------------------------------- */
/* Exported constants ------------------------------------------------------- */
/* Exported macro ----------------------------------------------------------- */
/* Exported types ----------------------------------------------------------- */
typedef enum {
JOYSTICK_UP,
JOYSTICK_DOWN,
JOYSTICK_LEFT,
JOYSTICK_RIGHT,
JOYSTICK_PRESSED,
JOYSTICK_MID,
} Joystick_Status_t;
/* Exported functions prototypes -------------------------------------------- */
uint8_t Joystick_Update(Joystick_Status_t *val);
uint8_t Joystick_WaitInput(void);
uint8_t Joystick_WaitNoInput(void);
#ifdef __cplusplus
}
#endif