32 lines
803 B
C
32 lines
803 B
C
/*
|
|
* @Description:
|
|
* @Version: 1.0
|
|
* @Autor: lzc
|
|
* @Date: 2022-09-02 08:59:57
|
|
* @LastEditors: lzc
|
|
* @LastEditTime: 2022-11-14 10:27:46
|
|
*/
|
|
#ifndef __KEY_H
|
|
#define __KEY_H
|
|
#include "sys.h"
|
|
|
|
/*下面的方式是通过直接操作库函数方式读取IO*/
|
|
#define KEY_CAL GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_10) // PB10
|
|
#define KEY_WPS GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_11) // PB11
|
|
|
|
/*下面方式是通过位带操作方式读取IO*/
|
|
/*
|
|
#define KEY_CAL PEin(10) //PB10
|
|
#define KEY_WPS PEin(11) //PB11
|
|
*/
|
|
|
|
extern uint16_t timer_key; // 判断配网按键长按
|
|
extern uint16_t timer_opm_key; // 判断校准按键长按
|
|
extern char opm_cal_flag;
|
|
extern char NetworkConnectionWay;
|
|
extern float Optical_Calibration_Value; //
|
|
|
|
void network_ready(void);
|
|
void opm_cal_ready(void);
|
|
#endif
|