Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VC66_7C
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISUZU
VC66_7C
Commits
e25ed3ae
Commit
e25ed3ae
authored
Mar 09, 2022
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
的不过
parent
0955e8c2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
42 deletions
+3
-42
kwp2000_interface.c
source/Application/K_BUS/kwp2000_interface.c
+1
-1
UART.c
source/Driver/UART/UART.c
+2
-41
No files found.
source/Application/K_BUS/kwp2000_interface.c
View file @
e25ed3ae
...
...
@@ -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:
...
...
source/Driver/UART/UART.c
View file @
e25ed3ae
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment