first use of libmbus

This commit is contained in:
2020-11-03 14:00:54 +01:00
parent 54233f4a99
commit a928e15e74
3 changed files with 63 additions and 33 deletions

View File

@ -25,10 +25,19 @@ void my_errorHandler() {
}
void helloMeterbus(void *handle) {
static t_mbusDevice device = {
.deviceName = "Total Power",
.address = 80,
.consideredField = {
{ .label = "energy", .index = 0 },
{ .label = "power", .index = 17 }
}
};
static uint32_t cnt = 0;
logMsg("*** NEW REQUEST %d ***", cnt);
cnt++;
mbusCommRequest(0x5b, 80);
mbusCommRequest(&device);
// static char msg[] = "Hello";
// HAL_UART_Transmit_IT(&mbusUart, &msg, strlen(msg));