Project

General

Profile

Revision ac0f8544

IDac0f85449c6206c5d1197128097c8eebf4e8885e
Parent a177a382
Child 687e9f18

Added by gustavobica almost 7 years ago

- On/Off Megatron and On/Off Power

View differences:

tpf/io.c
23 23
        digitalWrite(INSIDE_LIGHT,LOW);
24 24
        return 0;
25 25
    }
26
     uint8_t turnOffMegatron(){
27
        digitalWrite(WAVE_LED,LOW);
28
        return 0;
29
    }
30
     uint8_t turnOnMegatron(){
31
        digitalWrite(WAVE_LED,HIGH);
32
        return 0;
33
    }
26 34
    uint8_t IsDoorOpen(uint8_t* state){
27 35
        
28 36
        
......
34 42
            *state=0;
35 43
        }
36 44
        return 0;
37
    }        
45
    }
46
    uint8_t PowerOff(uint8_t* state){
47
        
48
       digitalWrite(POWER_BTN,LOW);
49
       *state=0;
50
        return 0;
51
    } 
52
    uint8_t PowerOn(uint8_t* state){
53
        
54
       *state=1; 
55
       digitalWrite(POWER_BTN,HIGH);
56
        return 0;
57
    } 
38 58
    
39 59
    
40 60
   
tpf/io.h
54 54
 */
55 55
uint8_t IsDoorOpen(uint8_t* state );
56 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

  
57 84
    
58 85

  

Also available in: Unified diff