下半区传感器接线方式修改,屏幕安装点过低或过高,按压上半区或下半区屏幕会造成误触发,未能得到解决
This commit is contained in:
@@ -517,13 +517,43 @@ static void GPIO_Config(void)
|
||||
PORT_Init(LEFTLOW_CS1237_SCLK_PORTx, LEFTLOW_CS1237_SCLK_PINx, &stcPortInit);
|
||||
PORT_Init(RIGHTUP_CS1237_SCLK_PORTx, RIGHTUP_CS1237_SCLK_PINx, &stcPortInit);
|
||||
PORT_Init(RIGHTLOW_CS1237_SCLK_PORTx, RIGHTLOW_CS1237_SCLK_PINx, &stcPortInit);
|
||||
PORT_Init(BUZZER_PORTx, BUZZER_PINx, &stcPortInit);
|
||||
PORT_Init(LED_GREEN_PORTx, LED_GREEN_PINx, &stcPortInit);
|
||||
PORT_Init(LED_RED_PORTx, LED_RED_PINx, &stcPortInit);
|
||||
LED_GREEN_OFF();
|
||||
LED_RED_OFF();
|
||||
|
||||
stcPortInit.enPullUp = Enable;//上拉
|
||||
}
|
||||
void Bit0AndBit1_OUT(void)
|
||||
{
|
||||
stc_port_init_t stcPortInit;
|
||||
MEM_ZERO_STRUCT(stcPortInit);
|
||||
|
||||
/********************************** GPIO输出 ****************************************/
|
||||
stcPortInit.enPinMode = Pin_Mode_Out;
|
||||
stcPortInit.enPinOType = Pin_OType_Cmos;
|
||||
stcPortInit.enPinDrv = Pin_Drv_H;
|
||||
stcPortInit.enPullUp = Disable;//无上拉
|
||||
|
||||
stcPortInit.enPullUp = Enable;//上拉
|
||||
PORT_Init(TWIN_BIT0_PORTx, TWIN_BIT0_PINx, &stcPortInit);
|
||||
PORT_Init(TWIN_BIT1_PORTx, TWIN_BIT1_PINx, &stcPortInit);
|
||||
SET_TWIN_BIT0();
|
||||
SET_TWIN_BIT1();
|
||||
}
|
||||
void Bit0AndBit1_IN(void)
|
||||
{
|
||||
stc_port_init_t stcPortInit;
|
||||
MEM_ZERO_STRUCT(stcPortInit);
|
||||
|
||||
/********************************** GPIO输入 ****************************************/
|
||||
stcPortInit.enPinMode = Pin_Mode_In;
|
||||
stcPortInit.enPullUp = Disable;//无上拉
|
||||
|
||||
PORT_Init(TWIN_BIT0_PORTx, TWIN_BIT0_PINx, &stcPortInit);
|
||||
PORT_Init(TWIN_BIT1_PORTx, TWIN_BIT1_PINx, &stcPortInit);
|
||||
}
|
||||
/*********************************左上传感器
|
||||
*******************************************************************************
|
||||
** \brief ExtInt00 callback function
|
||||
@@ -1429,6 +1459,7 @@ void BSP_Init(void)
|
||||
ExtiCh01_Init();
|
||||
ExtiCh06_Init();
|
||||
ExtiCh04_Init();
|
||||
Bit0AndBit1_OUT();
|
||||
|
||||
DbgUart_Config(700000);
|
||||
#if(USE_USART3 == 1)
|
||||
|
||||
Reference in New Issue
Block a user