24 lines
717 B
C
24 lines
717 B
C
|
#ifndef __TOUCHPAD_H_
|
|||
|
#define __TOUCHPAD_H_
|
|||
|
|
|||
|
#include "stm32h7xx.h"
|
|||
|
|
|||
|
/******************** TPAD <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ò<EFBFBD><C3B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> **************************/
|
|||
|
#define TPAD_TIMx TIM2
|
|||
|
#define TPAD_TIM_CLK_ENABLE() __TIM2_CLK_ENABLE()
|
|||
|
#define TPAD_TIM_Channel_X TIM_CHANNEL_1
|
|||
|
|
|||
|
//<2F><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ͨ<EFBFBD><CDA8><EFBFBD><EFBFBD><EFBFBD>ų<EFBFBD>ʼ<EFBFBD><CABC>
|
|||
|
#define TPAD_TIM_GPIO_CLK_ENABLE() __GPIOA_CLK_ENABLE()
|
|||
|
#define TPAD_TIM_CH_PORT GPIOA
|
|||
|
#define TPAD_TIM_CH_PIN GPIO_PIN_5
|
|||
|
#define TPAD_TIMx_AF GPIO_AF1_TIM2
|
|||
|
|
|||
|
/************************** TPAD <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>********************************/
|
|||
|
uint8_t TPAD_Init(void);
|
|||
|
uint8_t TPAD_Scan(uint8_t mode);
|
|||
|
|
|||
|
|
|||
|
#endif /* __TOUCHPAD_H_ */
|
|||
|
|