pse-firmware/Core/Inc/PSE_unit.h
2023-08-09 14:49:02 +02:00

31 lines
684 B
C

/*
* PSE_unit.h
*
* Created on: Aug 9, 2023
* Author: leo
*/
#ifndef INC_PSE_UNIT_H_
#define INC_PSE_UNIT_H_
#include <stdint.h>
typedef struct{
char name[16]; // brand / name
uint16_t diameter; // diameter (in µm)
} pse_syringe;
typedef enum {PORT_X, PORT_Y, PORT_Z, PORT_E} pse_ports;
typedef struct{
uint8_t enabled;
pse_ports port; // physical port on which this unit is connected
uint32_t flow; // flow (in µL.min-1)
uint32_t volume; // current volume dispensed (in µL)
uint32_t set_volume; // volume to stop at (0 for no max)
pse_syringe* syringe; // associated syringe
} pse_unit;
void load_units(pse_unit* units, uint8_t unit_num);
#endif