refactoring meterbus

This commit is contained in:
Wolfgang Hottgenroth 2020-11-24 14:19:12 +01:00
parent f37361b659
commit d2c4efc8db
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F

View File

@ -251,6 +251,16 @@ static void parseAndPrintFrame() {
void mbusCommISR() { void mbusCommISR() {
// coloredMsg(LOG_RED, false, "mbc isr"); // coloredMsg(LOG_RED, false, "mbc isr");
show(DEBUG_1, TOGGLE); 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() { void mbusCommExec() {