RTEMS CPU Kit with SuperCore
4.11.3
Main Page
Related Pages
Modules
+
Data Structures
Data Structures
+
Data Fields
+
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Files
File List
+
Globals
+
All
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
+
Functions
_
a
b
c
d
e
f
g
i
j
l
m
n
o
p
q
r
s
t
u
v
w
+
Variables
_
b
c
d
i
r
+
Typedefs
a
b
c
d
f
h
i
m
o
p
q
r
s
t
u
w
x
+
Enumerations
b
c
d
e
h
i
m
o
p
r
s
t
w
+
Enumerator
c
i
m
p
r
s
t
w
+
Macros
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
w
mnt
data0
chrisj
rtems
releases
rtems-release.git
4.11.3
ws-rtems
rtems-4.11.3
cpukit
score
cpu
avr
avr
iom16a.h
Go to the documentation of this file.
1
/* Copyright (c) 2009 Atmel Corporation
2
All rights reserved.
3
4
Redistribution and use in source and binary forms, with or without
5
modification, are permitted provided that the following conditions are met:
6
7
* Redistributions of source code must retain the above copyright
8
notice, this list of conditions and the following disclaimer.
9
10
* Redistributions in binary form must reproduce the above copyright
11
notice, this list of conditions and the following disclaimer in
12
the documentation and/or other materials provided with the
13
distribution.
14
15
* Neither the name of the copyright holders nor the names of
16
contributors may be used to endorse or promote products derived
17
from this software without specific prior written permission.
18
19
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
POSSIBILITY OF SUCH DAMAGE. */
30
31
32
/* avr/iom16a.h - definitions for ATmega16A */
33
34
/* This file should only be included from <avr/io.h>, never directly. */
35
36
#ifndef _AVR_IO_H_
37
# error "Include <avr/io.h> instead of this file."
38
#endif
39
40
#ifndef _AVR_IOXXX_H_
41
# define _AVR_IOXXX_H_ "iom16a.h"
42
#else
43
# error "Attempt to include more than one <avr/ioXXX.h> file."
44
#endif
45
46
47
#ifndef _AVR_ATmega16A_H_
48
#define _AVR_ATmega16A_H_ 1
49
55
#define TWBR _SFR_IO8(0x00)
56
#define TWBR0 0
57
#define TWBR1 1
58
#define TWBR2 2
59
#define TWBR3 3
60
#define TWBR4 4
61
#define TWBR5 5
62
#define TWBR6 6
63
#define TWBR7 7
64
65
#define TWSR _SFR_IO8(0x01)
66
#define TWPS0 0
67
#define TWPS1 1
68
#define TWS3 3
69
#define TWS4 4
70
#define TWS5 5
71
#define TWS6 6
72
#define TWS7 7
73
74
#define TWAR _SFR_IO8(0x02)
75
#define TWGCE 0
76
#define TWA0 1
77
#define TWA1 2
78
#define TWA2 3
79
#define TWA3 4
80
#define TWA4 5
81
#define TWA5 6
82
#define TWA6 7
83
84
#define TWDR _SFR_IO8(0x03)
85
#define TWD0 0
86
#define TWD1 1
87
#define TWD2 2
88
#define TWD3 3
89
#define TWD4 4
90
#define TWD5 5
91
#define TWD6 6
92
#define TWD7 7
93
94
#ifndef __ASSEMBLER__
95
#define ADC _SFR_IO16(0x04)
96
#endif
97
#define ADCW _SFR_IO16(0x04)
98
99
#define ADCL _SFR_IO8(0x04)
100
#define ADCL0 0
101
#define ADCL1 1
102
#define ADCL2 2
103
#define ADCL3 3
104
#define ADCL4 4
105
#define ADCL5 5
106
#define ADCL6 6
107
#define ADCL7 7
108
109
#define ADCH _SFR_IO8(0x05)
110
#define ADCH0 0
111
#define ADCH1 1
112
#define ADCH2 2
113
#define ADCH3 3
114
#define ADCH4 4
115
#define ADCH5 5
116
#define ADCH6 6
117
#define ADCH7 7
118
119
#define ADCSRA _SFR_IO8(0x06)
120
#define ADPS0 0
121
#define ADPS1 1
122
#define ADPS2 2
123
#define ADIE 3
124
#define ADIF 4
125
#define ADATE 5
126
#define ADSC 6
127
#define ADEN 7
128
129
#define ADMUX _SFR_IO8(0x07)
130
#define MUX0 0
131
#define MUX1 1
132
#define MUX2 2
133
#define MUX3 3
134
#define MUX4 4
135
#define ADLAR 5
136
#define REFS0 6
137
#define REFS1 7
138
139
#define ACSR _SFR_IO8(0x08)
140
#define ACIS0 0
141
#define ACIS1 1
142
#define ACIC 2
143
#define ACIE 3
144
#define ACI 4
145
#define ACO 5
146
#define ACBG 6
147
#define ACD 7
148
149
#define UBRRL _SFR_IO8(0x09)
150
#define UBRR0 0
151
#define UBRR1 1
152
#define UBRR2 2
153
#define UBRR3 3
154
#define UBRR4 4
155
#define UBRR5 5
156
#define UBRR6 6
157
#define UBRR7 7
158
159
#define UCSRB _SFR_IO8(0x0A)
160
#define TXB8 0
161
#define RXB8 1
162
#define UCSZ2 2
163
#define TXEN 3
164
#define RXEN 4
165
#define UDRIE 5
166
#define TXCIE 6
167
#define RXCIE 7
168
169
#define UCSRA _SFR_IO8(0x0B)
170
#define MPCM 0
171
#define U2X 1
172
#define UPE 2
173
#define DOR 3
174
#define FE 4
175
#define UDRE 5
176
#define TXC 6
177
#define RXC 7
178
179
#define UDR _SFR_IO8(0x0C)
180
#define UDR0 0
181
#define UDR1 1
182
#define UDR2 2
183
#define UDR3 3
184
#define UDR4 4
185
#define UDR5 5
186
#define UDR6 6
187
#define UDR7 7
188
189
#define SPCR _SFR_IO8(0x0D)
190
#define SPR0 0
191
#define SPR1 1
192
#define CPHA 2
193
#define CPOL 3
194
#define MSTR 4
195
#define DORD 5
196
#define SPE 6
197
#define SPIE 7
198
199
#define SPSR _SFR_IO8(0x0E)
200
#define SPI2X 0
201
#define WCOL 6
202
#define SPIF 7
203
204
#define SPDR _SFR_IO8(0x0F)
205
#define SPDR0 0
206
#define SPDR1 1
207
#define SPDR2 2
208
#define SPDR3 3
209
#define SPDR4 4
210
#define SPDR5 5
211
#define SPDR6 6
212
#define SPDR7 7
213
214
#define PIND _SFR_IO8(0x10)
215
#define PIND0 0
216
#define PIND1 1
217
#define PIND2 2
218
#define PIND3 3
219
#define PIND4 4
220
#define PIND5 5
221
#define PIND6 6
222
#define PIND7 7
223
224
#define DDRD _SFR_IO8(0x11)
225
#define DDD0 0
226
#define DDD1 1
227
#define DDD2 2
228
#define DDD3 3
229
#define DDD4 4
230
#define DDD5 5
231
#define DDD6 6
232
#define DDD7 7
233
234
#define PORTD _SFR_IO8(0x12)
235
#define PORTD0 0
236
#define PORTD1 1
237
#define PORTD2 2
238
#define PORTD3 3
239
#define PORTD4 4
240
#define PORTD5 5
241
#define PORTD6 6
242
#define PORTD7 7
243
244
#define PINC _SFR_IO8(0x13)
245
#define PINC0 0
246
#define PINC1 1
247
#define PINC2 2
248
#define PINC3 3
249
#define PINC4 4
250
#define PINC5 5
251
#define PINC6 6
252
#define PINC7 7
253
254
#define DDRC _SFR_IO8(0x14)
255
#define DDC0 0
256
#define DDC1 1
257
#define DDC2 2
258
#define DDC3 3
259
#define DDC4 4
260
#define DDC5 5
261
#define DDC6 6
262
#define DDC7 7
263
264
#define PORTC _SFR_IO8(0x15)
265
#define PORTC0 0
266
#define PORTC1 1
267
#define PORTC2 2
268
#define PORTC3 3
269
#define PORTC4 4
270
#define PORTC5 5
271
#define PORTC6 6
272
#define PORTC7 7
273
274
#define PINB _SFR_IO8(0x16)
275
#define PINB0 0
276
#define PINB1 1
277
#define PINB2 2
278
#define PINB3 3
279
#define PINB4 4
280
#define PINB5 5
281
#define PINB6 6
282
#define PINB7 7
283
284
#define DDRB _SFR_IO8(0x17)
285
#define DDB0 0
286
#define DDB1 1
287
#define DDB2 2
288
#define DDB3 3
289
#define DDB4 4
290
#define DDB5 5
291
#define DDB6 6
292
#define DDB7 7
293
294
#define PORTB _SFR_IO8(0x18)
295
#define PORTB0 0
296
#define PORTB1 1
297
#define PORTB2 2
298
#define PORTB3 3
299
#define PORTB4 4
300
#define PORTB5 5
301
#define PORTB6 6
302
#define PORTB7 7
303
304
#define PINA _SFR_IO8(0x19)
305
#define PINA0 0
306
#define PINA1 1
307
#define PINA2 2
308
#define PINA3 3
309
#define PINA4 4
310
#define PINA5 5
311
#define PINA6 6
312
#define PINA7 7
313
314
#define DDRA _SFR_IO8(0x1A)
315
#define DDA0 0
316
#define DDA1 1
317
#define DDA2 2
318
#define DDA3 3
319
#define DDA4 4
320
#define DDA5 5
321
#define DDA6 6
322
#define DDA7 7
323
324
#define PORTA _SFR_IO8(0x1B)
325
#define PORTA0 0
326
#define PORTA1 1
327
#define PORTA2 2
328
#define PORTA3 3
329
#define PORTA4 4
330
#define PORTA5 5
331
#define PORTA6 6
332
#define PORTA7 7
333
334
#define EECR _SFR_IO8(0x1C)
335
#define EERE 0
336
#define EEWE 1
337
#define EEMWE 2
338
#define EERIE 3
339
340
#define EEDR _SFR_IO8(0x1D)
341
#define EEDR0 0
342
#define EEDR1 1
343
#define EEDR2 2
344
#define EEDR3 3
345
#define EEDR4 4
346
#define EEDR5 5
347
#define EEDR6 6
348
#define EEDR7 7
349
350
#define EEAR _SFR_IO16(0x1E)
351
352
#define EEARL _SFR_IO8(0x1E)
353
#define EEAR0 0
354
#define EEAR1 1
355
#define EEAR2 2
356
#define EEAR3 3
357
#define EEAR4 4
358
#define EEAR5 5
359
#define EEAR6 6
360
#define EEAR7 7
361
362
#define EEARH _SFR_IO8(0x1F)
363
#define EEAR8 0
364
365
#define UBRRH _SFR_IO8(0x20)
366
#define UBRR8 0
367
#define UBRR9 1
368
#define UBRR10 2
369
#define UBRR11 3
370
371
#define UCSRC _SFR_IO8(0x20)
372
#define UCPOL 0
373
#define UCSZ0 1
374
#define UCSZ1 2
375
#define USBS 3
376
#define UPM0 4
377
#define UPM1 5
378
#define UMSEL 6
379
#define URSEL 7
380
381
#define WDTCR _SFR_IO8(0x21)
382
#define WDP0 0
383
#define WDP1 1
384
#define WDP2 2
385
#define WDE 3
386
#define WDTOE 4
387
388
#define ASSR _SFR_IO8(0x22)
389
#define TCR2UB 0
390
#define OCR2UB 1
391
#define TCN2UB 2
392
#define AS2 3
393
394
#define OCR2 _SFR_IO8(0x23)
395
#define OCR2_0 0
396
#define OCR2_1 1
397
#define OCR2_2 2
398
#define OCR2_3 3
399
#define OCR2_4 4
400
#define OCR2_5 5
401
#define OCR2_6 6
402
#define OCR2_7 7
403
404
#define TCNT2 _SFR_IO8(0x24)
405
#define TCNT2_0 0
406
#define TCNT2_1 1
407
#define TCNT2_2 2
408
#define TCNT2_3 3
409
#define TCNT2_4 4
410
#define TCNT2_5 5
411
#define TCNT2_6 6
412
#define TCNT2_7 7
413
414
#define TCCR2 _SFR_IO8(0x25)
415
#define CS20 0
416
#define CS21 1
417
#define CS22 2
418
#define WGM21 3
419
#define COM20 4
420
#define COM21 5
421
#define WGM20 6
422
#define FOC2 7
423
424
#define ICR1 _SFR_IO16(0x26)
425
426
#define ICR1L _SFR_IO8(0x26)
427
#define ICR1L0 0
428
#define ICR1L1 1
429
#define ICR1L2 2
430
#define ICR1L3 3
431
#define ICR1L4 4
432
#define ICR1L5 5
433
#define ICR1L6 6
434
#define ICR1L7 7
435
436
#define ICR1H _SFR_IO8(0x27)
437
#define ICR1H0 0
438
#define ICR1H1 1
439
#define ICR1H2 2
440
#define ICR1H3 3
441
#define ICR1H4 4
442
#define ICR1H5 5
443
#define ICR1H6 6
444
#define ICR1H7 7
445
446
#define OCR1B _SFR_IO16(0x28)
447
448
#define OCR1BL _SFR_IO8(0x28)
449
#define OCR1BL0 0
450
#define OCR1BL1 1
451
#define OCR1BL2 2
452
#define OCR1BL3 3
453
#define OCR1BL4 4
454
#define OCR1BL5 5
455
#define OCR1BL6 6
456
#define OCR1BL7 7
457
458
#define OCR1BH _SFR_IO8(0x29)
459
#define OCR1BH0 0
460
#define OCR1BH1 1
461
#define OCR1BH2 2
462
#define OCR1BH3 3
463
#define OCR1BH4 4
464
#define OCR1BH5 5
465
#define OCR1BH6 6
466
#define OCR1BH7 7
467
468
#define OCR1A _SFR_IO16(0x2A)
469
470
#define OCR1AL _SFR_IO8(0x2A)
471
#define OCR1AL0 0
472
#define OCR1AL1 1
473
#define OCR1AL2 2
474
#define OCR1AL3 3
475
#define OCR1AL4 4
476
#define OCR1AL5 5
477
#define OCR1AL6 6
478
#define OCR1AL7 7
479
480
#define OCR1AH _SFR_IO8(0x2B)
481
#define OCR1AH0 0
482
#define OCR1AH1 1
483
#define OCR1AH2 2
484
#define OCR1AH3 3
485
#define OCR1AH4 4
486
#define OCR1AH5 5
487
#define OCR1AH6 6
488
#define OCR1AH7 7
489
490
#define TCNT1 _SFR_IO16(0x2C)
491
492
#define TCNT1L _SFR_IO8(0x2C)
493
#define TCNT1L0 0
494
#define TCNT1L1 1
495
#define TCNT1L2 2
496
#define TCNT1L3 3
497
#define TCNT1L4 4
498
#define TCNT1L5 5
499
#define TCNT1L6 6
500
#define TCNT1L7 7
501
502
#define TCNT1H _SFR_IO8(0x2D)
503
#define TCNT1H0 0
504
#define TCNT1H1 1
505
#define TCNT1H2 2
506
#define TCNT1H3 3
507
#define TCNT1H4 4
508
#define TCNT1H5 5
509
#define TCNT1H6 6
510
#define TCNT1H7 7
511
512
#define TCCR1B _SFR_IO8(0x2E)
513
#define CS10 0
514
#define CS11 1
515
#define CS12 2
516
#define WGM12 3
517
#define WGM13 4
518
#define ICES1 6
519
#define ICNC1 7
520
521
#define TCCR1A _SFR_IO8(0x2F)
522
#define WGM10 0
523
#define WGM11 1
524
#define FOC1B 2
525
#define FOC1A 3
526
#define COM1B0 4
527
#define COM1B1 5
528
#define COM1A0 6
529
#define COM1A1 7
530
531
#define SFIOR _SFR_IO8(0x30)
532
#define PSR10 0
533
#define PSR2 1
534
#define PUD 2
535
#define ACME 3
536
#define ADTS0 5
537
#define ADTS1 6
538
#define ADTS2 7
539
540
#define OSCCAL _SFR_IO8(0x31)
541
#define CAL0 0
542
#define CAL1 1
543
#define CAL2 2
544
#define CAL3 3
545
#define CAL4 4
546
#define CAL5 5
547
#define CAL6 6
548
#define CAL7 7
549
550
#define OCDR _SFR_IO8(0x31)
551
#define OCDR0 0
552
#define OCDR1 1
553
#define OCDR2 2
554
#define OCDR3 3
555
#define OCDR4 4
556
#define OCDR5 5
557
#define OCDR6 6
558
#define OCDR7 7
559
560
#define TCNT0 _SFR_IO8(0x32)
561
#define TCNT0_0 0
562
#define TCNT0_1 1
563
#define TCNT0_2 2
564
#define TCNT0_3 3
565
#define TCNT0_4 4
566
#define TCNT0_5 5
567
#define TCNT0_6 6
568
#define TCNT0_7 7
569
570
#define TCCR0 _SFR_IO8(0x33)
571
#define CS00 0
572
#define CS01 1
573
#define CS02 2
574
#define WGM01 3
575
#define COM00 4
576
#define COM01 5
577
#define WGM00 6
578
#define FOC0 7
579
580
#define MCUCSR _SFR_IO8(0x34)
581
#define PORF 0
582
#define EXTRF 1
583
#define BORF 2
584
#define WDRF 3
585
#define JTRF 4
586
#define ISC2 6
587
#define JTD 7
588
589
#define MCUCR _SFR_IO8(0x35)
590
#define ISC00 0
591
#define ISC01 1
592
#define ISC10 2
593
#define ISC11 3
594
#define SM0 4
595
#define SM1 5
596
#define SE 6
597
#define SM2 7
598
599
#define TWCR _SFR_IO8(0x36)
600
#define TWIE 0
601
#define TWEN 2
602
#define TWWC 3
603
#define TWSTO 4
604
#define TWSTA 5
605
#define TWEA 6
606
#define TWINT 7
607
608
#define SPMCSR _SFR_IO8(0x37)
609
#define SPMEN 0
610
#define PGERS 1
611
#define PGWRT 2
612
#define BLBSET 3
613
#define RWWSRE 4
614
#define RWWSB 6
615
#define SPMIE 7
616
617
#define TIFR _SFR_IO8(0x38)
618
#define TOV0 0
619
#define OCF0 1
620
#define TOV1 2
621
#define OCF1B 3
622
#define OCF1A 4
623
#define ICF1 5
624
#define TOV2 6
625
#define OCF2 7
626
627
#define TIMSK _SFR_IO8(0x39)
628
#define TOIE0 0
629
#define OCIE0 1
630
#define TOIE1 2
631
#define OCIE1B 3
632
#define OCIE1A 4
633
#define TICIE1 5
634
#define TOIE2 6
635
#define OCIE2 7
636
637
#define GIFR _SFR_IO8(0x3A)
638
#define INTF2 5
639
#define INTF0 6
640
#define INTF1 7
641
642
#define GICR _SFR_IO8(0x3B)
643
#define IVCE 0
644
#define IVSEL 1
645
#define INT2 5
646
#define INT0 6
647
#define INT1 7
648
649
#define OCR0 _SFR_IO8(0x3C)
650
#define OCR0_0 0
651
#define OCR0_1 1
652
#define OCR0_2 2
653
#define OCR0_3 3
654
#define OCR0_4 4
655
#define OCR0_5 5
656
#define OCR0_6 6
657
#define OCR0_7 7
658
666
/* Vector 0 is the reset vector */
667
#define INT0_vect_num 1
668
#define INT0_vect _VECTOR(1)
/* External Interrupt Request 0 */
669
#define INT1_vect_num 2
670
#define INT1_vect _VECTOR(2)
/* External Interrupt Request 1 */
671
#define TIMER2_COMP_vect_num 3
672
#define TIMER2_COMP_vect _VECTOR(3)
/* Timer/Counter2 Compare Match */
673
#define TIMER2_OVF_vect_num 4
674
#define TIMER2_OVF_vect _VECTOR(4)
/* Timer/Counter2 Overflow */
675
#define TIMER1_CAPT_vect_num 5
676
#define TIMER1_CAPT_vect _VECTOR(5)
/* Timer/Counter1 Capture Event */
677
#define TIMER1_COMPA_vect_num 6
678
/* Timer/Counter1 Compare Match A */
679
#define TIMER1_COMPA_vect _VECTOR(6)
680
#define TIMER1_COMPB_vect_num 7
681
/* Timer/Counter1 Compare Match B */
682
#define TIMER1_COMPB_vect _VECTOR(7)
683
#define TIMER1_OVF_vect_num 8
684
#define TIMER1_OVF_vect _VECTOR(8)
/* Timer/Counter1 Overflow */
685
#define TIMER0_OVF_vect_num 9
686
#define TIMER0_OVF_vect _VECTOR(9)
/* Timer/Counter0 Overflow */
687
#define SPISTC_vect_num 10
688
#define SPISTC_vect _VECTOR(10)
/* Serial Transfer Complete */
689
#define USARTRXC_vect_num 11
690
#define USARTRXC_vect _VECTOR(11)
/* USART, Rx Complete */
691
#define USARTUDRE_vect_num 12
692
#define USARTUDRE_vect _VECTOR(12)
/* USART Data Register Empty */
693
#define USARTTXC_vect_num 13
694
#define USARTTXC_vect _VECTOR(13)
/* USART, Tx Complete */
695
#define ADC_vect_num 14
696
#define ADC_vect _VECTOR(14)
/* ADC Conversion Complete */
697
#define EE_RDY_vect_num 15
698
#define EE_RDY_vect _VECTOR(15)
/* EEPROM Ready */
699
#define ANA_COMP_vect_num 16
700
#define ANA_COMP_vect _VECTOR(16)
/* Analog Comparator */
701
#define TWI_vect_num 17
702
#define TWI_vect _VECTOR(17)
/* 2-wire Serial Interface */
703
#define INT2_vect_num 18
704
#define INT2_vect _VECTOR(18)
/* External Interrupt Request 2 */
705
#define TIMER0_COMP_vect_num 19
706
#define TIMER0_COMP_vect _VECTOR(19)
/* Timer/Counter0 Compare Match */
707
#define SPM_RDY_vect_num 20
708
#define SPM_RDY_vect _VECTOR(20)
/* Store Program Memory Ready */
709
710
#define _VECTOR_SIZE 4
/* Size of individual vector. */
711
#define _VECTORS_SIZE (21 * _VECTOR_SIZE)
712
719
#define SPM_PAGESIZE (128)
720
#define RAMSTART (0x60)
721
#define RAMSIZE (1024)
722
#define RAMEND (RAMSTART + RAMSIZE - 1)
723
#define XRAMSTART (NA)
724
#define XRAMSIZE (0)
725
#define XRAMEND (RAMEND)
726
#define E2END (0x1FF)
727
#define E2PAGESIZE (4)
728
#define FLASHEND (0x3FFF)
729
736
#define FUSE_MEMORY_SIZE 2
737
738
/* Low Fuse Byte */
739
#define FUSE_CKSEL0 (unsigned char)~_BV(0)
/* Select Clock Source */
740
#define FUSE_CKSEL1 (unsigned char)~_BV(1)
/* Select Clock Source */
741
#define FUSE_CKSEL2 (unsigned char)~_BV(2)
/* Select Clock Source */
742
#define FUSE_CKSEL3 (unsigned char)~_BV(3)
/* Select Clock Source */
743
#define FUSE_SUT0 (unsigned char)~_BV(4)
/* Select start-up time */
744
#define FUSE_SUT1 (unsigned char)~_BV(5)
/* Select start-up time */
745
#define FUSE_BODEN (unsigned char)~_BV(6)
/* Brown out detector enable */
746
/* Brown out detector trigger level */
747
#define FUSE_BODLEVEL (unsigned char)~_BV(7)
748
#define LFUSE_DEFAULT (FUSE_SUT1 & FUSE_SUT0 & FUSE_CKSEL3 & \
749
FUSE_CKSEL2 & FUSE_CKSEL1)
750
751
/* High Fuse Byte */
752
#define FUSE_BOOTRST (unsigned char)~_BV(0)
/* Select Reset Vector */
753
#define FUSE_BOOTSZ0 (unsigned char)~_BV(1)
/* Select Boot Size */
754
#define FUSE_BOOTSZ1 (unsigned char)~_BV(2)
/* Select Boot Size */
755
/* EEPROM memory is preserved through chip erase */
756
#define FUSE_EESAVE (unsigned char)~_BV(3)
757
#define FUSE_CKOPT (unsigned char)~_BV(4)
/* Oscillator Options */
758
/* Enable Serial programming and Data Downloading */
759
#define FUSE_SPIEN (unsigned char)~_BV(5)
760
#define FUSE_JTAGEN (unsigned char)~_BV(6)
/* Enable JTAG */
761
#define FUSE_OCDEN (unsigned char)~_BV(7)
/* Enable OCD */
762
#define HFUSE_DEFAULT (FUSE_JTAGEN & FUSE_SPIEN & FUSE_BOOTSZ1 & FUSE_BOOTSZ0)
763
770
#define __LOCK_BITS_EXIST
771
#define __BOOT_LOCK_BITS_0_EXIST
772
#define __BOOT_LOCK_BITS_1_EXIST
773
780
#define SIGNATURE_0 0x1E
781
#define SIGNATURE_1 0x94
782
#define SIGNATURE_2 0x03
783
790
#define MOSI_DDR DDRB
791
#define MOSI_PORT PORTB
792
#define MOSI_PIN PINB
793
#define MOSI_BIT 5
794
795
#define MISO_DDR DDRB
796
#define MISO_PORT PORTB
797
#define MISO_PIN PINB
798
#define MISO_BIT 6
799
800
#define PB7_SCK_DDR DDRB7_SCK
801
#define PB7_SCK_PORT PORTB7_SCK
802
#define PB7_SCK_PIN PINB7_SCK
803
#define PB7_SCK_BIT 7_SCK
804
805
#define RXD_DDR DDRD
806
#define RXD_PORT PORTD
807
#define RXD_PIN PIND
808
#define RXD_BIT 0
809
810
#define TXD_DDR DDRD
811
#define TXD_PORT PORTD
812
#define TXD_PIN PIND
813
#define TXD_BIT 1
814
815
#define INT0_DDR DDRD
816
#define INT0_PORT PORTD
817
#define INT0_PIN PIND
818
#define INT0_BIT 2
819
820
#define INT1_DDR DDRD
821
#define INT1_PORT PORTD
822
#define INT1_PIN PIND
823
#define INT1_BIT 3
824
825
#define OC1B_DDR DDRD
826
#define OC1B_PORT PORTD
827
#define OC1B_PIN PIND
828
#define OC1B_BIT 4
829
830
#define OC1A_DDR DDRD
831
#define OC1A_PORT PORTD
832
#define OC1A_PIN PIND
833
#define OC1A_BIT 5
834
835
#define ICP_DDR DDRD
836
#define ICP_PORT PORTD
837
#define ICP_PIN PIND
838
#define ICP_BIT 6
839
840
#define OC2_DDR DDRD
841
#define OC2_PORT PORTD
842
#define OC2_PIN PIND
843
#define OC2_BIT 7
844
845
#define SCL_DDR DDRC
846
#define SCL_PORT PORTC
847
#define SCL_PIN PINC
848
#define SCL_BIT 0
849
850
#define SDA_DDR DDRC
851
#define SDA_PORT PORTC
852
#define SDA_PIN PINC
853
#define SDA_BIT 1
854
855
#define PC3_DDR DDRC
856
#define PC3_PORT PORTC
857
#define PC3_PIN PINC
858
#define PC3_BIT 3
859
860
#define PC4_DDR DDRC
861
#define PC4_PORT PORTC
862
#define PC4_PIN PINC
863
#define PC4_BIT 4
864
865
#define PC5_DDR DDRC
866
#define PC5_PORT PORTC
867
#define PC5_PIN PINC
868
#define PC5_BIT 5
869
870
#define ADC7_DDR DDRA
871
#define ADC7_PORT PORTA
872
#define ADC7_PIN PINA
873
#define ADC7_BIT 7
874
875
#define ADC6_DDR DDRA
876
#define ADC6_PORT PORTA
877
#define ADC6_PIN PINA
878
#define ADC6_BIT 6
879
880
#define ADc5_DDR DDRA
881
#define ADc5_PORT PORTA
882
#define ADc5_PIN PINA
883
#define ADc5_BIT 5
884
885
#define ADC4_DDR DDRA
886
#define ADC4_PORT PORTA
887
#define ADC4_PIN PINA
888
#define ADC4_BIT 4
889
890
#define ADC3_DDR DDRA
891
#define ADC3_PORT PORTA
892
#define ADC3_PIN PINA
893
#define ADC3_BIT 3
894
895
#define ADC2_DDR DDRA
896
#define ADC2_PORT PORTA
897
#define ADC2_PIN PINA
898
#define ADC2_BIT 2
899
900
#define ADC1_DDR DDRA
901
#define ADC1_PORT PORTA
902
#define ADC1_PIN PINA
903
#define ADC1_BIT 1
904
905
#define ADC0_DDR DDRA
906
#define ADC0_PORT PORTA
907
#define ADC0_PIN PINA
908
#define ADC0_BIT 0
909
910
#define T0_DDR DDRB
911
#define T0_PORT PORTB
912
#define T0_PIN PINB
913
#define T0_BIT 0
914
915
#define T1_DDR DDRB
916
#define T1_PORT PORTB
917
#define T1_PIN PINB
918
#define T1_BIT 1
919
920
#define AIN0_DDR DDRB
921
#define AIN0_PORT PORTB
922
#define AIN0_PIN PINB
923
#define AIN0_BIT 2
924
925
#define AIN1_DDR DDRB
926
#define AIN1_PORT PORTB
927
#define AIN1_PIN PINB
928
#define AIN1_BIT 3
929
930
#define SS_DDR DDRB
931
#define SS_PORT PORTB
932
#define SS_PIN PINB
933
#define SS_BIT 4
934
936
#endif
/* _AVR_ATmega16A_H_ */
937
Generated by
1.8.13