Project

General

Profile

Statistics
| Branch: | Revision:

pse-2015-16-grupo-3 / tpf / io.h @ ac0f8544

History | View | Annotate | Download (1.54 KB)

1
/* 
2
 * File:   io.h
3
 * Author: gustavobica
4
 *
5
 * Created on 02 November 2015, 16:49
6
 */
7

    
8

    
9

    
10
/*
11
* Deals with the input from the microwave (buttons,switches,etc) and also deals with the output (leds) 
12
*
13
*/
14

    
15

    
16

    
17
#define IN 1
18
#define OUT 0
19

    
20

    
21
#ifndef IO_H
22
#define        IO_H
23

    
24

    
25

    
26

    
27
#ifdef        __cplusplus
28
extern "C" {
29
#endif
30

    
31

    
32

    
33

    
34
#ifdef        __cplusplus
35
}
36
#endif
37

    
38
#endif        /* IO_H */
39

    
40

    
41
/*  
42
 *  \brief Turns the light on inside of the microwave on 
43
 *  \param no need to pass parameters, if successful returns 0, if not returns 1
44
 */
45
uint8_t turnOnLight();
46
/*  
47
 *  \brief Turns the light off inside of the microwave on 
48
 *  \param no need to pass parameters, if successful returns 0, if not returns 1
49
 */
50
uint8_t turnOffLight();
51
/*  
52
 *  \brief Checks if the microwave door is open 
53
 *  \param the pointer to the variable used for the check  , if successful returns 0, if not returns 1
54
 */
55
uint8_t IsDoorOpen(uint8_t* state );
56

    
57

    
58
/*  
59
 *  \brief Turns the megatron on  
60
 *  \param no need to pass parameters, if successful returns 0, if not returns 1
61
 */
62
uint8_t turnOffMegatron();
63
 
64
/*  
65
 *  \brief Turns the megatron off  
66
 *  \param no need to pass parameters, if successful returns 0, if not returns 1
67
 */ 
68
uint8_t turnOnMegatron();
69
 
70
/*  
71
 *  \brief Turns the power on  
72
 *  \param the pointer to the variable used for the check  , if successful returns 0, if not returns 1
73
 */  
74
uint8_t PowerOn(uint8_t* state);
75

    
76

    
77

    
78
/*  
79
 *  \brief Turns the power off  
80
 *  \param the pointer to the variable used for the check  , if successful returns 0, if not returns 1
81
 */ 
82
uint8_t PowerOff(uint8_t* state);
83

    
84
    
85