summaryrefslogtreecommitdiff
path: root/firmware/io.h
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2011-10-11 21:56:36 +0200
committerYves Fischer <yvesf-git@xapek.org>2011-10-11 21:56:36 +0200
commitcbc941282074856fc6179761b70a0c9879b0b64d (patch)
treeed15c6d9e20ceaf1ff01a05aa63054410bb8ed54 /firmware/io.h
parent324c5ba9098c1010d0aa8c1e26b95509878ce9f2 (diff)
downloadmini-octopus-cbc941282074856fc6179761b70a0c9879b0b64d.tar.gz
mini-octopus-cbc941282074856fc6179761b70a0c9879b0b64d.zip
update firmware to @319
Diffstat (limited to 'firmware/io.h')
-rw-r--r--firmware/io.h168
1 files changed, 5 insertions, 163 deletions
diff --git a/firmware/io.h b/firmware/io.h
index f86314f..5cfb5f4 100644
--- a/firmware/io.h
+++ b/firmware/io.h
@@ -38,169 +38,9 @@
#include <avr/io.h>
#include <avr/pgmspace.h>
-
-#define OX_PIN1 PINE
-#define OX_PIN2 PINE
-#define OX_PIN3 PINE
-#define OX_PIN4 PINB
-#define OX_PIN5 PINB
-#define OX_PIN6 PINB
-#define OX_PIN7 PINB
-#define OX_PIN8 PINB
-#define OX_PIN9 PINB
-#define OX_PIN10 PINB
-#define OX_PIN11 PINB
-#define OX_PIN12 PIND
-#define OX_PIN13 PIND
-#define OX_PIN14 PIND
-#define OX_PIN15 PIND
-#define OX_PIN16 PIND
-#define OX_PIN17 PIND
-#define OX_PIN18 PIND
-#define OX_PIN19 PIND
-
-#define OX_PIN26 PINC
-#define OX_PIN27 PINC
-#define OX_PIN28 PINC
-#define OX_PIN29 PINC
-#define OX_PIN30 PINC
-#define OX_PIN31 PINC
-#define OX_PIN32 PINC
-#define OX_PIN33 PINF
-#define OX_PIN34 PINF
-#define OX_PIN35 PINF
-#define OX_PIN36 PINF
-#define OX_PIN37 PINF
-#define OX_PIN38 PINF
-#define OX_PIN39 PINF
-#define OX_PIN40 PINF
-#define OX_PIN41 PINE
-#define OX_PIN42 PINE
-#define OX_PIN43 PINE
-#define OX_PIN44 PINE
-
-#define OX_PORT1 PORTE
-#define OX_PORT2 PORTE
-#define OX_PORT3 PORTE
-#define OX_PORT4 PORTB
-#define OX_PORT5 PORTB
-#define OX_PORT6 PORTB
-#define OX_PORT7 PORTB
-#define OX_PORT8 PORTB
-#define OX_PORT9 PORTB
-#define OX_PORT10 PORTB
-#define OX_PORT11 PORTB
-#define OX_PORT12 PORTD
-#define OX_PORT13 PORTD
-#define OX_PORT14 PORTD
-#define OX_PORT15 PORTD
-#define OX_PORT16 PORTD
-#define OX_PORT17 PORTD
-#define OX_PORT18 PORTD
-#define OX_PORT19 PORTD
-
-#define OX_PORT26 PORTC
-#define OX_PORT27 PORTC
-#define OX_PORT28 PORTC
-#define OX_PORT29 PORTC
-#define OX_PORT30 PORTC
-#define OX_PORT31 PORTC
-#define OX_PORT32 PORTC
-#define OX_PORT33 PORTF
-#define OX_PORT34 PORTF
-#define OX_PORT35 PORTF
-#define OX_PORT36 PORTF
-#define OX_PORT37 PORTF
-#define OX_PORT38 PORTF
-#define OX_PORT39 PORTF
-#define OX_PORT40 PORTF
-#define OX_PORT41 PORTE
-#define OX_PORT42 PORTE
-#define OX_PORT43 PORTE
-#define OX_PORT44 PORTE
-
-#define OX_DDR1 DDRE
-#define OX_DDR2 DDRE
-#define OX_DDR3 DDRE
-#define OX_DDR4 DDRB
-#define OX_DDR5 DDRB
-#define OX_DDR6 DDRB
-#define OX_DDR7 DDRB
-#define OX_DDR8 DDRB
-#define OX_DDR9 DDRB
-#define OX_DDR10 DDRB
-#define OX_DDR11 DDRB
-#define OX_DDR12 DDRD
-#define OX_DDR13 DDRD
-#define OX_DDR14 DDRD
-#define OX_DDR15 DDRD
-#define OX_DDR16 DDRD
-#define OX_DDR17 DDRD
-#define OX_DDR18 DDRD
-#define OX_DDR19 DDRD
-
-#define OX_DDR26 DDRC
-#define OX_DDR27 DDRC
-#define OX_DDR28 DDRC
-#define OX_DDR29 DDRC
-#define OX_DDR30 DDRC
-#define OX_DDR31 DDRC
-#define OX_DDR32 DDRC
-#define OX_DDR33 DDRF
-#define OX_DDR34 DDRF
-#define OX_DDR35 DDRF
-#define OX_DDR36 DDRF
-#define OX_DDR37 DDRF
-#define OX_DDR38 DDRF
-#define OX_DDR39 DDRF
-#define OX_DDR40 DDRF
-#define OX_DDR41 DDRE
-#define OX_DDR42 DDRE
-#define OX_DDR43 DDRE
-#define OX_DDR44 DDRE
-
-
-#define OX_P1 PE5
-#define OX_P2 PE6
-#define OX_P3 PE7
-#define OX_P4 PB0
-#define OX_P5 PB1
-#define OX_P6 PB2
-#define OX_P7 PB3
-#define OX_P8 PB4
-#define OX_P9 PB5
-#define OX_P10 PB6
-#define OX_P11 PB7
-#define OX_P12 PD0
-#define OX_P13 PD1
-#define OX_P14 PD2
-#define OX_P15 PD3
-#define OX_P16 PD4
-#define OX_P17 PD5
-#define OX_P18 PD6
-#define OX_P19 PD7
-
-#define OX_P26 PC0
-#define OX_P27 PC1
-#define OX_P28 PC2
-#define OX_P29 PC3
-#define OX_P30 PC4
-#define OX_P31 PC5
-#define OX_P32 PC6
-#define OX_P33 PF7
-#define OX_P34 PF6
-#define OX_P35 PF5
-#define OX_P36 PF4
-#define OX_P37 PF3
-#define OX_P38 PF2
-#define OX_P39 PF1
-#define OX_P40 PF0
-#define OX_P41 PE0
-#define OX_P42 PE1
-#define OX_P43 PE2
-#define OX_P44 PE3
-
-
+#ifdef __AVR_AT90CAN128__
+ #define OCTOPUS_CAN
+#endif
void io_parser(char *buf);
@@ -240,6 +80,8 @@ void io_set_pin_usb(uint8_t pin, uint8_t value);
uint8_t io_get_pin(uint8_t pin, uint8_t *value);
void io_get_pin_usb(uint8_t pin);
+void io_set_status_led(uint8_t on);
+void io_set_status_led_usb(uint8_t on);
#define PORT(port,pin) (PORT##port)
#define DDR(port,pin) (DDR##port)