Re: interrupts



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

.



Relevant Pages

  • Re: Drawing Test Fails in Touch Panel CETK
    ... I have peace of code inside touch driver ... ISR where I wait for Gpio Event using WaitforSemphore API. ... bind GPio and timer IRQ with SYS_INTR during TouchPanelEnable. ... when GPIO detects either a PEN DOWN interrupt or PEN UP Interrupt ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Drawing Test Fails in Touch Panel CETK
    ... If you at anytime read the GPIO ... bind GPio and timer IRQ with SYS_INTR during TouchPanelEnable. ... when GPIO detects either a PEN DOWN interrupt or PEN UP Interrupt ... Touch panel is working fine i.e. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Drawing Test Fails in Touch Panel CETK
    ... Is your touch driver sampling the stylus inputs once a pen-down event comes ... Notice how once IRQ_ADC interrupt has occured, ... For Drawing I think, Main problem is, I get only one gpio interrupt ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Drawing Test Fails in Touch Panel CETK
    ... Is your touch driver sampling the stylus inputs once a pen-down event comes ... Notice how once IRQ_ADC interrupt has occured, ... Touch panel is working fine i.e. ... gpio and timer irq to TouchEvent handle. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Drawing Test Fails in Touch Panel CETK
    ... Touch panel is working fine i.e. ... For Drawing I think, Main problem is, I get only one gpio interrupt ... I use to check gpio pin status whenever I get the gpio ...
    (microsoft.public.windowsce.platbuilder)