Project

General

Profile

Statistics
| Branch: | Revision:

pse-2015-16-grupo-3 / tpf / config.h @ 687e9f18

History | View | Annotate | Download (1.29 KB)

1
#ifndef CONFIG_H
2
#define CONFIG_H
3

    
4
#include <stdint.h>
5

    
6

    
7
/**
8
 *  macro values used to define wich pins to connect in the raspberry gpio
9
 * 
10
 */
11
//INPUT
12
#define POWER_BTN 11
13
#define TIME_BTN 1
14
#define PLUS_BTN 2
15
#define MINUS_BTN 3
16
#define START_STOP 7
17
#define DOOR_SWITCH 4
18
#define ON_OFF_SWITCH 6
19
#define TEMPERATURE_SWITCH 10
20

    
21
//output
22
#define INSIDE_LIGHT 7
23
#define WAVE_LED 6
24

    
25

    
26
//comment next line if using 7_SEGMENT display
27
#define LCD_NOT_SEG
28

    
29
#ifndef LCD_NOT_SEG
30
    #define 7_SEG_DIS0 10
31
    #define 7_SEG_DIS1 11
32
    #define 7_SEG_DIS2 12
33
    #define 7_SEG_DIS3 13
34
    #define 7_SEG_S0 14
35
    #define 7_SEG_S0 15
36
    #define 7_SEG_S0 16
37
    #define 7_SEG_S0 17
38
    #define 7_SEG_S0 18
39
    #define 7_SEG_S0 19
40
    #define 7_SEG_S0 20
41
#endif
42

    
43
#ifdef LCD_NOT_SEG
44
    #define LCD_PIN0 2
45
    #define LCD_PIN1 16
46
    #define LCD_PIN2 4
47
    #define LCD_PIN3 11
48
    #define LCD_PIN4 10
49
    #define LCD_PIN5 0
50
    #define LCD_PIN6 1
51
    #define LCD_PIN7 2
52
    #define LCD_PIN8 3
53
#endif
54

    
55
/**
56
 * 
57
 * defines the state(INPUT/OUTPUT) of the phisical pins in the raspberry gpio
58
 * @return 0 if success
59
 *         !0 if error
60
 * 
61
 */
62
uint8_t initBoard();
63

    
64

    
65
/**
66
 * 
67
 * get the LCD handler definitions to use the LCD display
68
 * @return 0 if success
69
 *         !0 if error
70
 * 
71
 */
72
uint8_t getLCDHandler(int* LCDHandl);
73

    
74

    
75
#endif