mirror of
https://github.com/m5stack/StackChan.git
synced 2026-05-20 11:49:45 -07:00
34 lines
519 B
C
34 lines
519 B
C
/*
|
|
* SPDX-FileCopyrightText: 2026 M5Stack Technology CO LTD
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
#ifndef _JOYSTICK_BASIC_H_
|
|
#define _JOYSTICK_BASIC_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct {
|
|
int channel;
|
|
int id;
|
|
int8_t bat;
|
|
uint16_t joyX;
|
|
uint16_t joyY;
|
|
uint8_t screen_mode;
|
|
uint8_t select_mode;
|
|
bool btnB_status;
|
|
float accel_x;
|
|
float accel_y;
|
|
float accel_z;
|
|
|
|
} joystick_data_t;
|
|
|
|
extern joystick_data_t joystick_data;
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif |