refactoring meterbus
This commit is contained in:
parent
f37361b659
commit
d2c4efc8db
@ -251,6 +251,16 @@ static void parseAndPrintFrame() {
|
||||
void mbusCommISR() {
|
||||
// coloredMsg(LOG_RED, false, "mbc isr");
|
||||
show(DEBUG_1, TOGGLE);
|
||||
|
||||
uint32_t isrflags = READ_REG(mbusUart.Instance->SR);
|
||||
uint32_t cr1its = READ_REG(mbusUart.Instance->CR1);
|
||||
uint32_t cr3its = READ_REG(mbusUart.Instance->CR3);
|
||||
|
||||
if (((isrflags & USART_SR_RXNE) != RESET) && ((cr1its & USART_CR1_RXNEIE) != RESET)) {
|
||||
uint8_t data = (uint8_t)(mbusUart.Instance->DR & (uint8_t)0x00FF);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void mbusCommExec() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user