Subversion Repositories Code-Repo

Rev

Rev 128 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 128 Rev 129
Line 20... Line 20...
20
//#define _TEST_SSD1306_OLED
20
//#define _TEST_SSD1306_OLED
21
//#define _TEST_SSD1331_OLED
21
//#define _TEST_SSD1331_OLED
22
//#define _TEST_ADC
22
//#define _TEST_ADC
23
#define _TEST_XBEE
23
#define _TEST_XBEE
24
 
24
 
25
// Option to choose between active OLED displays
-
 
26
//#define GFX_SSD1306
-
 
27
#define GFX_SSD1331
-
 
28
 
-
 
29
// Enable or disable debug prints depending on project preprocessor (_DEBUG)
25
// Enable or disable debug prints depending on project preprocessor (_DEBUG)
30
#ifdef _DEBUG
26
#ifdef _DEBUG
31
#define DBG_PRINT_MAIN(x) UART1_WriteS(x)
27
#define DBG_PRINT_MAIN(x) UART1_WriteS(x)
32
#define DBG_PRINT_UART(x) UART1_WriteS(x)
28
#define DBG_PRINT_UART(x) UART1_WriteS(x)
33
#define DBG_PRINT_I2C(x) UART1_WriteS(x)
29
#define DBG_PRINT_I2C(x) UART1_WriteS(x)
Line 45... Line 41...
45
#define DBG_PRINT_PORTB_INT(x)
41
#define DBG_PRINT_PORTB_INT(x)
46
#define DBG_PRINT_INT(x)
42
#define DBG_PRINT_INT(x)
47
#define DBG_PRINT_BUFFER(x)
43
#define DBG_PRINT_BUFFER(x)
48
#endif
44
#endif
49
 
45
 
-
 
46
// Pin allocations
-
 
47
#define ADC_AN0_TRIS            TRISAbits.TRISA0
-
 
48
#define ADC_AN1_TRIS            TRISAbits.TRISA1
-
 
49
#define ADC_AN2_TRIS            TRISAbits.TRISA2
-
 
50
 
-
 
51
#define XBEE_CTS_TRIS           TRISBbits.TRISB0
-
 
52
#define XBEE_CTS_LAT            LATBbits.LATB0
-
 
53
#define XBEE_CTS_PORT           PORTBbits.RB0
-
 
54
#define XBEE_RTS_TRIS           TRISBbits.TRISB1
-
 
55
#define XBEE_RTS_LAT            LATBbits.LATB1
-
 
56
 
-
 
57
#define SPI_MOSI_TRIS           TRISBbits.TRISB2
-
 
58
#define SPI_MISO_TRIS           TRISBbits.TRISB3
-
 
59
#define SPI_CLK_TRIS            TRISBbits.TRISB4
-
 
60
#define SPI_DC_SELECT_TRIS      TRISBbits.TRISB5
-
 
61
#define SPI_DC_SELECT_LAT       LATBbits.LATB5
-
 
62
#define SPI_RESET_TRIS          TRISBbits.TRISB6
-
 
63
#define SPI_RESET_LAT           LATBbits.LATB6
-
 
64
#define SPI_SLAVE_SELECT_TRIS   TRISBbits.TRISB7
-
 
65
#define SPI_SLAVE_SELECT_LAT    LATBbits.LATB7
-
 
66
 
-
 
67
#define NFC_IRQ_TRIS            TRISCbits.TRISC1
-
 
68
#define NFC_IRQ_PORT            PORTCbits.RC1
-
 
69
#define NFC_RESET_TRIS          TRISCbits.TRISC2
-
 
70
#define NFC_RESET_LAT           LATCbits.LATC2
-
 
71
 
-
 
72
#define I2C_CLK_TRIS            TRISCbits.TRISC3
-
 
73
#define I2C_DAT_TRIS            TRISCbits.TRISC4
-
 
74
 
-
 
75
#define UART1_RX_TRIS           TRISCbits.TRISC7
-
 
76
#define UART1_TX_TRIS           TRISCbits.TRISC6
-
 
77
 
-
 
78
// PPS bindings
-
 
79
#define PPS_SPI2_CLK_IN         7
-
 
80
#define PPS_SPI2_CLK_OUT        RPOR7
-
 
81
#define PPS_SPI2_MISO           6
-
 
82
#define PPS_SPI2_MOSI           RPOR5
-
 
83
 
50
#endif
84
#endif
51
 
85