refactoring meterbus

This commit is contained in:
Wolfgang Hottgenroth 2020-11-24 13:50:06 +01:00
parent eb47d41e5a
commit 7a088f19f2
Signed by: wn
GPG Key ID: 6C1E5E531E0D5D7F

View File

@ -677,6 +677,17 @@ static void mbusCommScheduler(void *handle) {
void mbusCommInit() { void mbusCommInit() {
coloredMsg(LOG_GREEN, true, "mbc mci initializing Meterbus communication"); coloredMsg(LOG_GREEN, true, "mbc mci initializing Meterbus communication");
// enable receive interrupts
/* Enable the UART Parity Error Interrupt */
__HAL_UART_ENABLE_IT(&mbusUart, UART_IT_PE);
/* Enable the UART Error Interrupt: (Frame error, noise error, overrun error) */
__HAL_UART_ENABLE_IT(&mbusUart, UART_IT_ERR);
/* Enable the UART Data Register not empty Interrupt */
__HAL_UART_ENABLE_IT(&mbusUart, UART_IT_RXNE);
// FIXME // FIXME
schAdd(mbusCommScheduler, NULL, 0, 1000); schAdd(mbusCommScheduler, NULL, 0, 1000);
} }