1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
#ifndef WASTE_H
#define WASTE_H
#define temp_funcion 0
#define notOK 1
/*
#define SENSORFULL 1
#define SENSOROVERFLOW 1
#define SENSOREMPTY 0
#define SENSORnotFULL 0
#define SENSORnotOVERFLOW 0
#define SENSORnotEMPTY 1
*/
#define PUMPON 1
#define PUMPOFF 0
#define PRECENSE 1
#define NOTPRECENSE 0
typedef unsigned char U8;
typedef enum
{
WHS_CarteidgeNotPrecense = 0,
WHS_CarteidgePrecense
} WHS_CarteidgPrecenseSensorStatus;
typedef enum
{
WHS_CartridgeCoverCLOSE = 0,
WHS_CartridgeCoverOPEN
} WHS_CarteidgeCoverSensorStatus;
typedef enum
{
SENSORFULL = 0,
SENSORnotFULL
} WHS_FullSensorStatus;
typedef enum
{
SENSORnotEMPTY = 0,
SENSOREMPTY
} WHS_EmptySensorStatus;
typedef enum
{
WHS_empty = 0,
WHS_filling,
WHS_emptying,
WHS_full,
WHS_overflow,
WHS_sttError
} WHS_sttMachin;
typedef enum
{
WHS_no_event = 0,
WHS_overflow_sensor,
WHS_full_sensor,
WHS_empty_sensor,
WHS_waste1_presence_sensor,
WHS_waste2_presence_sensor,
WHS_filter_sensor,
WHS_cartridge_cover_sensor,
WHS_Timeout
} WHS_sensor;
typedef enum
{
WasteEmpty = 0,
WasteFilling,
WasteFail,
WasteFull
} cartridge_status;
typedef enum
{
led_on = 0,
led_off,
led_blink,
led_panic
} led_status;
typedef enum
{
waste_cartridge1 = 0,
waste_cartridge2,
no_waste_cartridge
} cartridge_name;
U8 WHS_init(void);
U8 WHS_HW_test(void);
bool WHS_IsEmptying();
bool WHS_IsContainerFull();
bool WHS_IsContainerEmpty();
bool WHS_IsContainerOverflow();
bool WHS_WasteCartridgeLowerPresent();
bool WHS_WasteCartridgeMiddlePresent();
bool WHS_IsPumpActive();
bool WHS_IsValveOpen();
bool SetWastePump( bool power);
#endif
|