forked from len0rd/rockbox
M:Robe 500: Initialize SPI pins with pin setup function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23987 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
26fa2d81f6
commit
537832d3c6
1 changed files with 12 additions and 10 deletions
|
|
@ -124,17 +124,19 @@ void spi_init(void)
|
||||||
/* Enable TX */
|
/* Enable TX */
|
||||||
IO_SERIAL0_TX_ENABLE = 0x0001;
|
IO_SERIAL0_TX_ENABLE = 0x0001;
|
||||||
#ifndef CREATIVE_ZVx
|
#ifndef CREATIVE_ZVx
|
||||||
/* Set GIO 18 to output for touch screen slave enable */
|
/* Setup SPI Chip Select Pins:
|
||||||
/* Set GIO 29 to output for backlight enable */
|
* 12 - RTC
|
||||||
IO_GIO_DIR1 &= ~(GIO_TS_ENABLE | GIO_BL_ENABLE);
|
* 18 - Touchscreen
|
||||||
IO_GIO_INV1 &= ~(GIO_TS_ENABLE | GIO_BL_ENABLE); /* non-inverted */
|
* 29 - Backlight
|
||||||
IO_GIO_FSEL1 &= ~(0x03<<2); /* normal pin */
|
*/
|
||||||
IO_GIO_FSEL2 &= ~(0x03<<8); /* normal pin */
|
/* 12: output, non-inverted, no-irq, falling edge, no-chat, normal */
|
||||||
|
dm320_set_io(12, false, false, false, false, false, 0x00);
|
||||||
|
|
||||||
/* Set GIO 12 to output for rtc slave enable */
|
/* 18: output, non-inverted, no-irq, falling edge, no-chat, normal */
|
||||||
IO_GIO_DIR0 &= ~GIO_RTC_ENABLE;
|
dm320_set_io(18, false, false, false, false, false, 0x00);
|
||||||
IO_GIO_INV0 &= ~(GIO_RTC_ENABLE); /* non-inverted */
|
|
||||||
IO_GIO_FSEL0 &= ~(0x03<<6); /* normal pin */
|
/* 29: output, non-inverted, no-irq, falling edge, no-chat, normal */
|
||||||
|
dm320_set_io(29, false, false, false, false, false, 0x00);
|
||||||
#endif
|
#endif
|
||||||
/* make sure only one is ever enabled at a time */
|
/* make sure only one is ever enabled at a time */
|
||||||
spi_disable_all_targets();
|
spi_disable_all_targets();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue