Commit e25ed3ae authored by hu's avatar hu

的不过

parent 0955e8c2
...@@ -125,7 +125,7 @@ void Kwp2000_AscInit(void) ...@@ -125,7 +125,7 @@ void Kwp2000_AscInit(void)
TJA1021_Enable(1); TJA1021_Enable(1);
/* disable transmitter interrupt */ /* disable transmitter interrupt */
//Uart_DisableTxInterrupt(); /*----20220309----*/ // Uart_DisableTxInterrupt(); /*----20220309----*/
/// ----------------------------------------------------------------------- /// -----------------------------------------------------------------------
/// Configuration of the ASC0 Operation Mode: /// Configuration of the ASC0 Operation Mode:
......
...@@ -167,7 +167,7 @@ uint32_t UART_Init(UART_Channel_en_t enUARTCh, UART_Channel_Config_st_t *penUART ...@@ -167,7 +167,7 @@ uint32_t UART_Init(UART_Channel_en_t enUARTCh, UART_Channel_Config_st_t *penUART
/**The noise filter is enabled**/ /**The noise filter is enabled**/
u32UARTAddress = u32UARTAddressBase + 0x08U; u32UARTAddress = u32UARTAddressBase + 0x08U;
(*((uint8_t *)(u32UARTAddress))) = 0X01U; (*((uint8_t *)(u32UARTAddress))) = 0X01U;
//RLN31LMD = 0X01U; // RLN31LMD = 0X01U;
/**disable error detection.**/ /**disable error detection.**/
u32UARTAddress = u32UARTAddressBase + 0x0DU; u32UARTAddress = u32UARTAddressBase + 0x0DU;
...@@ -453,7 +453,6 @@ void UART_CH3_TX_ISR(void) ...@@ -453,7 +453,6 @@ void UART_CH3_TX_ISR(void)
/***********************************************************************/ /***********************************************************************/
/***********************************************************************/ /***********************************************************************/
/***********************************************************************/ /***********************************************************************/
//#define UART_CH_SEL UART_RLIN30
#define UART_CH_SEL UART_RLIN32 #define UART_CH_SEL UART_RLIN32
/*****所有引脚相关根据实际引脚自行添加****/ /*****所有引脚相关根据实际引脚自行添加****/
...@@ -470,15 +469,6 @@ void UART_CH3_TX_ISR(void) ...@@ -470,15 +469,6 @@ void UART_CH3_TX_ISR(void)
--------------------------------------------------------------------------*/ --------------------------------------------------------------------------*/
void Uart_ConfigOperationMode(void) void Uart_ConfigOperationMode(void)
{ {
// SCI0SR2_AMAP = 1;
// SCI0ACR1_RXEDGIE = 0; /* RXEDGIF interrupt requests disabled */
// SCI0ACR1_BERRIE = 0; /* BERRIF interrupt requests disabled */
// SCI0ACR1_BKDIE = 0; /* BKDIF interrupt requests disabled */
// SCI0SR2_AMAP = 0;
// SCI0CR1_M = 0;
// SCI0CR1_WAKE = 0;
// SCI0CR1_PE = 0;
} }
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
...@@ -491,7 +481,6 @@ void Uart_ConfigOperationMode(void) ...@@ -491,7 +481,6 @@ void Uart_ConfigOperationMode(void)
--------------------------------------------------------------------------*/ --------------------------------------------------------------------------*/
unsigned char Uart_GetRxLevel(void) unsigned char Uart_GetRxLevel(void)
{ {
// return PTS_PTS0;
return GPIO_IN_PORT00_PIN03; return GPIO_IN_PORT00_PIN03;
} }
...@@ -505,8 +494,6 @@ unsigned char Uart_GetRxLevel(void) ...@@ -505,8 +494,6 @@ unsigned char Uart_GetRxLevel(void)
--------------------------------------------------------------------------*/ --------------------------------------------------------------------------*/
void Uart_ClearRxFullFlag(void) void Uart_ClearRxFullFlag(void)
{ {
//SCI0SR1_RDRF = 1;
switch (UART_CH_SEL) switch (UART_CH_SEL)
{ {
case UART_RLIN30: case UART_RLIN30:
...@@ -542,30 +529,13 @@ void Uart_ClearRxFullFlag(void) ...@@ -542,30 +529,13 @@ void Uart_ClearRxFullFlag(void)
* Return : None * Return : None
* onther : * onther :
--------------------------------------------------------------------------*/ --------------------------------------------------------------------------*/
//uint8_t hyq_test[20] = {0};
//uint32_t hyq_test_UART = 0U;
void UART_Read_ISR(uint16_t u16UARTData) void UART_Read_ISR(uint16_t u16UARTData)
{ {
Kwp2000_AscRxInterrupt();//包含一下,然后打开即可 Kwp2000_AscRxInterrupt(); //包含一下,然后打开即可
//hyq_test[hyq_test_UART] = u16UARTData;
//hyq_test_UART++;
} }
void Uart_SetBaudrate(unsigned long xBaudrate_u32) void Uart_SetBaudrate(unsigned long xBaudrate_u32)
{ {
// unsigned long fModule_u32;
// unsigned char IREN;
// fModule_u32 = BOARD_TMBCLK_HZ;
// SCI0SR2_AMAP = 0;
// SCI0BDH_TNP = 3;
// SCI0BDH_IREN = 0; /* IR disabled */
// /* set ASC registers for new baudrate */
// IREN = SCI0BDH_IREN;
// SCI0BD_SBR = fModule_u32 / ((IREN + 1) * 16) / xBaudrate_u32;
UART_Channel_Config_st_t stUARTConfig; UART_Channel_Config_st_t stUARTConfig;
stUARTConfig.u32UARTChEn = 1U; stUARTConfig.u32UARTChEn = 1U;
...@@ -586,7 +556,6 @@ void Uart_SetBaudrate(unsigned long xBaudrate_u32) ...@@ -586,7 +556,6 @@ void Uart_SetBaudrate(unsigned long xBaudrate_u32)
--------------------------------------------------------------------------*/ --------------------------------------------------------------------------*/
void Uart_SetRxGpio(void) void Uart_SetRxGpio(void)
{ {
// DDRS_DDRS0 = 0;
} }
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
...@@ -599,7 +568,6 @@ void Uart_SetRxGpio(void) ...@@ -599,7 +568,6 @@ void Uart_SetRxGpio(void)
--------------------------------------------------------------------------*/ --------------------------------------------------------------------------*/
void Uart_SetTxGpio(void) void Uart_SetTxGpio(void)
{ {
// DDRS_DDRS1 = 1;
} }
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
...@@ -686,9 +654,6 @@ void Uart_DisableRx(void) ...@@ -686,9 +654,6 @@ void Uart_DisableRx(void)
--------------------------------------------------------------------------*/ --------------------------------------------------------------------------*/
void TJA1021_Enable(unsigned char state) void TJA1021_Enable(unsigned char state)
{ {
// DDRR_DDRR3 = 1;
// PTR_PTR3 = state;
LIN_SLP_N_MCU = state; LIN_SLP_N_MCU = state;
} }
...@@ -739,10 +704,6 @@ void Uart_EnableTx(void) ...@@ -739,10 +704,6 @@ void Uart_EnableTx(void)
--------------------------------------------------------------------------*/ --------------------------------------------------------------------------*/
void Uart_ClearAllErrorFlag(void) void Uart_ClearAllErrorFlag(void)
{ {
// unsigned long xTmp_u32;
// xTmp_u32 = SCI0SR1;
// xTmp_u32 = SCI0DRL;
switch (UART_CH_SEL) switch (UART_CH_SEL)
{ {
case UART_RLIN30: case UART_RLIN30:
......
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