Juan Antonio Garcia Redondo wrote:
> I've found a workaround for my problem, but I'm not sure if is the
> correct solution.
>
> First, my test program test_irq.c had an error, after request the irq,
> it have be enabled; anyway the problem persists because the
> __ipipe_mach_demux_irq find the irq disabled (gpio->depth = 1).
You should not have to enable irqs, this should be done automatically
when requesting the irq. Which irq did you have to enable, the gpio irq
? Or the multiplexed one ?
>
> My workaround:
> +++ wrappers.h 2007-12-21 08:19:19.000000000 +0100
> @@ -74,8 +74,15 @@
> #define rthal_irq_chip_disable(irq) ({
> rthal_irq_descp(irq)->chip->disable(irq); 0; })
> #define rthal_irq_chip_end(irq) ({
> rthal_irq_descp(irq)->ipipe_end(irq, rthal_irq_descp(irq)); 0; })
> typedef irq_handler_t rthal_irq_host_handler_t;
> -#define rthal_mark_irq_disabled(irq) (rthal_irq_desc_status(irq) |=
> IRQ_DISABLED)
> -#define rthal_mark_irq_enabled(irq) (rthal_irq_desc_status(irq) &=
> ~IRQ_DISABLED)
> +#define rthal_mark_irq_disabled(irq) do { \
> + rthal_irq_desc_status(irq) |= IRQ_DISABLED; \
> + rthal_irq_descp(irq)->depth = 1; \
> + } while(0);
> +#define rthal_mark_irq_enabled(irq) do { \
> + rthal_irq_desc_status(irq) &= ~IRQ_DISABLED; \
> + rthal_irq_descp(irq)->depth = 0; \
> + } while(0);
> +#endif
--
Gilles Chanteperdrix.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help