2020-10-02 06:44:05 +00:00
|
|
|
#include "main.h"
|
2020-10-26 07:16:54 +00:00
|
|
|
#include "flipper_v2.h"
|
2020-10-02 06:44:05 +00:00
|
|
|
|
|
|
|
#define DEBOUNCE_TICKS 10
|
|
|
|
|
2020-11-06 08:31:59 +00:00
|
|
|
const GpioPin input_gpio[GPIO_INPUT_PINS_COUNT] = {
|
2020-10-02 06:44:05 +00:00
|
|
|
{BUTTON_UP_GPIO_Port, BUTTON_UP_Pin},
|
|
|
|
{BUTTON_DOWN_GPIO_Port, BUTTON_DOWN_Pin},
|
|
|
|
{BUTTON_RIGHT_GPIO_Port, BUTTON_RIGHT_Pin},
|
|
|
|
{BUTTON_LEFT_GPIO_Port, BUTTON_LEFT_Pin},
|
|
|
|
{BUTTON_OK_GPIO_Port, BUTTON_OK_Pin},
|
|
|
|
{BUTTON_BACK_GPIO_Port, BUTTON_BACK_Pin},
|
2020-11-06 08:31:59 +00:00
|
|
|
{CHRG_GPIO_Port, CHRG_Pin}};
|
2020-10-02 06:44:05 +00:00
|
|
|
|
2020-11-06 08:31:59 +00:00
|
|
|
const bool input_invert[GPIO_INPUT_PINS_COUNT] = {
|
2020-10-02 06:44:05 +00:00
|
|
|
false, // {BUTTON_UP_GPIO_Port, BUTTON_UP_Pin},
|
|
|
|
false, // {BUTTON_DOWN_GPIO_Port, BUTTON_DOWN_Pin},
|
|
|
|
false, // {BUTTON_RIGHT_GPIO_Port, BUTTON_RIGHT_Pin},
|
|
|
|
false, // {BUTTON_LEFT_GPIO_Port, BUTTON_LEFT_Pin},
|
|
|
|
false, // {BUTTON_OK_GPIO_Port, BUTTON_OK_Pin},
|
|
|
|
false, // {BUTTON_BACK_GPIO_Port, BUTTON_BACK_Pin},
|
|
|
|
true, // {CHRG_GPIO_Port, CHRG_Pin}
|
|
|
|
};
|
|
|
|
|
2020-11-06 08:31:59 +00:00
|
|
|
const GpioPin led_gpio[3] = {
|
|
|
|
{LED_RED_GPIO_Port, LED_RED_Pin},
|
|
|
|
{LED_GREEN_GPIO_Port, LED_GREEN_Pin},
|
|
|
|
{LED_BLUE_GPIO_Port, LED_BLUE_Pin}};
|
|
|
|
|
2020-11-12 19:26:49 +00:00
|
|
|
const GpioPin backlight_gpio = {DISPLAY_BACKLIGHT_GPIO_Port, DISPLAY_BACKLIGHT_Pin};
|
|
|
|
const GpioPin vibro_gpio = {VIBRO_GPIO_Port, VIBRO_Pin};
|
2020-11-16 21:39:48 +00:00
|
|
|
const GpioPin ibutton_gpio = {iButton_GPIO_Port, iButton_Pin};
|