first use of libmbus

This commit is contained in:
2020-11-03 14:31:59 +01:00
parent 43fe49f90d
commit b1e2277ef5
3 changed files with 105 additions and 16 deletions

View File

@ -11,7 +11,7 @@ typedef struct {
uint8_t index;
} t_mbusFrameField;
#define MBUSDEVICE_NAMELENGTH 16
#define MBUSDEVICE_NAMELENGTH 24
#define MBUSDEVICE_NUM_OF_CONSIDEREDFIELDS 4
typedef struct {
char deviceName[MBUSDEVICE_NAMELENGTH];
@ -19,7 +19,13 @@ typedef struct {
t_mbusFrameField consideredField[MBUSDEVICE_NUM_OF_CONSIDEREDFIELDS];
} t_mbusDevice;
void mbusCommRequest(t_mbusDevice *mbusDevice);
typedef enum {
MBCRR_TRIGGERED = 0,
MBCRR_BUSY = 1
} e_mbusCommRequestResult;
e_mbusCommRequestResult mbusCommRequest(t_mbusDevice *mbusDevice);
void mbusCommTxCpltCallback(UART_HandleTypeDef *huart);
void mbusCommRxCpltCallback(UART_HandleTypeDef *huart);