/*
 * commonMsg.h
 *
 *  Created on: 2025/06/17
 *      Author: x.walter
 */

#ifndef COMMONMSG_H_
#define COMMONMSG_H_


typedef enum {
  DUMMY,
  WATER_TANK
} MODULE_ID;

typedef enum {
  OP_NORMAL, OP_RESET=0x0100, OP_CALIBRATION, OP_FACTORY_RESET
} CommandOpcode;


typedef struct {
  CommandOpcode opcode;
  uint16_t parameter;
} MSG_STRUCT;

#ifdef __cplusplus
extern "C" {
#endif

osMessageQId getQueueId(MODULE_ID moduleId);
MSG_STRUCT *allocMemoryPoolMessage();
void freeMemoryPoolMessage(MSG_STRUCT *p_message);

#ifdef __cplusplus
}
#endif


#endif /* COMMONMSG_H_ */
