Files

36 lines
598 B
C++
Raw Permalink Normal View History

2024-12-24 10:45:27 +08:00
#include "M5Unified.h"
#include "app_button_c_api.h"
2024-12-25 15:31:02 +08:00
extern "C" uint8_t is_button_a_press(void);
uint8_t is_button_a_press(void)
2024-12-24 10:45:27 +08:00
{
if (M5.BtnA.isPressed()){
return 1;
}
else {
return 0;
}
}
2024-12-25 15:31:02 +08:00
extern "C" uint8_t is_button_b_press(void);
uint8_t is_button_b_press(void)
{
if (M5.BtnB.isPressed()){
return 1;
}
else {
return 0;
}
}
extern "C" uint8_t is_button_c_press(void);
uint8_t is_button_c_press(void)
{
if (M5.BtnC.isPressed()){
return 1;
}
else {
return 0;
}
}