Commit d88309c8 authored by hu's avatar hu

调整1.2.1GPIO水温燃油指示灯

parent 9891e21a
...@@ -57,8 +57,10 @@ const uint16_t BackLightValue_R_Default[BL_THEME_TOTAL][BL_TYPE_TOTAL][BL_LV_TOT ...@@ -57,8 +57,10 @@ const uint16_t BackLightValue_R_Default[BL_THEME_TOTAL][BL_TYPE_TOTAL][BL_LV_TOT
}; };
const uint8_t PwmChannel[BACKLIGHT_TOTAL] = const uint8_t PwmChannel[BACKLIGHT_TOTAL] =
/* TFT 表盘 */ /* TFT 表盘 燃油 水温 水温背光*/
{TIMERB_2_CH1, TIMERB_0_CH15}; {TIMERB_2_CH1, TIMERB_0_CH15, TIMERB_1_CH15, TIMERB_1_CH10, TIMERB_2_CH7};
//{255, 255, 255, TIMERB_1_CH10, 255};
/**@brief Back Ground Light Config function /**@brief Back Ground Light Config function
* @author TYW * @author TYW
* @param[in] BGLType 背光类型 * @param[in] BGLType 背光类型
......
...@@ -55,9 +55,9 @@ enum { ...@@ -55,9 +55,9 @@ enum {
enum { enum {
BL_TFT, BL_TFT,
BL_DIAL, BL_DIAL,
//BL_R, LED_FUEL,
//BL_G, LED_TEMP,
//BL_B, LED_TEMPBL,
BACKLIGHT_TOTAL, BACKLIGHT_TOTAL,
}; };
typedef struct { typedef struct {
......
#include "BackgroundLight.h" #include "BackgroundLight.h"
#include "BGLInterface.h" #include "BGLInterface.h"
#include "Telltales.h"
#include "kwp2000_service.h"
uint16_t IgnOffKeepMs; uint16_t IgnOffKeepMs;
uint16_t IgnOnKeepMs; uint16_t IgnOnKeepMs;
uint8_t BGLCurIgnSt = BGL_IGN_OFF; uint8_t BGLCurIgnSt = BGL_IGN_OFF;
...@@ -17,6 +20,7 @@ uint16_t ThermistorIndex; ...@@ -17,6 +20,7 @@ uint16_t ThermistorIndex;
uint16_t ThermistorCurValue; uint16_t ThermistorCurValue;
uint8_t BLEffectFlag = 0u; uint8_t BLEffectFlag = 0u;
uint16_t BackupsDuty[BACKLIGHT_TOTAL] = {0}; uint16_t BackupsDuty[BACKLIGHT_TOTAL] = {0};
void SetBackLightOutput(uint8_t n, uint16_t val) void SetBackLightOutput(uint8_t n, uint16_t val)
{ {
BGLPwm_Config(n, val); BGLPwm_Config(n, val);
...@@ -347,21 +351,42 @@ void BackLightDeal(BL_USER_PARA BL_FunPara, BL_STATE_PARA BLFunStatePara) ...@@ -347,21 +351,42 @@ void BackLightDeal(BL_USER_PARA BL_FunPara, BL_STATE_PARA BLFunStatePara)
SetBacklightDestVal(BL_TFT, BL_FunPara.BL_User_TFTDuty); SetBacklightDestVal(BL_TFT, BL_FunPara.BL_User_TFTDuty);
SetBacklightCurVal(BL_TFT, BL_FunPara.BL_User_TFTDuty - 5u); SetBacklightCurVal(BL_TFT, BL_FunPara.BL_User_TFTDuty - 5u);
SetBacklightDestVal(BL_DIAL, BL_FunPara.BL_User_GaugesDuty); SetBacklightDestVal(BL_DIAL, BL_FunPara.BL_User_GaugesDuty);
// SetBacklightDestVal(BL_R, BL_FunPara.BL_User_RDuty);
// SetBacklightDestVal(BL_G, BL_FunPara.BL_User_GDuty);
// SetBacklightDestVal(BL_B, BL_FunPara.BL_User_BDuty);
SetBacklightMinVal(BL_TFT, BL_FunPara.BL_User_TFTDuty_MIN); SetBacklightMinVal(BL_TFT, BL_FunPara.BL_User_TFTDuty_MIN);
SetBacklightMinVal(BL_DIAL, BL_FunPara.BL_User_GaugesDuty_MIN); SetBacklightMinVal(BL_DIAL, BL_FunPara.BL_User_GaugesDuty_MIN);
// SetBacklightMinVal(BL_R, BL_FunPara.BL_User_RDuty_MIN);
// SetBacklightMinVal(BL_G, BL_FunPara.BL_User_GDuty_MIN); /*燃油报警*/
// SetBacklightMinVal(BL_B, BL_FunPara.BL_User_BDuty_MIN); //if ((LED_Fuel_Judgement() == 1u) && (K_Line_Set.K_Line_LID43 == 0x82u))
//{
// SetBacklightDestVal(LED_FUEL, BL_FunPara.BL_User_GaugesDuty);
// SetBacklightMinVal(LED_FUEL, BL_FunPara.BL_User_GaugesDuty_MIN);
//}
//else
//{
SetBacklightDestVal(LED_FUEL, BL_FunPara.BL_User_GaugesDuty);
SetBacklightMinVal(LED_FUEL, BL_FunPara.BL_User_GaugesDuty_MIN);
//}
/*水温报警*/
//if ((LED_Temp_Judgement() == 1u) && (K_Line_Set.K_Line_LID43 == 0x82u))
//{
// SetBacklightDestVal(LED_TEMP, BL_FunPara.BL_User_GaugesDuty);
// SetBacklightMinVal(LED_TEMP, BL_FunPara.BL_User_GaugesDuty_MIN);
//}
//else
//{
SetBacklightDestVal(LED_TEMP, BL_FunPara.BL_User_GaugesDuty);
SetBacklightMinVal(LED_TEMP, BL_FunPara.BL_User_GaugesDuty_MIN);
//}
SetBacklightDestVal(LED_TEMPBL, BL_FunPara.BL_User_GaugesDuty);
SetBacklightMinVal(LED_TEMPBL, BL_FunPara.BL_User_GaugesDuty_MIN);
BackupsDuty[BL_TFT] = 0u; BackupsDuty[BL_TFT] = 0u;
BackupsDuty[BL_DIAL] = 0u; BackupsDuty[BL_DIAL] = 0u;
// BackupsDuty[BL_R]=0u; BackupsDuty[LED_FUEL] = 0u;
// BackupsDuty[BL_G]=0u; BackupsDuty[LED_TEMP] = 0u;
// BackupsDuty[BL_B]=0u; BackupsDuty[LED_TEMPBL] = 0u;
for (i = 0u; i < BACKLIGHT_TOTAL; i++) for (i = 0u; i < BACKLIGHT_TOTAL; i++)
{ {
...@@ -375,9 +400,27 @@ void BackLightDeal(BL_USER_PARA BL_FunPara, BL_STATE_PARA BLFunStatePara) ...@@ -375,9 +400,27 @@ void BackLightDeal(BL_USER_PARA BL_FunPara, BL_STATE_PARA BLFunStatePara)
SetBacklightDestVal(BL_TFT, BL_FunPara.BL_User_TFTDuty); SetBacklightDestVal(BL_TFT, BL_FunPara.BL_User_TFTDuty);
SetBacklightDestVal(BL_DIAL, BL_FunPara.BL_User_GaugesDuty); SetBacklightDestVal(BL_DIAL, BL_FunPara.BL_User_GaugesDuty);
// SetBacklightDestVal(BL_R, BL_FunPara.BL_User_RDuty);
// SetBacklightDestVal(BL_G, BL_FunPara.BL_User_GDuty); /*燃油报警*/
// SetBacklightDestVal(BL_B, BL_FunPara.BL_User_BDuty); if ((LED_Fuel_Judgement() == 1u) && (K_Line_Set.K_Line_LID43 == 0x82u))
{
SetBacklightDestVal(LED_FUEL, 0);
}
else
{
SetBacklightDestVal(LED_FUEL, BL_FunPara.BL_User_GaugesDuty);
}
/*水温报警*/
if ((LED_Temp_Judgement() == 1u) && (K_Line_Set.K_Line_LID43 == 0x82u))
{
SetBacklightDestVal(LED_TEMP, 0);
}
else
{
SetBacklightDestVal(LED_TEMP, BL_FunPara.BL_User_GaugesDuty);
}
SetBacklightDestVal(LED_TEMPBL, BL_FunPara.BL_User_GaugesDuty);
} }
else if ((BL_FunPara.BL_User_WakeFlag) && (BL_FunPara.BL_User_PowerSt == BGL_IGN_OFF)) else if ((BL_FunPara.BL_User_WakeFlag) && (BL_FunPara.BL_User_PowerSt == BGL_IGN_OFF))
{ {
...@@ -433,9 +476,10 @@ void BackLightDeal(BL_USER_PARA BL_FunPara, BL_STATE_PARA BLFunStatePara) ...@@ -433,9 +476,10 @@ void BackLightDeal(BL_USER_PARA BL_FunPara, BL_STATE_PARA BLFunStatePara)
SetBacklightDestVal(BL_TFT, 0u); SetBacklightDestVal(BL_TFT, 0u);
SetBacklightCurVal(BL_TFT, 0u); SetBacklightCurVal(BL_TFT, 0u);
SetBacklightDestVal(BL_DIAL, 0u); SetBacklightDestVal(BL_DIAL, 0u);
// SetBacklightDestVal(BL_R, 0u); SetBacklightDestVal(LED_FUEL, 0u);
// SetBacklightDestVal(BL_G, 0u); SetBacklightDestVal(LED_TEMP, 0u);
// SetBacklightDestVal(BL_B, 0u); SetBacklightDestVal(LED_TEMPBL, 0u);
for (i = 0u; i < BACKLIGHT_TOTAL; i++) for (i = 0u; i < BACKLIGHT_TOTAL; i++)
{ {
if (BackLightPara[i].CurBackLightDuty == 0u) if (BackLightPara[i].CurBackLightDuty == 0u)
......
...@@ -1966,29 +1966,28 @@ void LED_Temp_Execution(uint8_t led_status) ...@@ -1966,29 +1966,28 @@ void LED_Temp_Execution(uint8_t led_status)
{ {
if ((led_status == 1u) && (K_Line_Set.K_Line_LID43 == 0x82u)) if ((led_status == 1u) && (K_Line_Set.K_Line_LID43 == 0x82u))
{ {
//TimerB_PWM_Channel_Duty_Set(TIMERB_2_CH7 , testBG );//水温格白色
TEMP_R_LED_OUT = 1u ;/*水温红灯*/ TEMP_R_LED_OUT = 1u ;/*水温红灯*/
Water_Temp_Led_R_MCU_OUT = 0u; //Water_Temp_Led_R_MCU_OUT = 0u;
TEMP_W_LED_OUT = 0u ;//水温字符白色指示灯 TEMP_W_LED_OUT = 0u ;//水温字符白色指示灯
Water_Temp_Led_W_MCU_OUT = 1u; //Water_Temp_Led_W_MCU_OUT = 1u;
} }
else else
{ {
TEMP_R_LED_OUT = 0u ;/*水温红灯*/ TEMP_R_LED_OUT = 0u ;/*水温红灯*/
Water_Temp_Led_R_MCU_OUT = 0u; //Water_Temp_Led_R_MCU_OUT = 0u;
TEMP_W_LED_OUT = 1u ;//水温字符白色指示灯 TEMP_W_LED_OUT = 1u ;//水温字符白色指示灯
Water_Temp_Led_W_MCU_OUT = 1u; //Water_Temp_Led_W_MCU_OUT = 1u;
} }
} }
else else
{ {
TEMP_R_LED_OUT = 0u ;/*水温红灯*/ TEMP_R_LED_OUT = 0u ;/*水温红灯*/
Water_Temp_Led_R_MCU_OUT = 0u; //Water_Temp_Led_R_MCU_OUT = 0u;
TEMP_W_LED_OUT = 0u ;//水温字符白色指示灯 TEMP_W_LED_OUT = 0u ;//水温字符白色指示灯
Water_Temp_Led_W_MCU_OUT = 0u; //Water_Temp_Led_W_MCU_OUT = 0u;
} }
} }
...@@ -2032,18 +2031,18 @@ void LED_Fuel_Execution(uint8_t led_status) ...@@ -2032,18 +2031,18 @@ void LED_Fuel_Execution(uint8_t led_status)
if ((led_status == 1u) && (K_Line_Set.K_Line_LID43 == 0x82u)) if ((led_status == 1u) && (K_Line_Set.K_Line_LID43 == 0x82u))
{ {
FUEL_LED_Y_MCU = 1u ; FUEL_LED_Y_MCU = 1u ;
FUEL_W_LED_OUT = 0u ; //FUEL_W_LED_OUT = 0u ;
} }
else else
{ {
FUEL_LED_Y_MCU = 0u ; FUEL_LED_Y_MCU = 0u ;
FUEL_W_LED_OUT = 1u ; //FUEL_W_LED_OUT = 1u ;
} }
} }
else else
{ {
FUEL_LED_Y_MCU = 0u ; FUEL_LED_Y_MCU = 0u ;
FUEL_W_LED_OUT = 0u ; //FUEL_W_LED_OUT = 0u ;
} }
} }
......
...@@ -222,9 +222,9 @@ void Sys_Enter_Sleep_Mode(void) ...@@ -222,9 +222,9 @@ void Sys_Enter_Sleep_Mode(void)
__DI(); __DI();
SYSWUFC0 = 0x7FFFFU; SYSWUFC0 = 0x7FFFFU;
/*---------------------------------------------*/ /*---------------------------------------------*/
GPIO_Wakeup_PIN_Set(GPIO_WAKEUP_PIN_P0_5, GPIO_WAKEUP_FALLING_EDGE); /*CAN唤醒 ----20220106----*/ GPIO_Wakeup_PIN_Set(GPIO_WAKEUP_PIN_P0_5, GPIO_WAKEUP_FALLING_EDGE); /*CAN唤醒*/
GPIO_Wakeup_PIN_Set(GPIO_WAKEUP_PIN_P0_0, GPIO_WAKEUP_HIGH_LEVEL); /*15电唤醒 ----20220106----*/ GPIO_Wakeup_PIN_Set(GPIO_WAKEUP_PIN_P0_0, GPIO_WAKEUP_HIGH_LEVEL); /*15电唤醒*/
GPIO_Wakeup_PIN_Set(GPIO_WAKEUP_PIN_P0_7, GPIO_WAKEUP_HIGH_LEVEL); /*硬线唤醒 ----20220314----*/ GPIO_Wakeup_PIN_Set(GPIO_WAKEUP_PIN_P0_7, GPIO_WAKEUP_HIGH_LEVEL); /*硬线唤醒*/
/*----------------------------------------------*/ /*----------------------------------------------*/
SYSWUFMSK0 &= 0x7FFFEU; SYSWUFMSK0 &= 0x7FFFEU;
......
...@@ -171,11 +171,11 @@ const uint32_t g_u32GPIOConfigArray[][2U] = ...@@ -171,11 +171,11 @@ const uint32_t g_u32GPIOConfigArray[][2U] =
0x00010000ul, /*Pin_P16_10 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P16_10 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_10 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P16_10 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_11 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000041ul, /*Pin_P16_11 TAUB1O15 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_11 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000050ul, /*Pin_P16_11 TAUB2I3 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00000041ul, /*Pin_P17_0 TAUB2O1 SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000041ul, /*Pin_P17_0 TAUB2O1 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00000041ul, /*Pin_P17_0 TAUB2O1 SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000050ul, /*Pin_P17_0 TAUB2I4 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P17_1 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P17_1 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P17_1 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P17_1 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
...@@ -252,8 +252,8 @@ const uint32_t g_u32GPIOConfigArray[][2U] = ...@@ -252,8 +252,8 @@ const uint32_t g_u32GPIOConfigArray[][2U] =
0x00010000ul, /*Pin_P42_2 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P42_2 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_2 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P42_2 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_3 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000042ul, /*Pin_P42_3 TAUB2O7 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_3 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000042ul, /*Pin_P42_3 TAUB2O7 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_4 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P42_4 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_4 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P42_4 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
...@@ -288,8 +288,8 @@ const uint32_t g_u32GPIOConfigArray[][2U] = ...@@ -288,8 +288,8 @@ const uint32_t g_u32GPIOConfigArray[][2U] =
0x00010000ul, /*Pin_P42_14 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P42_14 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_14 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P42_14 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00000053ul, /*Pin_P42_15 TAUB1I10 SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000042ul, /*Pin_P42_15 TAUB2O15 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_15 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000042ul, /*Pin_P42_15 TAUB2O15 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P43_0 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P43_0 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P43_0 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P43_0 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
...@@ -537,7 +537,7 @@ static void GPIO_PIN_Init(GPIO_Config_Mode_en_t enGPIOConfigMode) ...@@ -537,7 +537,7 @@ static void GPIO_PIN_Init(GPIO_Config_Mode_en_t enGPIOConfigMode)
PORTJ_AWOJPCR0_3 = g_u32GPIOConfigArray[124U][enGPIOConfigMode]; PORTJ_AWOJPCR0_3 = g_u32GPIOConfigArray[124U][enGPIOConfigMode];
PORTJ_AWOJPCR0_4 = g_u32GPIOConfigArray[125U][enGPIOConfigMode]; PORTJ_AWOJPCR0_4 = g_u32GPIOConfigArray[125U][enGPIOConfigMode];
PORTJ_AWOJPCR0_5 = g_u32GPIOConfigArray[126U][enGPIOConfigMode]; PORTJ_AWOJPCR0_5 = g_u32GPIOConfigArray[126U][enGPIOConfigMode];
*/ */
} }
void GPIO_Init(GPIO_Config_Mode_en_t enGPIOConfigMode) void GPIO_Init(GPIO_Config_Mode_en_t enGPIOConfigMode)
...@@ -552,7 +552,7 @@ void GPIO_Init(GPIO_Config_Mode_en_t enGPIOConfigMode) ...@@ -552,7 +552,7 @@ void GPIO_Init(GPIO_Config_Mode_en_t enGPIOConfigMode)
{ {
GPIO_PIN_Init(GPIO_SLEEP_MODE); GPIO_PIN_Init(GPIO_SLEEP_MODE);
/*All ports except P0 into hold state*/ /*All ports except P0 into hold state*/
GPIO_STB_PROTECTED_WRITE(SYSPROTCMD0, SYSPROTS0, SYSIOHOLD, 0x7EU); GPIO_STB_PROTECTED_WRITE(SYSPROTCMD0, SYSPROTS0, SYSIOHOLD, 0x40U);
} }
} }
......
...@@ -472,7 +472,6 @@ ...@@ -472,7 +472,6 @@
#define CD4051A_B_MCU_OUT GPIO_OUT_PORT16_PIN08 #define CD4051A_B_MCU_OUT GPIO_OUT_PORT16_PIN08
#define CD4051A_COM3_MCU_IN GPIO_IN_PORT16_PIN09 #define CD4051A_COM3_MCU_IN GPIO_IN_PORT16_PIN09
#define CD4051A_C_MCU_OUT GPIO_OUT_PORT16_PIN10 #define CD4051A_C_MCU_OUT GPIO_OUT_PORT16_PIN10
#define FUEL_W_LED_OUT GPIO_OUT_PORT16_PIN11
#define CANSTB2_OUT GPIO_OUT_PORT17_PIN01 #define CANSTB2_OUT GPIO_OUT_PORT17_PIN01
#define CD4051A_COM4_MCU_IN GPIO_IN_PORT17_PIN02 #define CD4051A_COM4_MCU_IN GPIO_IN_PORT17_PIN02
#define CD4051A_COM5_MCU_IN GPIO_IN_PORT17_PIN03 #define CD4051A_COM5_MCU_IN GPIO_IN_PORT17_PIN03
...@@ -488,7 +487,6 @@ ...@@ -488,7 +487,6 @@
#define I2C2_3236SDA_MCU GPIO_OUT_PORT42_PIN00 #define I2C2_3236SDA_MCU GPIO_OUT_PORT42_PIN00
#define I2C2_3236SCL_MCU GPIO_OUT_PORT42_PIN01 #define I2C2_3236SCL_MCU GPIO_OUT_PORT42_PIN01
#define D_3236SDB_MCU GPIO_OUT_PORT42_PIN02 #define D_3236SDB_MCU GPIO_OUT_PORT42_PIN02
#define Water_Temp_Led_W_MCU_OUT GPIO_OUT_PORT42_PIN03
#define Water_Temp_Led_R_MCU_OUT GPIO_OUT_PORT42_PIN04 #define Water_Temp_Led_R_MCU_OUT GPIO_OUT_PORT42_PIN04
#define TRAILER_ABS_LED_MCU_OUT GPIO_OUT_PORT42_PIN05 #define TRAILER_ABS_LED_MCU_OUT GPIO_OUT_PORT42_PIN05
#define ACC5V_LED_PWM_MCU GPIO_OUT_PORT42_PIN06 #define ACC5V_LED_PWM_MCU GPIO_OUT_PORT42_PIN06
......
...@@ -508,11 +508,21 @@ static void TimerB_BackLight_Demo_Init(void) ...@@ -508,11 +508,21 @@ static void TimerB_BackLight_Demo_Init(void)
TimerB_PWM_Channel_Init(TIMERB_2_CH1 , TIMERB_CLOCK_0 , TIMERB_HIGH ); TimerB_PWM_Channel_Init(TIMERB_2_CH1 , TIMERB_CLOCK_0 , TIMERB_HIGH );
TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH1 , 3000U , 0u); TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH1 , 3000U , 0u);
TimerB_PWM_Channel_Start(TIMERB_2_CH1 ); TimerB_PWM_Channel_Start(TIMERB_2_CH1 );
//水温白色
//水温白灯
//TimerB_PWM_Channel_Init(TIMERB_1_CH10, TIMERB_CLOCK_0, TIMERB_HIGH);
//TimerB_PWM_Channel_Fre_Set(TIMERB_1_CH10, 3000U, 0u);
//TimerB_PWM_Channel_Start(TIMERB_1_CH10);
//水温背光白灯
TimerB_PWM_Channel_Init(TIMERB_2_CH7, TIMERB_CLOCK_0, TIMERB_HIGH); TimerB_PWM_Channel_Init(TIMERB_2_CH7, TIMERB_CLOCK_0, TIMERB_HIGH);
TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH7, 3000U, 0u); TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH7, 3000U, 0u);
//TimerB_PWM_Channel_Duty_Set(TIMERB_2_CH7, 0U);
TimerB_PWM_Channel_Start(TIMERB_2_CH7); TimerB_PWM_Channel_Start(TIMERB_2_CH7);
//燃油白灯
TimerB_PWM_Channel_Init(TIMERB_1_CH15, TIMERB_CLOCK_0, TIMERB_HIGH);
TimerB_PWM_Channel_Fre_Set(TIMERB_1_CH15, 3000U, 0u);
TimerB_PWM_Channel_Start(TIMERB_1_CH15);
} }
/*车速频率输出PWM初始化*/ /*车速频率输出PWM初始化*/
static void TimerB_VehFreOut_Init(void) static void TimerB_VehFreOut_Init(void)
...@@ -520,35 +530,30 @@ static void TimerB_VehFreOut_Init(void) ...@@ -520,35 +530,30 @@ static void TimerB_VehFreOut_Init(void)
//车速1 //车速1
TimerB_PWM_Channel_Init(TIMERB_2_CH10 , TIMERB_CLOCK_0 , TIMERB_HIGH ); TimerB_PWM_Channel_Init(TIMERB_2_CH10 , TIMERB_CLOCK_0 , TIMERB_HIGH );
TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH10 , 1U , 0u); TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH10 , 1U , 0u);
//TimerB_PWM_Channel_Duty_Set(TIMERB_2_CH10 , 0u );
TimerB_PWM_Channel_Start(TIMERB_2_CH10 ); TimerB_PWM_Channel_Start(TIMERB_2_CH10 );
//车速2 //车速2
TimerB_PWM_Channel_Init(TIMERB_2_CH13, TIMERB_CLOCK_0, TIMERB_HIGH); TimerB_PWM_Channel_Init(TIMERB_2_CH13, TIMERB_CLOCK_0, TIMERB_HIGH);
TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH13, 1U, 0u); TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH13, 1U, 0u);
//TimerB_PWM_Channel_Duty_Set(TIMERB_2_CH13, 0u);
TimerB_PWM_Channel_Start(TIMERB_2_CH13); TimerB_PWM_Channel_Start(TIMERB_2_CH13);
//车速3 //车速3
TimerB_PWM_Channel_Init(TIMERB_2_CH15, TIMERB_CLOCK_0, TIMERB_HIGH); TimerB_PWM_Channel_Init(TIMERB_2_CH15, TIMERB_CLOCK_0, TIMERB_HIGH);
TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH15, 1U, 0u); TimerB_PWM_Channel_Fre_Set(TIMERB_2_CH15, 1U, 0u);
//TimerB_PWM_Channel_Duty_Set(TIMERB_2_CH15, 0u);
TimerB_PWM_Channel_Start(TIMERB_2_CH15); TimerB_PWM_Channel_Start(TIMERB_2_CH15);
} }
/*转速频率输出PWM初始化*/ /*转速频率输出PWM初始化*/
static void TimerB_EngFreOut_Init(void) static void TimerB_EngFreOut_Init(void)
{ {
TimerB_PWM_Channel_Init(TIMERB_0_CH7, TIMERB_CLOCK_3, TIMERB_HIGH); //TimerB_PWM_Channel_Init(TIMERB_0_CH7, TIMERB_CLOCK_3, TIMERB_HIGH);
TimerB_PWM_Channel_Fre_Set(TIMERB_0_CH7, 0u, 0u); //TimerB_PWM_Channel_Fre_Set(TIMERB_0_CH7, 0u, 0u);
//TimerB_PWM_Channel_Duty_Set(TIMERB_0_CH7, 0u); //TimerB_PWM_Channel_Start(TIMERB_0_CH7);
TimerB_PWM_Channel_Start(TIMERB_0_CH7);
} }
/*蜂鸣器PWM初始化*/ /*蜂鸣器PWM初始化*/
void TimerB_Buzzer_Init(void) void TimerB_Buzzer_Init(void)
{ {
TimerB_PWM_Channel_Init(TIMERB_0_CH11, TIMERB_CLOCK_0, TIMERB_HIGH); TimerB_PWM_Channel_Init(TIMERB_0_CH11, TIMERB_CLOCK_0, TIMERB_HIGH);
TimerB_PWM_Channel_Fre_Set(TIMERB_0_CH11, 3000U, 0u); TimerB_PWM_Channel_Fre_Set(TIMERB_0_CH11, 3000U, 0u);
//TimerB_PWM_Channel_Duty_Set(TIMERB_0_CH11, 0u);
TimerB_PWM_Channel_Start(TIMERB_0_CH11); TimerB_PWM_Channel_Start(TIMERB_0_CH11);
} }
......
...@@ -172,11 +172,11 @@ const uint32_t g_u32GPIOConfigArray[][2U] = ...@@ -172,11 +172,11 @@ const uint32_t g_u32GPIOConfigArray[][2U] =
0x00010000ul, /*Pin_P16_10 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P16_10 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_10 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P16_10 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_11 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000041ul, /*Pin_P16_11 TAUB1O15 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P16_11 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000050ul, /*Pin_P16_11 TAUB2I3 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00000041ul, /*Pin_P17_0 TAUB2O1 SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000041ul, /*Pin_P17_0 TAUB2O1 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00000041ul, /*Pin_P17_0 TAUB2O1 SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000050ul, /*Pin_P17_0 TAUB2I4 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P17_1 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P17_1 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P17_1 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P17_1 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
...@@ -253,8 +253,8 @@ const uint32_t g_u32GPIOConfigArray[][2U] = ...@@ -253,8 +253,8 @@ const uint32_t g_u32GPIOConfigArray[][2U] =
0x00010000ul, /*Pin_P42_2 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P42_2 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_2 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P42_2 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_3 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000042ul, /*Pin_P42_3 TAUB2O7 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_3 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000042ul, /*Pin_P42_3 TAUB2O7 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_4 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P42_4 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_4 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P42_4 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
...@@ -289,8 +289,8 @@ const uint32_t g_u32GPIOConfigArray[][2U] = ...@@ -289,8 +289,8 @@ const uint32_t g_u32GPIOConfigArray[][2U] =
0x00010000ul, /*Pin_P42_14 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P42_14 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_14 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P42_14 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00000053ul, /*Pin_P42_15 TAUB1I10 SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000042ul, /*Pin_P42_15 TAUB2O15 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P42_15 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00000042ul, /*Pin_P42_15 TAUB2O15 SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P43_0 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P43_0 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
0x00010000ul, /*Pin_P43_0 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */ 0x00010000ul, /*Pin_P43_0 GPIO_OUT SCHMITT1PDSC:L PU/PD:NULL P:L */
...@@ -553,7 +553,7 @@ void GPIO_Init(GPIO_Config_Mode_en_t enGPIOConfigMode) ...@@ -553,7 +553,7 @@ void GPIO_Init(GPIO_Config_Mode_en_t enGPIOConfigMode)
{ {
GPIO_PIN_Init(GPIO_SLEEP_MODE); GPIO_PIN_Init(GPIO_SLEEP_MODE);
/*All ports except P0 into hold state*/ /*All ports except P0 into hold state*/
GPIO_STB_PROTECTED_WRITE(SYSPROTCMD0, SYSPROTS0, SYSIOHOLD, 0x7EU); GPIO_STB_PROTECTED_WRITE(SYSPROTCMD0, SYSPROTS0, SYSIOHOLD, 0x40U);
} }
} }
......
...@@ -470,7 +470,6 @@ ...@@ -470,7 +470,6 @@
#define CD4051A_B_MCU_OUT GPIO_OUT_PORT16_PIN08 #define CD4051A_B_MCU_OUT GPIO_OUT_PORT16_PIN08
#define CD4051A_COM3_MCU_IN GPIO_IN_PORT16_PIN09 #define CD4051A_COM3_MCU_IN GPIO_IN_PORT16_PIN09
#define CD4051A_C_MCU_OUT GPIO_OUT_PORT16_PIN10 #define CD4051A_C_MCU_OUT GPIO_OUT_PORT16_PIN10
#define FUEL_W_LED_OUT GPIO_OUT_PORT16_PIN11
#define CANSTB2_OUT GPIO_OUT_PORT17_PIN01 #define CANSTB2_OUT GPIO_OUT_PORT17_PIN01
#define CD4051A_COM4_MCU_IN GPIO_IN_PORT17_PIN02 #define CD4051A_COM4_MCU_IN GPIO_IN_PORT17_PIN02
#define CD4051A_COM5_MCU_IN GPIO_IN_PORT17_PIN03 #define CD4051A_COM5_MCU_IN GPIO_IN_PORT17_PIN03
...@@ -486,7 +485,6 @@ ...@@ -486,7 +485,6 @@
#define I2C2_3236SDA_MCU GPIO_OUT_PORT42_PIN00 #define I2C2_3236SDA_MCU GPIO_OUT_PORT42_PIN00
#define I2C2_3236SCL_MCU GPIO_OUT_PORT42_PIN01 #define I2C2_3236SCL_MCU GPIO_OUT_PORT42_PIN01
#define D_3236SDB_MCU GPIO_OUT_PORT42_PIN02 #define D_3236SDB_MCU GPIO_OUT_PORT42_PIN02
#define Water_Temp_Led_W_MCU_OUT GPIO_OUT_PORT42_PIN03
#define Water_Temp_Led_R_MCU_OUT GPIO_OUT_PORT42_PIN04 #define Water_Temp_Led_R_MCU_OUT GPIO_OUT_PORT42_PIN04
#define TRAILER_ABS_LED_MCU_OUT GPIO_OUT_PORT42_PIN05 #define TRAILER_ABS_LED_MCU_OUT GPIO_OUT_PORT42_PIN05
#define ACC5V_LED_PWM_MCU GPIO_OUT_PORT42_PIN06 #define ACC5V_LED_PWM_MCU GPIO_OUT_PORT42_PIN06
......
...@@ -3219,7 +3219,7 @@ ...@@ -3219,7 +3219,7 @@
"pinName": "FUEL_W_LED_OUT", "pinName": "FUEL_W_LED_OUT",
"pinAddress": "14B", "pinAddress": "14B",
"wakeupPin": { "wakeupPin": {
"pinModeName": "GPIO_OUT", "pinModeName": "TAUB1O15",
"circuitName": "SCHMITT1", "circuitName": "SCHMITT1",
"PINV": false, "PINV": false,
"PODC": false, "PODC": false,
...@@ -3229,18 +3229,18 @@ ...@@ -3229,18 +3229,18 @@
"PU": false, "PU": false,
"PD": false, "PD": false,
"PBDC": false, "PBDC": false,
"PIBC": true, "PIBC": false,
"P": false, "P": false,
"PPR": false, "PPR": false,
"PMC": false, "PMC": true,
"PIPC": false, "PIPC": false,
"PM": false, "PM": false,
"PFCAE": false, "PFCAE": false,
"PFCE": false, "PFCE": false,
"PFC": false "PFC": true
}, },
"sleepPin": { "sleepPin": {
"pinModeName": "GPIO_OUT", "pinModeName": "TAUB2I3",
"circuitName": "SCHMITT1", "circuitName": "SCHMITT1",
"PINV": false, "PINV": false,
"PODC": false, "PODC": false,
...@@ -3250,12 +3250,12 @@ ...@@ -3250,12 +3250,12 @@
"PU": false, "PU": false,
"PD": false, "PD": false,
"PBDC": false, "PBDC": false,
"PIBC": true, "PIBC": false,
"P": false, "P": false,
"PPR": false, "PPR": false,
"PMC": false, "PMC": true,
"PIPC": false, "PIPC": false,
"PM": false, "PM": true,
"PFCAE": false, "PFCAE": false,
"PFCE": false, "PFCE": false,
"PFC": false "PFC": false
...@@ -3305,7 +3305,7 @@ ...@@ -3305,7 +3305,7 @@
"PFC": true "PFC": true
}, },
"sleepPin": { "sleepPin": {
"pinModeName": "TAUB2O1", "pinModeName": "TAUB2I4",
"circuitName": "SCHMITT1", "circuitName": "SCHMITT1",
"PINV": false, "PINV": false,
"PODC": false, "PODC": false,
...@@ -3320,10 +3320,10 @@ ...@@ -3320,10 +3320,10 @@
"PPR": false, "PPR": false,
"PMC": true, "PMC": true,
"PIPC": false, "PIPC": false,
"PM": false, "PM": true,
"PFCAE": false, "PFCAE": false,
"PFCE": false, "PFCE": false,
"PFC": true "PFC": false
}, },
"pinModeList": { "pinModeList": {
"GPIO_OUT": 65536, "GPIO_OUT": 65536,
...@@ -4860,7 +4860,7 @@ ...@@ -4860,7 +4860,7 @@
"pinName": "Water_Temp_Led_W_MCU_OUT", "pinName": "Water_Temp_Led_W_MCU_OUT",
"pinAddress": " 1M", "pinAddress": " 1M",
"wakeupPin": { "wakeupPin": {
"pinModeName": "GPIO_OUT", "pinModeName": "TAUB2O7",
"circuitName": "SCHMITT1", "circuitName": "SCHMITT1",
"PINV": false, "PINV": false,
"PODC": false, "PODC": false,
...@@ -4870,18 +4870,18 @@ ...@@ -4870,18 +4870,18 @@
"PU": false, "PU": false,
"PD": false, "PD": false,
"PBDC": false, "PBDC": false,
"PIBC": true, "PIBC": false,
"P": false, "P": false,
"PPR": false, "PPR": false,
"PMC": false, "PMC": true,
"PIPC": false, "PIPC": false,
"PM": false, "PM": false,
"PFCAE": false, "PFCAE": false,
"PFCE": false, "PFCE": true,
"PFC": false "PFC": false
}, },
"sleepPin": { "sleepPin": {
"pinModeName": "GPIO_OUT", "pinModeName": "TAUB2O7",
"circuitName": "SCHMITT1", "circuitName": "SCHMITT1",
"PINV": false, "PINV": false,
"PODC": false, "PODC": false,
...@@ -4891,14 +4891,14 @@ ...@@ -4891,14 +4891,14 @@
"PU": false, "PU": false,
"PD": false, "PD": false,
"PBDC": false, "PBDC": false,
"PIBC": true, "PIBC": false,
"P": false, "P": false,
"PPR": false, "PPR": false,
"PMC": false, "PMC": true,
"PIPC": false, "PIPC": false,
"PM": false, "PM": false,
"PFCAE": false, "PFCAE": false,
"PFCE": false, "PFCE": true,
"PFC": false "PFC": false
}, },
"pinModeList": { "pinModeList": {
...@@ -5621,7 +5621,7 @@ ...@@ -5621,7 +5621,7 @@
"pinName": "SPEED3_PWM_MCU_OUT", "pinName": "SPEED3_PWM_MCU_OUT",
"pinAddress": " 1H", "pinAddress": " 1H",
"wakeupPin": { "wakeupPin": {
"pinModeName": "TAUB1I10", "pinModeName": "TAUB2O15",
"circuitName": "SCHMITT1", "circuitName": "SCHMITT1",
"PINV": false, "PINV": false,
"PODC": false, "PODC": false,
...@@ -5636,13 +5636,13 @@ ...@@ -5636,13 +5636,13 @@
"PPR": false, "PPR": false,
"PMC": true, "PMC": true,
"PIPC": false, "PIPC": false,
"PM": true, "PM": false,
"PFCAE": false, "PFCAE": false,
"PFCE": true, "PFCE": true,
"PFC": true "PFC": false
}, },
"sleepPin": { "sleepPin": {
"pinModeName": "GPIO_OUT", "pinModeName": "TAUB2O15",
"circuitName": "SCHMITT1", "circuitName": "SCHMITT1",
"PINV": false, "PINV": false,
"PODC": false, "PODC": false,
...@@ -5652,14 +5652,14 @@ ...@@ -5652,14 +5652,14 @@
"PU": false, "PU": false,
"PD": false, "PD": false,
"PBDC": false, "PBDC": false,
"PIBC": true, "PIBC": false,
"P": false, "P": false,
"PPR": false, "PPR": false,
"PMC": false, "PMC": true,
"PIPC": false, "PIPC": false,
"PM": false, "PM": false,
"PFCAE": false, "PFCAE": false,
"PFCE": false, "PFCE": true,
"PFC": false "PFC": false
}, },
"pinModeList": { "pinModeList": {
......
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