You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
820 B
34 lines
820 B
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <driver/gpio.h>
|
|
#include <driver/adc.h>
|
|
|
|
typedef struct
|
|
{
|
|
uint16_t a : 1;
|
|
uint16_t b : 1;
|
|
uint16_t volume : 1;
|
|
uint16_t menu : 1;
|
|
uint16_t select : 1;
|
|
uint16_t start : 1;
|
|
uint16_t left : 1;
|
|
uint16_t right : 1;
|
|
uint16_t up : 1;
|
|
uint16_t down : 1;
|
|
} Odroid_Input;
|
|
|
|
void Odroid_InitializeInput(void);
|
|
Odroid_Input Odroid_PollInput(void);
|
|
void Odroid_PrintInputState(Odroid_Input* input);
|
|
int Odroid_HasAnyInput(Odroid_Input* input);
|
|
|
|
extern const gpio_num_t BUTTON_PIN_A;
|
|
extern const gpio_num_t BUTTON_PIN_B;
|
|
extern const gpio_num_t BUTTON_PIN_START;
|
|
extern const gpio_num_t BUTTON_PIN_SELECT;
|
|
extern const gpio_num_t BUTTON_PIN_VOLUME;
|
|
extern const gpio_num_t BUTTON_PIN_MENU;
|
|
extern const adc1_channel_t DPAD_PIN_X_AXIS;
|
|
extern const adc1_channel_t DPAD_PIN_Y_AXIS;
|
|
|