mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
eb8cb8d22e
1. add libphy.a librtc.a, but store in bt submodule, if someone use them, please copy to esp32/lib/ instead the origin one 2. add 07_blufi demo 3. change esp32/Kconfig to allow bt/wifi coexist
63 lines
1.1 KiB
C
63 lines
1.1 KiB
C
/**
|
|
****************************************************************************************
|
|
*
|
|
* @file app_button.h
|
|
*
|
|
* @brief button Service Application entry point
|
|
*
|
|
* Copyright (C) ESPRESSIF 2016
|
|
* Created by Yulong at 2016/02/24
|
|
*
|
|
*
|
|
****************************************************************************************
|
|
*/
|
|
|
|
/*
|
|
* DEFINES
|
|
****************************************************************************************
|
|
*/
|
|
#define BUTTON_HEAD (0x01)
|
|
#define BUTTON_PRESS_EVT (0x10)
|
|
|
|
//the key value enum
|
|
enum
|
|
{
|
|
Button_Up = 0x01,
|
|
Button_Voice = 0x02,
|
|
Button_OK = 0x04,
|
|
Button_Down = 0x08,
|
|
Button_Back = 0x10,
|
|
};
|
|
|
|
|
|
typedef struct {
|
|
uint8_t key_val; //button val
|
|
uint8_t head; //the head of the frame
|
|
}key_frame;
|
|
|
|
|
|
typedef struct
|
|
{
|
|
bool button_press;
|
|
key_frame key_msg;
|
|
}app_key_env;
|
|
|
|
|
|
|
|
extern app_key_env key_press;
|
|
|
|
/*
|
|
* FUNCTIONS DECLARATION
|
|
****************************************************************************************
|
|
*/
|
|
|
|
void app_button_init(void);
|
|
|
|
void GPIO_isr_callback(void* arg);
|
|
|
|
uint8_t check_sum(uint8_t *check_array,uint8_t len);
|
|
|
|
|
|
|
|
|