Clear input queued while Pi was off
This commit is contained in:
parent
8a9548305f
commit
e9a2869985
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#define VERSION_MAJOR 3
|
||||
#define VERSION_MINOR 7
|
||||
#define VERSION_MINOR 8
|
||||
|
||||
#define KEY_FIFO_SIZE 31 // number of keys in the public FIFO
|
||||
|
|
4
app/pi.c
4
app/pi.c
|
@ -3,6 +3,7 @@
|
|||
#include "keyboard.h"
|
||||
#include "gpioexp.h"
|
||||
#include "backlight.h"
|
||||
#include "fifo.h"
|
||||
#include "hardware/adc.h"
|
||||
#include <hardware/pwm.h>
|
||||
|
||||
|
@ -57,6 +58,9 @@ void pi_power_on(enum power_on_reason reason)
|
|||
gpio_put(PIN_PI_PWR, 1);
|
||||
g_pi_state = PI_STATE_ON;
|
||||
|
||||
// Clear any input queued while Pi was off
|
||||
fifo_flush();
|
||||
|
||||
// LED green while booting until driver loaded
|
||||
state.setting = LED_SET_ON;
|
||||
state.r = 0;
|
||||
|
|
Loading…
Reference in New Issue