[En-Nut-Discussion] VS10XX Audio Decoder (dev/vs10xx.c) needs rewritting.
Thiago A. Corrêa
thiago.correa at gmail.com
Sat Feb 21 08:32:34 CET 2009
Hi,
The dev/vs10xx.c has port defines that only switch between MCU_AT91
and __AVR__, and that breaks the port to other platforms.
I can't enable HW_GPIO on my chip definition, without enabling that
driver. Is there an easy way to do requres = { (HW_MCU_AVR ||
HW_MCU_AT91) } ?
I guess using the <cfg/arch/porttran.h> would make it more
portable, even if it's a bit ugly. But then the __AVR__ branch has a
bit of a problem still:
#if (VS10XX_SIGNAL_IRQ == INT0)
#define VS10XX_SIGNAL sig_INTERRUPT0
#define VS10XX_DREQ_BIT 0
#define VS10XX_DREQ_PDS_REG PIND
#define VS10XX_DREQ_PUE_REG PORTD
#define VS10XX_DREQ_OE_REG DDRD
First, I'm not sure how to fit that with the porttran.h solution,
and second, I don't think that's much portable between AVR's. It
assumes that INT0 is always PD0, I don't know if that's a valid
assumption.
Perhaps using GPIO interrupts instead, we could make that work.
Right now I don't know where to begin to fix that.
Kind Regards,
Thiago A. Correa
More information about the En-Nut-Discussion
mailing list