Commit e25ed3ae authored by hu's avatar hu

的不过

parent 0955e8c2
......@@ -125,7 +125,7 @@ void Kwp2000_AscInit(void)
TJA1021_Enable(1);
/* disable transmitter interrupt */
//Uart_DisableTxInterrupt(); /*----20220309----*/
// Uart_DisableTxInterrupt(); /*----20220309----*/
/// -----------------------------------------------------------------------
/// 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
/**The noise filter is enabled**/
u32UARTAddress = u32UARTAddressBase + 0x08U;
(*((uint8_t *)(u32UARTAddress))) = 0X01U;
//RLN31LMD = 0X01U;
// RLN31LMD = 0X01U;
/**disable error detection.**/
u32UARTAddress = u32UARTAddressBase + 0x0DU;
......@@ -453,7 +453,6 @@ void UART_CH3_TX_ISR(void)
/***********************************************************************/
/***********************************************************************/
/***********************************************************************/
//#define UART_CH_SEL UART_RLIN30
#define UART_CH_SEL UART_RLIN32
/*****所有引脚相关根据实际引脚自行添加****/
......@@ -470,15 +469,6 @@ void UART_CH3_TX_ISR(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)
--------------------------------------------------------------------------*/
unsigned char Uart_GetRxLevel(void)
{
// return PTS_PTS0;
return GPIO_IN_PORT00_PIN03;
}
......@@ -505,8 +494,6 @@ unsigned char Uart_GetRxLevel(void)
--------------------------------------------------------------------------*/
void Uart_ClearRxFullFlag(void)
{
//SCI0SR1_RDRF = 1;
switch (UART_CH_SEL)
{
case UART_RLIN30:
......@@ -542,30 +529,13 @@ void Uart_ClearRxFullFlag(void)
* Return : None
* onther :
--------------------------------------------------------------------------*/
//uint8_t hyq_test[20] = {0};
//uint32_t hyq_test_UART = 0U;
void UART_Read_ISR(uint16_t u16UARTData)
{
Kwp2000_AscRxInterrupt();//包含一下,然后打开即可
//hyq_test[hyq_test_UART] = u16UARTData;
//hyq_test_UART++;
Kwp2000_AscRxInterrupt(); //包含一下,然后打开即可
}
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;
stUARTConfig.u32UARTChEn = 1U;
......@@ -586,7 +556,6 @@ void Uart_SetBaudrate(unsigned long xBaudrate_u32)
--------------------------------------------------------------------------*/
void Uart_SetRxGpio(void)
{
// DDRS_DDRS0 = 0;
}
/*-------------------------------------------------------------------------
......@@ -599,7 +568,6 @@ void Uart_SetRxGpio(void)
--------------------------------------------------------------------------*/
void Uart_SetTxGpio(void)
{
// DDRS_DDRS1 = 1;
}
/*-------------------------------------------------------------------------
......@@ -686,9 +654,6 @@ void Uart_DisableRx(void)
--------------------------------------------------------------------------*/
void TJA1021_Enable(unsigned char state)
{
// DDRR_DDRR3 = 1;
// PTR_PTR3 = state;
LIN_SLP_N_MCU = state;
}
......@@ -739,10 +704,6 @@ void Uart_EnableTx(void)
--------------------------------------------------------------------------*/
void Uart_ClearAllErrorFlag(void)
{
// unsigned long xTmp_u32;
// xTmp_u32 = SCI0SR1;
// xTmp_u32 = SCI0DRL;
switch (UART_CH_SEL)
{
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