[En-Nut-Discussion] SAM7x Basic USB example

Uwe Bonnes bon at elektron.ikp.physik.tu-darmstadt.de
Sat Sep 16 15:37:37 CEST 2006


Martin THOMAS publised a basic usb example (no interrupt) for the SAM7S on
It's obviosly based on the source code for the sam-ba bootloader, published
by Atmel. I have it running as an ethernut example with very few changes,
and have a half-hearted include/arch/arm/at91_udp.h file. Only some few 
meta comments, but somehow in ethernut register way, like:

/*! \name (UDP) Frame Number Register */
#define UDP_NUM_OFF 0
#define AT91C_UDP_FRM_NUM     ((unsigned int) 0x7FF <<  0) /*!< \brief (UDP)\
Frame Number as Defined in the Packet Field Formats */
#define AT91C_UDP_FRM_ERR     ((unsigned int) 0x1 << 16)  /*!< \brief (UDP)\
Frame Error */
#define AT91C_UDP_FRM_OK      ((unsigned int) 0x1 << 17)  /*!< \brief (UDP)\
Frame OK */

The AT91C_ prefix is still needed, to avoid a nameclash with the register
pointer usage in the given sources.

The app is running on my Olimex SAM7-EX256 board.
Is this of interest for the apps directory? What should be changed.
There are more sources out there that could easily be integrates with Sam7
headers using the register pointer definition way.

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