/Designs/GPSnavigator/SW/GPS/GPS.h
36,10 → 36,10
#define GPS_PORT PORTD
 
// UART SW
#define USB PD5 // input
#define USB_DDR DDRD
#define USB_PORT PORTD
#define USB_PIN PIND
#define RX PD2 // input
#define RX_DDR DDRD
#define RX_PORT PORTD
#define RX_PIN PIND
 
// i2C SW
#define SDA PC1
79,9 → 79,9
#define GPS_INIT GPS_DDR |= _BV(GPS)
#define GPS_INPUT (!(GPS_PORT & _BV(GPS)))
 
#define USB_INIT USB_DDR &= ~(_BV(USB))
#define USB_INPUT (USB_PIN & _BV(USB))
#define USB_PULLUP USB_PORT |= _BV(USB)
#define RX_INIT RX_DDR &= ~(_BV(RX))
#define RX_INPUT (RX_PIN & _BV(RX))
#define RX_PULLUP RX_PORT |= _BV(RX)
 
#define SCL_INIT SCL_DDR |= _BV(SCL)
#define SCL_L SCL_PORT &= ~(_BV(SCL))
108,15 → 108,8
 
#define KEY1 0
#define KEY2 1
#define KEY3 2
#define KEY3 3
 
#define KEY1_LONG 1
#define KEY2_LONG 2
#define KEY3_LONG 3
#define KEY1_SHORT 4
#define KEY2_SHORT 5
#define KEY3_SHORT 6
 
#define ID_OFF 100
#define ID_START 101
#define ID_SETUP 102