[En-Nut-Discussion] Question about ARM register definitions

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Mon Sep 11 23:39:03 CEST 2006


Hello,

while Ethernut defines arm registers like
#define PIO_PER     (PIO_BASE + 0x00)

the Atmel examples, FreeRtos and others project use something like:
typedef volatile unsigned int AT91_REG;// Hardware register definition
typedef struct _AT91S_PIO {
        AT91_REG         PIO_PER;       // PIO Enable Register
...
} AT91S_PIO, *AT91PS_PIO;

The ethernut way to define require us to use inr() and outr(), while the
other way allows to use AT91C_BASE_PIOA->PIO_PER = AT91C_PIO_PA16;

For the AVR, Ethernut uses the latter way of defining. Is the Ethernut Arm
way some intermediate way or intended to stay?

Thanks
-- 
Uwe Bonnes                bon at elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------



More information about the En-Nut-Discussion mailing list