SHOW:
|
|
- or go back to the newest paste.
1 | - | // process.h |
1 | + | // main application for testing the black box |
2 | ||
3 | - | #ifndef PROCESS_H |
3 | + | #include <stdio.h> |
4 | - | #define PROCESS_H |
4 | + | #include "process.h" |
5 | ||
6 | - | enum TStatusAlarm {ALARM_YES, ALARM_NO}; |
6 | + | void main (void) { |
7 | - | void process_init (void); |
7 | + | |
8 | - | TStatusAlarm process_ReadAlarmSensor(void); |
8 | + | TStatusAlarm alarma; |
9 | ||
10 | - | #endif |
10 | + | process_init (); |
11 | ||
12 | while(1) { | |
13 | alarma = process_ReadAlarmSensor(); | |
14 | if (alarma == ALARM_YES) { | |
15 | printf(" There are an ALAAAAARMMM!\"); | |
16 | } else { | |
17 | printf("All is quiet\n"); | |
18 | } | |
19 | } | |
20 | } |