File tree Expand file tree Collapse file tree 3 files changed +96
-0
lines changed Expand file tree Collapse file tree 3 files changed +96
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
11
11
12
12
### Added
13
13
- Added support for the Arduino Zero and Due boards (and related)
14
+ - Added support for older ATmega8535, ATmega16 and ATmega32 microcontrollers
14
15
- Added method to LEDImage for drawing circles
15
16
- Added a Red-Blue-Green bit layout mode for the RGB matrix object
16
17
Original file line number Diff line number Diff line change 17
17
// along with Shift Register LED Matrix Project. If not, see <http://www.gnu.org/licenses/>.
18
18
19
19
#include " BaseLEDMatrix.h"
20
+ #include " SRLEDMatrixUtils.h"
21
+
20
22
#ifndef ICACHE_RAM_ATTR
21
23
#define ICACHE_RAM_ATTR
22
24
#endif
Original file line number Diff line number Diff line change @@ -30,5 +30,98 @@ namespace SRLEDMatrixUtils {
30
30
float fmod (float value, float modulo);
31
31
32
32
}
33
+
34
+ //
35
+ // Platform specific defines and functions
36
+ //
37
+
38
+ #if defined(__AVR_ATmega8535__) || defined(__AVR_ATmega16__) || defined(__AVR_ATmega32__)
39
+ // Register names
40
+ #define OCR0A OCR0
41
+ #define EIMSK GICR
42
+ #define EIFR GIFR
43
+ #define TIMSK0 TIMSK
44
+ #define TIMSK1 TIMSK
45
+ #define TIMSK2 TIMSK
46
+ #define TIFR0 TIFR
47
+ #define TIFR1 TIFR
48
+ #define TIFR2 TIFR
49
+ #define SPMCSR SPMCR
50
+ #define SMCR MCUCR
51
+ #define EICRA MCUCR
52
+ #define MCUSR MCUCSR
53
+ #define TCCR0A TCCR0
54
+ #define ADCSRB SFIOR
55
+ #define TCCR2A TCCR2
56
+ #define TCCR2B TCCR2
57
+ #define OCR2A OCR2
58
+ #define WDTCSR WDTCR
59
+ #define UBRR0H UBRRH
60
+ #define UCSR0C UCSRC
61
+ #define UDR0 UDR
62
+ #define UCSR0A UCSRA
63
+ #define UCSR0B UCSRB
64
+ #define UBRR0L UBRRL
65
+
66
+ // Bit names
67
+ #define OCIE2A OCIE2
68
+ #define ICIE1 TICIE1
69
+ #define OCIE0A OCIE0
70
+ #define OCF2A OCF2
71
+ #define OCF0A OCF0
72
+ #define ISC20 ISC2
73
+ #define FOC0A FOC0
74
+ #define COM0A1 COM01
75
+ #define COM0A0 COM00
76
+ #define PSRASY PSR2
77
+ #define PSRSYNC PSR10
78
+ #define FOC2A FOC2
79
+ #define COM2A1 COM21
80
+ #define COM2A0 COM20
81
+ #define OCR2AUB OCR2UB
82
+ #define TCR2AUB TCR2UB
83
+ #define UMSEL00 UMSEL
84
+ #define UPM10 UPM1
85
+ #define UPM00 UPM0
86
+ #define USBS0 USBS
87
+ #define UCSZ00 UCSZ1
88
+ #define UCSZ10 UCSZ2
89
+ #define UCPOL0 UCPOL
90
+ #define RXC0 RXC
91
+ #define TXC0 TXC
92
+ #define UDRE0 UDRE
93
+ #define FE0 FE
94
+ #define DOR0 DOR
95
+ #define UPE0 PE
96
+ #define U2X0 U2X
97
+ #define MPCM0 MPCM
98
+ #define RXCIE0 RXCIE
99
+ #define TXCIE0 TXCIE
100
+ #define UDRIE0 UDRIE
101
+ #define RXEN0 RXEN
102
+ #define TXEN0 TXEN
103
+ #define UCSZ02 UCSZ2
104
+ #define RXB80 RXB8
105
+ #define TXB80 TXB8
106
+
107
+ #ifndef WGM22
108
+ #define WGM22 3
109
+ #endif
110
+
111
+ // Interrupt vectors
112
+ #define TIMER2_COMPA_vect TIMER2_COMP_vect
113
+ #define TIMER2_COMPA_vect_num TIMER2_COMP_vect_num
114
+ #define TIMER0_COMPA_vect TIMER0_COMP_vect
115
+ #define TIMER0_COMPA_vect_num TIMER0_COMP_vect_num
116
+ #define USART0_RX_vect USART_RXC_vect
117
+ #define USART0_RX_vect_num USART_RXC_vect_num
118
+ #define USART0_UDRE_vect USART_UDRE_vect
119
+ #define USART0_UDRE_vect_num USART_UDRE_vect_num
120
+ #define USART0_TX_vect USART_TXC_vect
121
+ #define USART0_TX_vect_num USART_TXC_vect_num
122
+ #define ANALOG_COMP_vect ANA_COMP_vect
123
+ #define ANALOG_COMP_vect_num ANA_COMP_vect_num
124
+ #endif // defined(__AVR_ATmega8535__) || defined(__AVR_ATmega16__) || defined(__AVR_ATmega32__)
125
+
33
126
#endif // __RGBLEDMATRIXUTILS_H__
34
127
You can’t perform that action at this time.
0 commit comments