提交 4200e831 作者: wysheng

整理IO口,修复两处错误:AB枪电子锁(AB枪反了),A枪(12V/24V)切换IO错误(占用了K3K4继电器控制)

上级 e360e1d9
...@@ -469,6 +469,8 @@ EnumSwitchStatus DcOutGet_B(void) ...@@ -469,6 +469,8 @@ EnumSwitchStatus DcOutGet_B(void)
return eSwSta_Off; return eSwSta_Off;
} }
*/ */
//B枪BMS供电 12V/24V 切换
void DrainResistInit_B(void) void DrainResistInit_B(void)
{ {
GPIO_InitTypeDef GPIO_InitStructure; GPIO_InitTypeDef GPIO_InitStructure;
...@@ -1108,3 +1110,38 @@ EnumSwitchStatus GunStatusGet_B(void) ...@@ -1108,3 +1110,38 @@ EnumSwitchStatus GunStatusGet_B(void)
void DCModuleRelayChkInit(void)
{
GPIO_InitTypeDef GPIO_InitStructure;
//K1-K4 --> MP5 --> JCQ_OUT3 --> PE2
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStructure.GPIO_Pin = K1K4OutChk_Pin;
RCC_AHB1PeriphClockCmd(K1K4OutChk_RCC, ENABLE);
GPIO_Init(K1K4OutChk_Port, &GPIO_InitStructure);
GPIO_ResetBits(K1K4OutChk_Port, K1K4OutChk_Pin);
//K7-K10 --> MP7 --> JCQ_OUT1 --> PE0
//GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
//GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
//GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
//GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStructure.GPIO_Pin = K7K10OutChk_Pin;
RCC_AHB1PeriphClockCmd(K7K10OutChk_RCC, ENABLE);
GPIO_Init(K7K10OutChk_Port, &GPIO_InitStructure);
GPIO_ResetBits(K7K10OutChk_Port, K7K10OutChk_Pin);
//K5-K6 --> MP8 --> S_STOP2 --> PD4
//GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
//GPIO_InitStructure.GPIO_Speed = GPIO_Speed_100MHz;
//GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
//GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStructure.GPIO_Pin = K5K6OutChk_Pin;
RCC_AHB1PeriphClockCmd(K5K6OutChk_RCC, ENABLE);
GPIO_Init(K5K6OutChk_Port, &GPIO_InitStructure);
GPIO_ResetBits(K5K6OutChk_Port, K5K6OutChk_Pin);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论