XMC4xxx: Finish code for USIC serial driver.

This commit is contained in:
Gregory Nutt
2017-03-20 12:47:26 -06:00
parent 8a3422f837
commit 4519b679af
2 changed files with 128 additions and 120 deletions
+6 -6
View File
@@ -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);
File diff suppressed because it is too large Load Diff