Project

General

Profile

Statistics
| Branch: | Revision:

pse-2015-16-grupo-3 / tpf / config.c @ 78c254a7

History | View | Annotate | Download (1.62 KB)

1
/*
2
 * blink.c:
3
 *        Standard "blink" program in wiringPi. Blinks an LED connected
4
 *        to the first GPIO pin.
5
 *
6
 * Copyright (c) 2012-2013 Gordon Henderson. <projects@drogon.net>
7
 ***********************************************************************
8
 * This file is part of wiringPi:
9
 *        https://projects.drogon.net/raspberry-pi/wiringpi/
10
 *
11
 *    wiringPi is free software: you can redistribute it and/or modify
12
 *    it under the terms of the GNU Lesser General Public License as published by
13
 *    the Free Software Foundation, either version 3 of the License, or
14
 *    (at your option) any later version.
15
 *
16
 *    wiringPi is distributed in the hope that it will be useful,
17
 *    but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 *    GNU Lesser General Public License for more details.
20
 *
21
 *    You should have received a copy of the GNU Lesser General Public License
22
 *    along with wiringPi.  If not, see <http://www.gnu.org/licenses/>.
23
 ***********************************************************************
24
 */
25

    
26
#include <stdio.h>
27
#include <stdint.h>
28
#include <wiringPi.h>
29
#include "config.h"
30

    
31

    
32
uint8_t initBoard(){
33
    
34
    wiringPiSetup () ;
35
    
36
    /**
37
     * inputs
38
     */
39
    //power button
40
    pinMode (POWER_BTN, INPUT);
41
    //time button
42
    pinMode (TIME_BTN, INPUT);
43
    //+ button
44
    pinMode (PLUS_BTN, INPUT);
45
    //- button
46
    pinMode (MINUS_BTN, INPUT);
47
    //door switch (open/closed)
48
    pinMode (DOOR_SWITCH, INPUT);
49
    //on/off switch
50
    pinMode (ON_OF_SWITCH, INPUT);
51
    
52
    /**
53
     * outputs 
54
     */
55
    pinMode (WAVE_LED, OUTPUT);
56
    
57
}