mirror of
https://github.com/apache/nuttx.git
synced 2026-06-08 01:42:58 +08:00
XMC4xxx: Finish code for USIC serial driver.
This commit is contained in:
@@ -404,22 +404,22 @@ int xmc4_uart_configure(enum usic_channel_e channel,
|
||||
regval |= USIC_CCR_MODE_ASC;
|
||||
putreg32(regval, base + XMC4_USIC_CCR_OFFSET);
|
||||
|
||||
/* Set service request for UART protocol events.
|
||||
/* Set service request for UART protocol, receiver, and transmitter events.
|
||||
*
|
||||
* Set channel 0 protocol events on sevice request 0
|
||||
* Set channel 1 protocol events on sevice request 1
|
||||
* Set channel 0 events on sevice request 0
|
||||
* Set channel 1 events on sevice request 1
|
||||
*/
|
||||
|
||||
regval = getreg32(base + XMC4_USIC_INPR_OFFSET);
|
||||
regval &= ~USIC_INPR_PINP_MASK;
|
||||
regval &= ~(USIC_INPR_TBINP_MASK | USIC_INPR_RINP_MASK | USIC_INPR_PINP_MASK);
|
||||
|
||||
if (((unsigned int)channel & 1) != 0)
|
||||
{
|
||||
regval |= USIC_INPR_PINP_SR0;
|
||||
regval |= (USIC_INPR_TBINP_SR1 | USIC_INPR_RINP_SR1 | USIC_INPR_PINP_SR1);
|
||||
}
|
||||
else
|
||||
{
|
||||
regval |= USIC_INPR_PINP_SR1;
|
||||
regval |= (USIC_INPR_TBINP_SR0 | USIC_INPR_RINP_SR0 | USIC_INPR_PINP_SR0);
|
||||
}
|
||||
|
||||
putreg32(regval, base + XMC4_USIC_INPR_OFFSET);
|
||||
|
||||
+122
-114
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user