Commit e339f97b authored by hu's avatar hu

调整4051驱动方式,弃用联合体用法

parent b743c980
No preview for this file type
This source diff could not be displayed because it is too large. You can view the blob instead.
project .intvect 1536
project .text 299052
project .text 298988
project .rodata 412383
project .secinfo 120
project .syscall 6
......
......@@ -248,6 +248,7 @@ void Power_IG_ON_Init(void)
/*5s不按按键计时清零*/
//LongTimeNoKey_Operation_TimeRest();
CD4051B_KL15Init();
Fuel_Consump_K15_Init();
......
/******************************************************************************
文件名:CD4051B.C
功能:实现4051通道切换
编写时间:2021/3/25
******************************************************************************/
#include "CD4051.h"
#include "GPIO.h"
volatile u_CD4051_Input CD4051_Input[ID_MAX];
unsigned char pChannel = 0;
#include "dr7f701441.dvf.h"
void CD4051_Pin_Init(void)
{
CD4051_Input[ID_COM1].Byte = 0x00;
CD4051_Input[ID_COM2].Byte = 0x00;
CD4051_Input[ID_COM3].Byte = 0x00;
CD4051_Input[ID_COM4].Byte = 0x00;
CD4051_Input[ID_COM5].Byte = 0x00;
CD4051_Input[ID_COM6].Byte = 0x00;
CD4051_Input[ID_COM7].Byte = 0x00;
pChannel = 0;
CD4051BChannel CD4051B_CurrentChannel;
CD4051A_A_MCU_OUT = 0;
CD4051A_B_MCU_OUT = 0;
CD4051A_C_MCU_OUT = 0;
}
CD4051CtrStruct CD4051CtrStr[COMTotal][MaxChannel];
uint16_t CD4051B_GeneralCOM_Cache[COMTotal][MaxChannel];
uint16_t CD4051B_GeneralCOM_Value[COMTotal][MaxChannel];
void CD4051_GetInputStatus(unsigned char Channel)
void CD4051B_KL15Init(void)
{
}
uint8_t i, j;
i = 0u;
j = 0u;
// VCCA_EN = 1u;
for (i = 0u; i < COMTotal; i++)
{
for (j = 0u; j < MaxChannel; j++)
{
CD4051CtrStr[i][j].time = 0u;
CD4051CtrStr[i][j].Last = 0u;
CD4051B_GeneralCOM_Cache[i][j] = 0u;
CD4051B_GeneralCOM_Value[i][j] = 0u;
}
}
CD4051B_C_MCU = 0u;
CD4051B_B_MCU = 0u;
CD4051B_A_MCU = 0u;
void CD4051_Choose_Channel(unsigned char Channel)
{
CD4051A_A_MCU_OUT = Channel & 0x01;
CD4051A_B_MCU_OUT = (Channel >> 1) & 0x01;
CD4051A_C_MCU_OUT = (Channel >> 2) & 0x01;
CD4051B_CurrentChannel = 0u;
}
void CD4051_IOStatus(unsigned char Channel)
/****************************************************************************
CD4051B_ChannelSet
CD4051B_C_MCU CD4051B_B_MCU CD4051B_A_MCU Channel ON
0 0 0 0
0 0 1 1
0 1 0 2
0 1 1 3
1 0 0 4
1 0 1 5
1 1 0 6
1 1 1 7
******************************************************************************/
void CD4051B_ChannelSet(CD4051BChannel Ch)
{
if (CD4051A_COM1_MCU_IN)
{
CD4051_Input[ID_COM1].Byte |= (1 << Channel);
}
else
{
CD4051_Input[ID_COM1].Byte &= ~(1 << Channel);
}
if (CD4051A_COM2_MCU_IN)
{
CD4051_Input[ID_COM2].Byte |= (1 << Channel);
}
else
{
CD4051_Input[ID_COM2].Byte &= ~(1 << Channel);
}
if (CD4051A_COM3_MCU_IN)
if (Ch < MaxChannel)
{
CD4051_Input[ID_COM3].Byte |= (1 << Channel);
CD4051B_CurrentChannel = Ch;
CD4051B_C_MCU = (Ch & 0x04u) >> 2u;
CD4051B_B_MCU = (Ch & 0x02u) >> 1u;
CD4051B_A_MCU = Ch & 0x01u;
}
else
{
CD4051_Input[ID_COM3].Byte &= ~(1 << Channel);
;
}
if (CD4051A_COM4_MCU_IN)
{
CD4051_Input[ID_COM4].Byte |= (1 << Channel);
}
else
{
CD4051_Input[ID_COM4].Byte &= ~(1 << Channel);
}
if (CD4051A_COM5_MCU_IN)
{
CD4051_Input[ID_COM5].Byte |= (1 << Channel);
}
else
{
CD4051_Input[ID_COM5].Byte &= ~(1 << Channel);
}
if (CD4051A_COM6_MCU_IN)
{
CD4051_Input[ID_COM6].Byte |= (1 << Channel);
}
else
{
CD4051_Input[ID_COM6].Byte &= ~(1 << Channel);
}
if (CD4051A_COM7_MCU_IN)
}
/****************************************************************************
函数名:CD4051B_ChannelGet
形参:无
返回值:CD4051BChannel 当前通道数
功能:获取当前通道数
******************************************************************************/
CD4051BChannel CD4051B_ChannelGet(void)
{
return CD4051B_CurrentChannel;
}
/****************************************************************************
CD4051B_ReadSignal_Serviece
******************************************************************************/
void CD4051B_ReadSignal_Serviece(void)
{
uint8_t channel = 0u;
channel = CD4051B_ChannelGet();
CD4051B_GeneralCOM_Cache[COM1][channel] = CD4051B_InputGOIO_Com1;
CD4051B_GeneralCOM_Cache[COM2][channel] = CD4051B_InputGOIO_Com2;
CD4051B_GeneralCOM_Cache[COM3][channel] = CD4051B_InputGOIO_Com3;
CD4051B_GeneralCOM_Cache[COM4][channel] = CD4051B_InputGOIO_Com4;
CD4051B_GeneralCOM_Cache[COM5][channel] = CD4051B_InputGOIO_Com5;
CD4051B_GeneralCOM_Cache[COM6][channel] = CD4051B_InputGOIO_Com6;
CD4051B_GeneralCOM_Cache[COM7][channel] = CD4051B_InputGOIO_Com7;
if (channel < (MaxChannel - 1u))
{
CD4051_Input[ID_COM7].Byte |= (1 << Channel);
channel++;
}
else
{
CD4051_Input[ID_COM7].Byte &= ~(1 << Channel);
channel = Channel0;
}
CD4051B_ChannelSet(channel);
}
/****************************************************************************
CD4051B_Debounce_Service
void CD4051_GetInputStatusProc(void)
******************************************************************************/
void CD4051B_Debounce_Service(void)
{
CD4051_IOStatus(pChannel);
pChannel++;
CD4051_Choose_Channel(pChannel);
if (pChannel > 7)
uint8_t comcnt;
uint8_t chcnt;
comcnt = 0u;
chcnt = 0u;
for (comcnt = 0u; comcnt < COMTotal; comcnt++)
{
pChannel = 0;
for (chcnt = 0u; chcnt < MaxChannel; chcnt++)
{
if (CD4051B_GeneralCOM_Cache[comcnt][chcnt] == CD4051CtrStr[comcnt][chcnt].Last)
{
CD4051CtrStr[comcnt][chcnt].time++;
if (CD4051B_GeneralCOM_Cache[comcnt][chcnt] == 1u)
{
if (CD4051CtrStr[comcnt][chcnt].time >= CD4051B_DEBOUNCE_High_CNT)
{
CD4051CtrStr[comcnt][chcnt].time = 0u;
CD4051B_GeneralCOM_Value[comcnt][chcnt] = 1u;
}
else
{
;
}
}
else
{
if (CD4051CtrStr[comcnt][chcnt].time >= CD4051B_DEBOUNCE_Low_CNT)
{
CD4051CtrStr[comcnt][chcnt].time = 0u;
CD4051B_GeneralCOM_Value[comcnt][chcnt] = 0u;
}
else
{
;
}
}
}
else
{
CD4051CtrStr[comcnt][chcnt].time = 0u;
CD4051CtrStr[comcnt][chcnt].Last = CD4051B_GeneralCOM_Cache[comcnt][chcnt];
}
}
}
}
/****************************************************************************
CD4051B_GetComValue
******************************************************************************/
uint16_t CD4051B_GetComValue(uint8_t num, uint8_t ch)
{
return CD4051B_GeneralCOM_Value[num][ch];
}
\ No newline at end of file
#ifndef __CD4051_H_
#define __CD4051_H_
#include "r_typedefs.h"
#include "TYW_stdint.h"
#define CD4051_PIN_HIGH 1
#define CD4051_PIN_LOW 0
#define CD4051B_A_MCU CD4051A_A_MCU_OUT
#define CD4051B_B_MCU CD4051A_B_MCU_OUT
#define CD4051B_C_MCU CD4051A_C_MCU_OUT
#define CD4051B_InputGOIO_Com1 CD4051A_COM1_MCU_IN
#define CD4051B_InputGOIO_Com2 CD4051A_COM2_MCU_IN
#define CD4051B_InputGOIO_Com3 CD4051A_COM3_MCU_IN
#define CD4051B_InputGOIO_Com4 CD4051A_COM4_MCU_IN
#define CD4051B_InputGOIO_Com5 CD4051A_COM5_MCU_IN
#define CD4051B_InputGOIO_Com6 CD4051A_COM6_MCU_IN
#define CD4051B_InputGOIO_Com7 CD4051A_COM7_MCU_IN
#define CD4051B_DEBOUNCE_High_TIME 20u
#define CD4051B_DEBOUNCE_Low_TIME 20u
#define CD4051B_DEBOUNCE_High_CNT CD4051B_DEBOUNCE_High_TIME / 20u
#define CD4051B_DEBOUNCE_Low_CNT CD4051B_DEBOUNCE_Low_TIME / 20u
/*通道枚举*/
typedef enum
{
ID_COM1 = 0,
ID_COM2,
ID_COM3,
ID_COM4,
ID_COM5,
ID_COM6,
ID_COM7,
ID_MAX
} em_CD4051_ID;
typedef union
Channel0 = 0u,
Channel1,
Channel2,
Channel3,
Channel4,
Channel5,
Channel6,
Channel7,
MaxChannel,
} CD4051BChannel;
typedef enum
{
struct
{
uint8_t X0 : 1;
uint8_t X1 : 1;
uint8_t X2 : 1;
uint8_t X3 : 1;
uint8_t X4 : 1;
uint8_t X5 : 1;
uint8_t X6 : 1;
uint8_t X7 : 1;
} Bits;
uint8_t Byte;
} u_CD4051_Input;
extern volatile u_CD4051_Input CD4051_Input[ID_MAX];
COM1 = 0u,
COM2,
COM3,
COM4,
COM5,
COM6,
COM7,
COMTotal,
} CD4051B_COMNumber;
/*结构体*/
typedef struct
{
uint16_t time;
uint16_t Last;
} CD4051CtrStruct;
//-----------------外部应用需要时调用---------------wangboyu-------
extern uint16_t CD4051B_GeneralCOM_Cache[COMTotal][MaxChannel];
extern uint16_t CD4051B_GeneralCOM_Value[COMTotal][MaxChannel];
//-----------------外部应用需要时调用----------------------
/*COM1映射PCB*/
#define CD4051_COM1_X0_IN CD4051_Input[ID_COM1].Bits.X0 /*A36*/
#define CD4051_COM1_X1_IN CD4051_Input[ID_COM1].Bits.X1 /* */
#define CD4051_COM1_X2_IN CD4051_Input[ID_COM1].Bits.X2 /* */
#define CD4051_COM1_X3_IN CD4051_Input[ID_COM1].Bits.X3 /*A34*/
#define CD4051_COM1_X4_IN CD4051_Input[ID_COM1].Bits.X4 /*A21*/
#define CD4051_COM1_X5_IN CD4051_Input[ID_COM1].Bits.X5 /*A25*/
#define CD4051_COM1_X6_IN CD4051_Input[ID_COM1].Bits.X6 /*A22*/
#define CD4051_COM1_X7_IN CD4051_Input[ID_COM1].Bits.X7 /*A23*/
#define CD4051_COM1_X0_IN (CD4051B_GeneralCOM_Value[COM1][Channel0]) /*A36*/
#define CD4051_COM1_X1_IN (CD4051B_GeneralCOM_Value[COM1][Channel1]) /* */
#define CD4051_COM1_X2_IN (CD4051B_GeneralCOM_Value[COM1][Channel2]) /* */
#define CD4051_COM1_X3_IN (CD4051B_GeneralCOM_Value[COM1][Channel3]) /*A34*/
#define CD4051_COM1_X4_IN (CD4051B_GeneralCOM_Value[COM1][Channel4]) /*A21*/
#define CD4051_COM1_X5_IN (CD4051B_GeneralCOM_Value[COM1][Channel5]) /*A25*/
#define CD4051_COM1_X6_IN (CD4051B_GeneralCOM_Value[COM1][Channel6]) /*A22*/
#define CD4051_COM1_X7_IN (CD4051B_GeneralCOM_Value[COM1][Channel7]) /*A23*/
/*COM2映射PCB*/
#define CD4051_COM2_X0_IN CD4051_Input[ID_COM2].Bits.X0 /*A31*/
#define CD4051_COM2_X1_IN CD4051_Input[ID_COM2].Bits.X1 /*A32*/
#define CD4051_COM2_X2_IN CD4051_Input[ID_COM2].Bits.X2 /*A33*/
#define CD4051_COM2_X3_IN CD4051_Input[ID_COM2].Bits.X3 /*A30*/
#define CD4051_COM2_X4_IN CD4051_Input[ID_COM2].Bits.X4 /*A26*/
#define CD4051_COM2_X5_IN CD4051_Input[ID_COM2].Bits.X5 /*A29*/
#define CD4051_COM2_X6_IN CD4051_Input[ID_COM2].Bits.X6 /*A27*/
#define CD4051_COM2_X7_IN CD4051_Input[ID_COM2].Bits.X7 /*A28*/
#define CD4051_COM2_X0_IN (CD4051B_GeneralCOM_Value[COM2][Channel0]) /*A31*/
#define CD4051_COM2_X1_IN (CD4051B_GeneralCOM_Value[COM2][Channel1]) /*A32*/
#define CD4051_COM2_X2_IN (CD4051B_GeneralCOM_Value[COM2][Channel2]) /*A33*/
#define CD4051_COM2_X3_IN (CD4051B_GeneralCOM_Value[COM2][Channel3]) /*A30*/
#define CD4051_COM2_X4_IN (CD4051B_GeneralCOM_Value[COM2][Channel4]) /*A26*/
#define CD4051_COM2_X5_IN (CD4051B_GeneralCOM_Value[COM2][Channel5]) /*A29*/
#define CD4051_COM2_X6_IN (CD4051B_GeneralCOM_Value[COM2][Channel6]) /*A27*/
#define CD4051_COM2_X7_IN (CD4051B_GeneralCOM_Value[COM2][Channel7]) /*A28*/
/*COM3映射PCB*/
#define CD4051_COM3_X0_IN CD4051_Input[ID_COM3].Bits.X0 /*A19*/
#define CD4051_COM3_X1_IN CD4051_Input[ID_COM3].Bits.X1 /*B19*/
#define CD4051_COM3_X2_IN CD4051_Input[ID_COM3].Bits.X2 /*B18*/
#define CD4051_COM3_X3_IN CD4051_Input[ID_COM3].Bits.X3 /*A15*/
#define CD4051_COM3_X4_IN CD4051_Input[ID_COM3].Bits.X4 /*A10*/
#define CD4051_COM3_X5_IN CD4051_Input[ID_COM3].Bits.X5 /*A20*/
#define CD4051_COM3_X6_IN CD4051_Input[ID_COM3].Bits.X6 /*A06*/
#define CD4051_COM3_X7_IN CD4051_Input[ID_COM3].Bits.X7 /*A03*/
#define CD4051_COM3_X0_IN (CD4051B_GeneralCOM_Value[COM3][Channel0]) /*A19*/
#define CD4051_COM3_X1_IN (CD4051B_GeneralCOM_Value[COM3][Channel1]) /*B19*/
#define CD4051_COM3_X2_IN (CD4051B_GeneralCOM_Value[COM3][Channel2]) /*B18*/
#define CD4051_COM3_X3_IN (CD4051B_GeneralCOM_Value[COM3][Channel3]) /*A15*/
#define CD4051_COM3_X4_IN (CD4051B_GeneralCOM_Value[COM3][Channel4]) /*A10*/
#define CD4051_COM3_X5_IN (CD4051B_GeneralCOM_Value[COM3][Channel5]) /*A20*/
#define CD4051_COM3_X6_IN (CD4051B_GeneralCOM_Value[COM3][Channel6]) /*A06*/
#define CD4051_COM3_X7_IN (CD4051B_GeneralCOM_Value[COM3][Channel7]) /*A03*/
/*COM4映射PCB*/
#define CD4051_COM4_X0_IN CD4051_Input[ID_COM4].Bits.X0 /*B35*/
#define CD4051_COM4_X1_IN CD4051_Input[ID_COM4].Bits.X1 /*B34*/
#define CD4051_COM4_X2_IN CD4051_Input[ID_COM4].Bits.X2 /*B33*/
#define CD4051_COM4_X3_IN CD4051_Input[ID_COM4].Bits.X3 /*B36*/
#define CD4051_COM4_X4_IN CD4051_Input[ID_COM4].Bits.X4 /*B20*/
#define CD4051_COM4_X5_IN CD4051_Input[ID_COM4].Bits.X5 /*B37*/
#define CD4051_COM4_X6_IN CD4051_Input[ID_COM4].Bits.X6 /*B40*/
#define CD4051_COM4_X7_IN CD4051_Input[ID_COM4].Bits.X7 /*B38*/
#define CD4051_COM4_X0_IN (CD4051B_GeneralCOM_Value[COM4][Channel0]) /*B35*/
#define CD4051_COM4_X1_IN (CD4051B_GeneralCOM_Value[COM4][Channel1]) /*B34*/
#define CD4051_COM4_X2_IN (CD4051B_GeneralCOM_Value[COM4][Channel2]) /*B33*/
#define CD4051_COM4_X3_IN (CD4051B_GeneralCOM_Value[COM4][Channel3]) /*B36*/
#define CD4051_COM4_X4_IN (CD4051B_GeneralCOM_Value[COM4][Channel4]) /*B20*/
#define CD4051_COM4_X5_IN (CD4051B_GeneralCOM_Value[COM4][Channel5]) /*B37*/
#define CD4051_COM4_X6_IN (CD4051B_GeneralCOM_Value[COM4][Channel6]) /*B40*/
#define CD4051_COM4_X7_IN (CD4051B_GeneralCOM_Value[COM4][Channel7]) /*B38*/
/*COM5映射PCB*/
#define CD4051_COM5_X0_IN CD4051_Input[ID_COM5].Bits.X0 /*B23*/
#define CD4051_COM5_X1_IN CD4051_Input[ID_COM5].Bits.X1 /*B22*/
#define CD4051_COM5_X2_IN CD4051_Input[ID_COM5].Bits.X2 /*B21*/
#define CD4051_COM5_X3_IN CD4051_Input[ID_COM5].Bits.X3 /*B24*/
#define CD4051_COM5_X4_IN CD4051_Input[ID_COM5].Bits.X4 /*B32*/
#define CD4051_COM5_X5_IN CD4051_Input[ID_COM5].Bits.X5 /*B26*/
#define CD4051_COM5_X6_IN CD4051_Input[ID_COM5].Bits.X6 /*B31*/
#define CD4051_COM5_X7_IN CD4051_Input[ID_COM5].Bits.X7 /*B30*/
#define CD4051_COM5_X0_IN (CD4051B_GeneralCOM_Value[COM5][Channel0]) /*B23*/
#define CD4051_COM5_X1_IN (CD4051B_GeneralCOM_Value[COM5][Channel1]) /*B22*/
#define CD4051_COM5_X2_IN (CD4051B_GeneralCOM_Value[COM5][Channel2]) /*B21*/
#define CD4051_COM5_X3_IN (CD4051B_GeneralCOM_Value[COM5][Channel3]) /*B24*/
#define CD4051_COM5_X4_IN (CD4051B_GeneralCOM_Value[COM5][Channel4]) /*B32*/
#define CD4051_COM5_X5_IN (CD4051B_GeneralCOM_Value[COM5][Channel5]) /*B26*/
#define CD4051_COM5_X6_IN (CD4051B_GeneralCOM_Value[COM5][Channel6]) /*B31*/
#define CD4051_COM5_X7_IN (CD4051B_GeneralCOM_Value[COM5][Channel7]) /*B30*/
/*COM6映射PCB*/
#define CD4051_COM6_X0_IN CD4051_Input[ID_COM6].Bits.X0 /*A06*/
#define CD4051_COM6_X1_IN CD4051_Input[ID_COM6].Bits.X1 /*B07*/
#define CD4051_COM6_X2_IN CD4051_Input[ID_COM6].Bits.X2 /*B08*/
#define CD4051_COM6_X3_IN CD4051_Input[ID_COM6].Bits.X3 /*B05*/
#define CD4051_COM6_X4_IN CD4051_Input[ID_COM6].Bits.X4 /*B01*/
#define CD4051_COM6_X5_IN CD4051_Input[ID_COM6].Bits.X5 /*B04*/
#define CD4051_COM6_X6_IN CD4051_Input[ID_COM6].Bits.X6 /*B02*/
#define CD4051_COM6_X7_IN CD4051_Input[ID_COM6].Bits.X7 /*B03*/
#define CD4051_COM6_X0_IN (CD4051B_GeneralCOM_Value[COM6][Channel0]) /*A06*/
#define CD4051_COM6_X1_IN (CD4051B_GeneralCOM_Value[COM6][Channel1]) /*B07*/
#define CD4051_COM6_X2_IN (CD4051B_GeneralCOM_Value[COM6][Channel2]) /*B08*/
#define CD4051_COM6_X3_IN (CD4051B_GeneralCOM_Value[COM6][Channel3]) /*B05*/
#define CD4051_COM6_X4_IN (CD4051B_GeneralCOM_Value[COM6][Channel4]) /*B01*/
#define CD4051_COM6_X5_IN (CD4051B_GeneralCOM_Value[COM6][Channel5]) /*B04*/
#define CD4051_COM6_X6_IN (CD4051B_GeneralCOM_Value[COM6][Channel6]) /*B02*/
#define CD4051_COM6_X7_IN (CD4051B_GeneralCOM_Value[COM6][Channel7]) /*B03*/
/*COM7映射PCB*/
#define CD4051_COM7_X0_IN CD4051_Input[ID_COM7].Bits.X0 /*B15*/
#define CD4051_COM7_X1_IN CD4051_Input[ID_COM7].Bits.X1 /*B16*/
#define CD4051_COM7_X2_IN CD4051_Input[ID_COM7].Bits.X2 /*B17*/
#define CD4051_COM7_X3_IN CD4051_Input[ID_COM7].Bits.X3 /*B14*/
#define CD4051_COM7_X4_IN CD4051_Input[ID_COM7].Bits.X4 /*B10*/
#define CD4051_COM7_X5_IN CD4051_Input[ID_COM7].Bits.X5 /*B13*/
#define CD4051_COM7_X6_IN CD4051_Input[ID_COM7].Bits.X6 /*B11*/
#define CD4051_COM7_X7_IN CD4051_Input[ID_COM7].Bits.X7 /*B12*/
#define CD4051_COM7_X0_IN (CD4051B_GeneralCOM_Value[COM7][Channel0]) /*B15*/
#define CD4051_COM7_X1_IN (CD4051B_GeneralCOM_Value[COM7][Channel1]) /*B16*/
#define CD4051_COM7_X2_IN (CD4051B_GeneralCOM_Value[COM7][Channel2]) /*B17*/
#define CD4051_COM7_X3_IN (CD4051B_GeneralCOM_Value[COM7][Channel3]) /*B14*/
#define CD4051_COM7_X4_IN (CD4051B_GeneralCOM_Value[COM7][Channel4]) /*B10*/
#define CD4051_COM7_X5_IN (CD4051B_GeneralCOM_Value[COM7][Channel5]) /*B13*/
#define CD4051_COM7_X6_IN (CD4051B_GeneralCOM_Value[COM7][Channel6]) /*B11*/
#define CD4051_COM7_X7_IN (CD4051B_GeneralCOM_Value[COM7][Channel7]) /*B12*/
void CD4051_Pin_Init(void);
void CD4051_GetInputStatus(unsigned char Channel);
void CD4051_GetInputStatusProc(void);
/******************************************************************************
函数
******************************************************************************/
extern void CD4051B_KL15Init(void);
extern void CD4051B_ChannelSet(CD4051BChannel Ch);
extern CD4051BChannel CD4051B_ChannelGet(void);
extern void CD4051B_ReadSignal_Serviece(void);
extern void CD4051B_Debounce_Service(void);
extern uint16_t CD4051B_GetComValue(uint8_t num, uint8_t ch);
#endif
......@@ -127,8 +127,6 @@ void Sys_Run_Mode_2ms_Tasks(void)
Common_Input_Para();
Gauges_Time_Xms_Count(2);
UDS_10ms_Service();
CD4051_GetInputStatusProc();
}
/*============================================================================*/
/*==============================================================================
......@@ -156,6 +154,7 @@ void Sys_Run_Mode_10ms_Tasks(void)
/*表头调度函数 added by yutian*/
UserGaugeSchedule();/*在主循环中调用*/
/*end*/
CD4051B_ReadSignal_Serviece();
Sound_Play_Service();
Can_BusOff_Fun();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment