summaryrefslogtreecommitdiff
path: root/src/pins.h
blob: 2842e5ca53cdcd92b597abbf091272caffdf0a6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef __PINS_INC
#define __PINS_INC
/**
 * CTS is connected to CTS, CTS is 1 when we are ready 
 * scope pins:
 *  1: desktop tx
 *  2: desktop rx
 *  3: desktop rts
 *  4: desktop cts
 */

#include <avr/io.h>

#ifdef __AVR_ATmega328P__
#define UART_DDR    DDRD
#define UART_CTS    PD2 
#define UART_RTS    PD3 
#define UART_PORT   PORTD

#define LED_DEBUG_DDR   DDRB
#define LED_DEBUG_PORT  PORTB
#define LED_DEBUG       PB5 
#elif __AVR_ATmega2560__
#define UART_DDR    DDRB
#define UART_CTS    PB6 
#define UART_RTS    PB5 
#define UART_PORT   PORTB
#define UART_PIN    PINB

#define LED_DEBUG_DDR   DDRB
#define LED_DEBUG_PORT  PORTB
#define LED_DEBUG       PB7
#else
#error "Only have arduino and arduino mega pin mappings!"
#endif



#endif

/**
yelow = slave rts/master cts
cyan = slave cts/master rts
pink = slave tx/master tx
blue = slave rx/slave tx
**/