Re: interrupts
- From: Josef Moellers <josef.moellers@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 02 Dec 2005 10:04:56 +0100
CptDondo wrote:
I have the following bit of code on an embedded platform, and I am trying to figure out what all these defines mean....
I am pretty sure they pertain to interrupt operations, but I have not worked with interrupts before so I am not sure of the particulars.
Each register contains 8 bits, one for each of 8 GPIO lines, so toggling one bit should enable/disable or do something else with interrupts for that GPIO line.
These registers contain 32 bits ("uint32_t *"). But then, maybe only the low 8 bits are actually used.
// No idea what type 1 and 2 do.... Something to do with edge and high?
#define GPIO_B_TYPE1 ((volatile uint32_t *)(gpio_ptr + 0x00AC)) #define GPIO_B_TYPE2 ((volatile uint32_t *)(gpio_ptr + 0x00B0))
// end of interrupt? How would this be used?
#define GPIO_B_EOI ((volatile uint32_t *)(gpio_ptr + 0x00B4))
Usually by just reading from that address, maybe writing to that address, maybe writing the currently handled interrupt number to that address ...
// Interrupt enable?
#define GPIO_B_INTENB ((volatile uint32_t *)(gpio_ptr + 0x00B8))
If it's a global interrupt enable, write a 0 to disable, a 1 to enable, more likely it's a bitmask where bit i enables interrupt request i.
// ???? No idea.
#define GPIO_B_INTSTS ((volatile uint32_t *)(gpio_ptr + 0x00BC))
Interrupt status? Bits are defined by the manufacturer.
You'll have absolutely no luck without a manual.
-- Josef Möllers (Pinguinpfleger bei FSC) If failure had no penalty success would not be a prize -- T. Pratchett
.
- References:
- interrupts
- From: CptDondo
- interrupts
- Prev by Date: Re: Inter-process Pthread Mutex?
- Next by Date: Busybox Login problem since kernel 2.6.12
- Previous by thread: Re: interrupts
- Next by thread: kernel versions difference question
- Index(es):
Relevant Pages
|