refactoring meterbus
This commit is contained in:
parent
eb47d41e5a
commit
7a088f19f2
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user