mirror of
https://github.com/RfidResearchGroup/ChameleonUltra.git
synced 2026-05-12 11:22:59 -07:00
Update app_main.c
This commit is contained in:
@@ -179,8 +179,8 @@ static void field_generator_rainbow_loop(void) {
|
||||
*/
|
||||
static void button_pin_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action) {
|
||||
device_mode_t mode = get_device_mode();
|
||||
// Temporarily allow only the analog card mode to respond to button operations
|
||||
if (mode == DEVICE_MODE_TAG) {
|
||||
// Allow button operations in both tag and reader mode
|
||||
if (mode == DEVICE_MODE_TAG || mode == DEVICE_MODE_READER) {
|
||||
static nrf_drv_gpiote_pin_t pin_static; // Use static internal variables to store the GPIO where the current event occurred
|
||||
pin_static = pin; // Cache the button that currently triggers the event into an internal variable
|
||||
app_timer_start(m_button_check_timer, APP_TIMER_TICKS(50), &pin_static); // Start timer anti-shake
|
||||
|
||||
Reference in New Issue
Block a user