Subversion Repositories Code-Repo

Rev

Rev 222 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
202 Kevin 1
#ifndef MAIN_H
2
#define	MAIN_H
3
 
4
#define UART_RX_TRIS TRISCbits.TRISC5
5
#define UART_TX_TRIS TRISCbits.TRISC4
6
#define UART_CTS_TRIS TRISCbits.TRISC3
7
#define UART_CTS_LAT LATCbits.LATC3
8
#define UART_RTS_TRIS TRISCbits.TRISC6
9
#define UART_RTS_LAT LATCbits.LATC6
10
 
11
#define I2C_CLK_TRIS TRISBbits.TRISB6
12
#define I2C_DAT_TRIS TRISBbits.TRISB4
13
 
222 Kevin 14
#define LED_R_TRIS TRISCbits.TRISC0
15
#define LED_R_LAT LATCbits.LATC0
202 Kevin 16
 
222 Kevin 17
#define LED_G_TRIS TRISCbits.TRISC1
18
#define LED_G_LAT LATCbits.LATC1
19
 
20
#define LED_B_TRIS TRISCbits.TRISC2
21
#define LED_B_LAT LATCbits.LATC2
22
 
23
// Active low reset
202 Kevin 24
#define BLE_RESET_TRIS TRISCbits.TRISC7
25
#define BLE_RESET_LAT LATCbits.LATC7
26
 
27
#define ADDRESS_GYRO 0x6B
28
#define ADDRESS_ACCL 0x19
29
#define ADDRESS_MAGN 0x1E
30
#define ADDRESS_LIPO 0x36
31
 
32
#define _XTAL_FREQ 32000000
33
 
222 Kevin 34
#define LED_R_MAX_BRIGHTNESS 5
35
#define LED_G_MAX_BRIGHTNESS 20
36
#define LED_B_MAX_BRIGHTNESS 30 // Dont set this past 100!
37
 
202 Kevin 38
#endif	/* MAIN_H */
39
 
40
// <editor-fold defaultstate="collapsed" desc="Pinouts">
41
/*
42
1/RA3 - MCLR
43
2/RC5 - UART RX
44
3/RC4 - UART TX
45
4/RC3 - UART CTS
46
5/RC6 - UART RTS
47
6/RC7 - BLE RESET
48
7/RB7 - Acc Interrupt 1
49
8/RB6 - I2C SCL
50
9/RB5 - Mag Interrupt
51
10/RB4 - I2C SDA
52
11/RC2 - BLE SLEEP
53
12/RC1 - LED
54
13/RC0 - BLE Mode Toggle
55
14/RA2 - Gyro Interrupt 2
56
15/RA1 - ICSPCLK
57
16/RA0 - ISCLDAT
58
17/VSS - GND
59
18/VDD - VDD
60
19/RA5 - T1 OSO
61
20/RA4 - T1 OSO
62
*/
63
// </editor-fold>