- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
typedef volatile struct
{ int np_piodata; // read/write, up to 32 bits int np_piodirection; // write/readable, up to 32 bits, 1->output bit int np_piointerruptmask; // write/readable, up to 32 bits, 1->enable interrupt int np_pioedgecapture; // read, up to 32 bits, cleared by any write } np_pio; can you explain me how to use PIO register...for example if i want to read a pio register... i do PIO->np_piodata.. Why does the function of " np_piodirection" http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/ph34r.gif http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/ph34r.gif http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/ph34r.gif http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/ph34r.gifLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
in general if you want learn something about the peripherials, you might want to read "Altera Embeeded Peripherals Handbook" (n2cpu_nii5v3.pdf). However you should use inl(...) for reading and outl(...) for writing the hardware register. Accessing the hardware register with such a structure is a "Nios speciality".
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page