~ubuntu-branches/ubuntu/trusty/avr-libc/trusty-proposed

« back to all changes in this revision

Viewing changes to include/avr/iox64a1.h

  • Committer: Bazaar Package Importer
  • Author(s): Hakan Ardo
  • Date: 2011-07-10 16:46:05 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20110710164605-ep63eoyyxuspbxwt
Tags: 1:1.7.1-1
* New upstream release (closes: #626119)
* Now build-depends on doxygen-latex (closes: #616199)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2009 Atmel Corporation
 
1
/* Copyright (c) 2009-2010 Atmel Corporation
2
2
   All rights reserved.
3
3
 
4
4
   Redistribution and use in source and binary forms, with or without
28
28
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
29
  POSSIBILITY OF SUCH DAMAGE. */
30
30
 
31
 
/* $Id: iox64a1.h,v 1.1.2.17 2009/12/29 22:41:08 arcanum Exp $ */
 
31
/* $Id: iox64a1.h 2200 2010-12-14 04:24:24Z arcanum $ */
32
32
 
33
33
/* avr/iox64a1.h - definitions for ATxmega64A1 */
34
34
 
50
50
 
51
51
 
52
52
/* Ungrouped common registers */
 
53
#define GPIOR0  _SFR_MEM8(0x0000)  /* General Purpose IO Register 0 */
 
54
#define GPIOR1  _SFR_MEM8(0x0001)  /* General Purpose IO Register 1 */
 
55
#define GPIOR2  _SFR_MEM8(0x0002)  /* General Purpose IO Register 2 */
 
56
#define GPIOR3  _SFR_MEM8(0x0003)  /* General Purpose IO Register 3 */
 
57
#define GPIOR4  _SFR_MEM8(0x0004)  /* General Purpose IO Register 4 */
 
58
#define GPIOR5  _SFR_MEM8(0x0005)  /* General Purpose IO Register 5 */
 
59
#define GPIOR6  _SFR_MEM8(0x0006)  /* General Purpose IO Register 6 */
 
60
#define GPIOR7  _SFR_MEM8(0x0007)  /* General Purpose IO Register 7 */
 
61
#define GPIOR8  _SFR_MEM8(0x0008)  /* General Purpose IO Register 8 */
 
62
#define GPIOR9  _SFR_MEM8(0x0009)  /* General Purpose IO Register 9 */
 
63
#define GPIORA  _SFR_MEM8(0x000A)  /* General Purpose IO Register 10 */
 
64
#define GPIORB  _SFR_MEM8(0x000B)  /* General Purpose IO Register 11 */
 
65
#define GPIORC  _SFR_MEM8(0x000C)  /* General Purpose IO Register 12 */
 
66
#define GPIORD  _SFR_MEM8(0x000D)  /* General Purpose IO Register 13 */
 
67
#define GPIORE  _SFR_MEM8(0x000E)  /* General Purpose IO Register 14 */
 
68
#define GPIORF  _SFR_MEM8(0x000F)  /* General Purpose IO Register 15 */
 
69
 
 
70
/* Deprecated */
53
71
#define GPIO0  _SFR_MEM8(0x0000)  /* General Purpose IO Register 0 */
54
72
#define GPIO1  _SFR_MEM8(0x0001)  /* General Purpose IO Register 1 */
55
73
#define GPIO2  _SFR_MEM8(0x0002)  /* General Purpose IO Register 2 */
1207
1225
    register8_t REFCTRL;  /* Reference Control */
1208
1226
    register8_t EVCTRL;  /* Event Control */
1209
1227
    register8_t PRESCALER;  /* Clock Prescaler */
1210
 
    register8_t CALCTRL;  /* Calibration Control Register */
 
1228
    register8_t reserved_0x05;
1211
1229
    register8_t INTFLAGS;  /* Interrupt Flags */
1212
1230
    register8_t reserved_0x07;
1213
1231
    register8_t reserved_0x08;
1471
1489
    DAC_REFRESH_512CLK_gc = (0x05<<0),  /* 512 CLK */
1472
1490
    DAC_REFRESH_1024CLK_gc = (0x06<<0),  /* 1024 CLK */
1473
1491
    DAC_REFRESH_2048CLK_gc = (0x07<<0),  /* 2048 CLK */
1474
 
    DAC_REFRESH_4086CLK_gc = (0x08<<0),  /* 4096 CLK */
 
1492
    DAC_REFRESH_4096CLK_gc = (0x08<<0),  /* 4096 CLK */
1475
1493
    DAC_REFRESH_8192CLK_gc = (0x09<<0),  /* 8192 CLK */
1476
1494
    DAC_REFRESH_16384CLK_gc = (0x0A<<0),  /* 16384 CLK */
1477
1495
    DAC_REFRESH_32768CLK_gc = (0x0B<<0),  /* 32768 CLK */
1578
1596
} EBI_t;
1579
1597
 
1580
1598
/* Chip Select adress space */
1581
 
typedef enum EBI_CS_ASPACE_enum
 
1599
typedef enum EBI_CS_ASIZE_enum
1582
1600
{
1583
 
    EBI_CS_ASPACE_256B_gc = (0x00<<2),  /* 256 bytes */
1584
 
    EBI_CS_ASPACE_512B_gc = (0x01<<2),  /* 512 bytes */
1585
 
    EBI_CS_ASPACE_1KB_gc = (0x02<<2),  /* 1K bytes */
1586
 
    EBI_CS_ASPACE_2KB_gc = (0x03<<2),  /* 2K bytes */
1587
 
    EBI_CS_ASPACE_4KB_gc = (0x04<<2),  /* 4K bytes */
1588
 
    EBI_CS_ASPACE_8KB_gc = (0x05<<2),  /* 8K bytes */
1589
 
    EBI_CS_ASPACE_16KB_gc = (0x06<<2),  /* 16K bytes */
1590
 
    EBI_CS_ASPACE_32KB_gc = (0x07<<2),  /* 32K bytes */
1591
 
    EBI_CS_ASPACE_64KB_gc = (0x08<<2),  /* 64K bytes */
1592
 
    EBI_CS_ASPACE_128KB_gc = (0x09<<2),  /* 128K bytes */
1593
 
    EBI_CS_ASPACE_256KB_gc = (0x0A<<2),  /* 256K bytes */
1594
 
    EBI_CS_ASPACE_512KB_gc = (0x0B<<2),  /* 512K bytes */
1595
 
    EBI_CS_ASPACE_1MB_gc = (0x0C<<2),  /* 1M bytes */
1596
 
    EBI_CS_ASPACE_2MB_gc = (0x0D<<2),  /* 2M bytes */
1597
 
    EBI_CS_ASPACE_4MB_gc = (0x0E<<2),  /* 4M bytes */
1598
 
    EBI_CS_ASPACE_8MB_gc = (0x0F<<2),  /* 8M bytes */
1599
 
    EBI_CS_ASPACE_16M_gc = (0x10<<2),  /* 16M bytes */
1600
 
} EBI_CS_ASPACE_t;
 
1601
    EBI_CS_ASIZE_256B_gc = (0x00<<2),  /* 256 bytes */
 
1602
    EBI_CS_ASIZE_512B_gc = (0x01<<2),  /* 512 bytes */
 
1603
    EBI_CS_ASIZE_1KB_gc = (0x02<<2),  /* 1K bytes */
 
1604
    EBI_CS_ASIZE_2KB_gc = (0x03<<2),  /* 2K bytes */
 
1605
    EBI_CS_ASIZE_4KB_gc = (0x04<<2),  /* 4K bytes */
 
1606
    EBI_CS_ASIZE_8KB_gc = (0x05<<2),  /* 8K bytes */
 
1607
    EBI_CS_ASIZE_16KB_gc = (0x06<<2),  /* 16K bytes */
 
1608
    EBI_CS_ASIZE_32KB_gc = (0x07<<2),  /* 32K bytes */
 
1609
    EBI_CS_ASIZE_64KB_gc = (0x08<<2),  /* 64K bytes */
 
1610
    EBI_CS_ASIZE_128KB_gc = (0x09<<2),  /* 128K bytes */
 
1611
    EBI_CS_ASIZE_256KB_gc = (0x0A<<2),  /* 256K bytes */
 
1612
    EBI_CS_ASIZE_512KB_gc = (0x0B<<2),  /* 512K bytes */
 
1613
    EBI_CS_ASIZE_1MB_gc = (0x0C<<2),  /* 1M bytes */
 
1614
    EBI_CS_ASIZE_2MB_gc = (0x0D<<2),  /* 2M bytes */
 
1615
    EBI_CS_ASIZE_4MB_gc = (0x0E<<2),  /* 4M bytes */
 
1616
    EBI_CS_ASIZE_8MB_gc = (0x0F<<2),  /* 8M bytes */
 
1617
    EBI_CS_ASIZE_16M_gc = (0x10<<2),  /* 16M bytes */
 
1618
} EBI_CS_ASIZE_t;
1601
1619
 
1602
1620
/*  */
1603
1621
typedef enum EBI_CS_SRWS_enum
2192
2210
{
2193
2211
    register8_t CTRL;  /* Control Register */
2194
2212
    register8_t reserved_0x01;
2195
 
    register8_t FDEVMASK;  /* Fault Detection Event Mask */
 
2213
    register8_t FDEMASK;  /* Fault Detection Event Mask */
2196
2214
    register8_t FDCTRL;  /* Fault Detection Control Register */
2197
2215
    register8_t STATUS;  /* Status Register */
2198
2216
    register8_t reserved_0x05;
2214
2232
/* High-Resolution Extension */
2215
2233
typedef struct HIRES_struct
2216
2234
{
2217
 
    register8_t CTRL;  /* Control Register */
 
2235
    register8_t CTRLA;  /* Control Register */
2218
2236
} HIRES_t;
2219
2237
 
2220
2238
/* Clock Selection */
2535
2553
==========================================================================
2536
2554
*/
2537
2555
 
2538
 
#define GPIO    (*(GPIO_t *) 0x0000)  /* General Purpose IO Registers */
2539
2556
#define VPORT0    (*(VPORT_t *) 0x0010)  /* Virtual Port 0 */
2540
2557
#define VPORT1    (*(VPORT_t *) 0x0014)  /* Virtual Port 1 */
2541
2558
#define VPORT2    (*(VPORT_t *) 0x0018)  /* Virtual Port 2 */
2542
2559
#define VPORT3    (*(VPORT_t *) 0x001C)  /* Virtual Port 3 */
2543
2560
#define OCD    (*(OCD_t *) 0x002E)  /* On-Chip Debug System */
2544
 
#define CPU    (*(CPU_t *) 0x0030)  /* CPU Registers */
2545
2561
#define CLK    (*(CLK_t *) 0x0040)  /* Clock System */
2546
2562
#define SLEEP    (*(SLEEP_t *) 0x0048)  /* Sleep Controller */
2547
2563
#define OSC    (*(OSC_t *) 0x0050)  /* Oscillator Control */
2615
2631
/* ========== Flattened fully qualified IO register names ========== */
2616
2632
 
2617
2633
/* GPIO - General Purpose IO Registers */
 
2634
#define GPIO_GPIOR0  _SFR_MEM8(0x0000)
 
2635
#define GPIO_GPIOR1  _SFR_MEM8(0x0001)
 
2636
#define GPIO_GPIOR2  _SFR_MEM8(0x0002)
 
2637
#define GPIO_GPIOR3  _SFR_MEM8(0x0003)
 
2638
#define GPIO_GPIOR4  _SFR_MEM8(0x0004)
 
2639
#define GPIO_GPIOR5  _SFR_MEM8(0x0005)
 
2640
#define GPIO_GPIOR6  _SFR_MEM8(0x0006)
 
2641
#define GPIO_GPIOR7  _SFR_MEM8(0x0007)
 
2642
#define GPIO_GPIOR8  _SFR_MEM8(0x0008)
 
2643
#define GPIO_GPIOR9  _SFR_MEM8(0x0009)
 
2644
#define GPIO_GPIORA  _SFR_MEM8(0x000A)
 
2645
#define GPIO_GPIORB  _SFR_MEM8(0x000B)
 
2646
#define GPIO_GPIORC  _SFR_MEM8(0x000C)
 
2647
#define GPIO_GPIORD  _SFR_MEM8(0x000D)
 
2648
#define GPIO_GPIORE  _SFR_MEM8(0x000E)
 
2649
#define GPIO_GPIORF  _SFR_MEM8(0x000F)
 
2650
 
 
2651
/* Deprecated */
2618
2652
#define GPIO_GPIO0  _SFR_MEM8(0x0000)
2619
2653
#define GPIO_GPIO1  _SFR_MEM8(0x0001)
2620
2654
#define GPIO_GPIO2  _SFR_MEM8(0x0002)
2845
2879
#define ADCA_REFCTRL  _SFR_MEM8(0x0202)
2846
2880
#define ADCA_EVCTRL  _SFR_MEM8(0x0203)
2847
2881
#define ADCA_PRESCALER  _SFR_MEM8(0x0204)
2848
 
#define ADCA_CALCTRL  _SFR_MEM8(0x0205)
2849
2882
#define ADCA_INTFLAGS  _SFR_MEM8(0x0206)
2850
2883
#define ADCA_CAL  _SFR_MEM16(0x020C)
2851
2884
#define ADCA_CH0RES  _SFR_MEM16(0x0210)
2880
2913
#define ADCB_REFCTRL  _SFR_MEM8(0x0242)
2881
2914
#define ADCB_EVCTRL  _SFR_MEM8(0x0243)
2882
2915
#define ADCB_PRESCALER  _SFR_MEM8(0x0244)
2883
 
#define ADCB_CALCTRL  _SFR_MEM8(0x0245)
2884
2916
#define ADCB_INTFLAGS  _SFR_MEM8(0x0246)
2885
2917
#define ADCB_CAL  _SFR_MEM16(0x024C)
2886
2918
#define ADCB_CH0RES  _SFR_MEM16(0x0250)
3350
3382
 
3351
3383
/* AWEXC - Advanced Waveform Extension C */
3352
3384
#define AWEXC_CTRL  _SFR_MEM8(0x0880)
3353
 
#define AWEXC_FDEVMASK  _SFR_MEM8(0x0882)
 
3385
#define AWEXC_FDEMASK  _SFR_MEM8(0x0882)
3354
3386
#define AWEXC_FDCTRL  _SFR_MEM8(0x0883)
3355
3387
#define AWEXC_STATUS  _SFR_MEM8(0x0884)
3356
3388
#define AWEXC_DTBOTH  _SFR_MEM8(0x0886)
3362
3394
#define AWEXC_OUTOVEN  _SFR_MEM8(0x088C)
3363
3395
 
3364
3396
/* HIRESC - High-Resolution Extension C */
3365
 
#define HIRESC_CTRL  _SFR_MEM8(0x0890)
 
3397
#define HIRESC_CTRLA  _SFR_MEM8(0x0890)
3366
3398
 
3367
3399
/* USARTC0 - Universal Asynchronous Receiver-Transmitter C0 */
3368
3400
#define USARTC0_DATA  _SFR_MEM8(0x08A0)
3442
3474
#define TCD1_CCBBUF  _SFR_MEM16(0x097A)
3443
3475
 
3444
3476
/* HIRESD - High-Resolution Extension D */
3445
 
#define HIRESD_CTRL  _SFR_MEM8(0x0990)
 
3477
#define HIRESD_CTRLA  _SFR_MEM8(0x0990)
3446
3478
 
3447
3479
/* USARTD0 - Universal Asynchronous Receiver-Transmitter D0 */
3448
3480
#define USARTD0_DATA  _SFR_MEM8(0x09A0)
3518
3550
 
3519
3551
/* AWEXE - Advanced Waveform Extension E */
3520
3552
#define AWEXE_CTRL  _SFR_MEM8(0x0A80)
3521
 
#define AWEXE_FDEVMASK  _SFR_MEM8(0x0A82)
 
3553
#define AWEXE_FDEMASK  _SFR_MEM8(0x0A82)
3522
3554
#define AWEXE_FDCTRL  _SFR_MEM8(0x0A83)
3523
3555
#define AWEXE_STATUS  _SFR_MEM8(0x0A84)
3524
3556
#define AWEXE_DTBOTH  _SFR_MEM8(0x0A86)
3530
3562
#define AWEXE_OUTOVEN  _SFR_MEM8(0x0A8C)
3531
3563
 
3532
3564
/* HIRESE - High-Resolution Extension E */
3533
 
#define HIRESE_CTRL  _SFR_MEM8(0x0A90)
 
3565
#define HIRESE_CTRLA  _SFR_MEM8(0x0A90)
3534
3566
 
3535
3567
/* USARTE0 - Universal Asynchronous Receiver-Transmitter E0 */
3536
3568
#define USARTE0_DATA  _SFR_MEM8(0x0AA0)
3605
3637
#define TCF1_CCBBUF  _SFR_MEM16(0x0B7A)
3606
3638
 
3607
3639
/* HIRESF - High-Resolution Extension F */
3608
 
#define HIRESF_CTRL  _SFR_MEM8(0x0B90)
 
3640
#define HIRESF_CTRLA  _SFR_MEM8(0x0B90)
3609
3641
 
3610
3642
/* USARTF0 - Universal Asynchronous Receiver-Transmitter F0 */
3611
3643
#define USARTF0_DATA  _SFR_MEM8(0x0BA0)
5187
5219
#define ADC_PRESCALER2_bp  2  /* Clock Prescaler Selection bit 2 position. */
5188
5220
 
5189
5221
 
5190
 
/* ADC.CALCTRL  bit masks and bit positions */
5191
 
#define ADC_CAL_bm  0x01  /* ADC Calibration Start bit mask. */
5192
 
#define ADC_CAL_bp  0  /* ADC Calibration Start bit position. */
5193
 
 
5194
 
 
5195
5222
/* ADC.INTFLAGS  bit masks and bit positions */
5196
5223
#define ADC_CH3IF_bm  0x08  /* Channel 3 Interrupt Flag bit mask. */
5197
5224
#define ADC_CH3IF_bp  3  /* Channel 3 Interrupt Flag bit position. */
5335
5362
 
5336
5363
/* EBI - External Bus Interface */
5337
5364
/* EBI_CS.CTRLA  bit masks and bit positions */
5338
 
#define EBI_CS_ASPACE_gm  0x7C  /* Address Space group mask. */
5339
 
#define EBI_CS_ASPACE_gp  2  /* Address Space group position. */
5340
 
#define EBI_CS_ASPACE0_bm  (1<<2)  /* Address Space bit 0 mask. */
5341
 
#define EBI_CS_ASPACE0_bp  2  /* Address Space bit 0 position. */
5342
 
#define EBI_CS_ASPACE1_bm  (1<<3)  /* Address Space bit 1 mask. */
5343
 
#define EBI_CS_ASPACE1_bp  3  /* Address Space bit 1 position. */
5344
 
#define EBI_CS_ASPACE2_bm  (1<<4)  /* Address Space bit 2 mask. */
5345
 
#define EBI_CS_ASPACE2_bp  4  /* Address Space bit 2 position. */
5346
 
#define EBI_CS_ASPACE3_bm  (1<<5)  /* Address Space bit 3 mask. */
5347
 
#define EBI_CS_ASPACE3_bp  5  /* Address Space bit 3 position. */
5348
 
#define EBI_CS_ASPACE4_bm  (1<<6)  /* Address Space bit 4 mask. */
5349
 
#define EBI_CS_ASPACE4_bp  6  /* Address Space bit 4 position. */
 
5365
#define EBI_CS_ASIZE_gm  0x7C  /* Address Size group mask. */
 
5366
#define EBI_CS_ASIZE_gp  2  /* Address Size group position. */
 
5367
#define EBI_CS_ASIZE0_bm  (1<<2)  /* Address Size bit 0 mask. */
 
5368
#define EBI_CS_ASIZE0_bp  2  /* Address Size bit 0 position. */
 
5369
#define EBI_CS_ASIZE1_bm  (1<<3)  /* Address Size bit 1 mask. */
 
5370
#define EBI_CS_ASIZE1_bp  3  /* Address Size bit 1 position. */
 
5371
#define EBI_CS_ASIZE2_bm  (1<<4)  /* Address Size bit 2 mask. */
 
5372
#define EBI_CS_ASIZE2_bp  4  /* Address Size bit 2 position. */
 
5373
#define EBI_CS_ASIZE3_bm  (1<<5)  /* Address Size bit 3 mask. */
 
5374
#define EBI_CS_ASIZE3_bp  5  /* Address Size bit 3 position. */
 
5375
#define EBI_CS_ASIZE4_bm  (1<<6)  /* Address Size bit 4 mask. */
 
5376
#define EBI_CS_ASIZE4_bp  6  /* Address Size bit 4 position. */
5350
5377
 
5351
5378
#define EBI_CS_MODE_gm  0x03  /* Memory Mode group mask. */
5352
5379
#define EBI_CS_MODE_gp  0  /* Memory Mode group position. */