diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2009-12-14 06:52:35 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2009-12-14 06:52:35 +0000 |
commit | 537832d3c6761aacf47c688840b93281a9a5a239 (patch) | |
tree | 8fc748eb23b5499481cf7760145f698d8d30d312 /firmware/target/arm | |
parent | 26fa2d81f60c9c648b24f224adc235e3c1a0c2d4 (diff) | |
download | rockbox-537832d3c6761aacf47c688840b93281a9a5a239.tar.gz rockbox-537832d3c6761aacf47c688840b93281a9a5a239.zip |
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
Diffstat (limited to 'firmware/target/arm')
-rw-r--r-- | firmware/target/arm/tms320dm320/spi-dm320.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/firmware/target/arm/tms320dm320/spi-dm320.c b/firmware/target/arm/tms320dm320/spi-dm320.c index 040955f01a..222228aa8d 100644 --- a/firmware/target/arm/tms320dm320/spi-dm320.c +++ b/firmware/target/arm/tms320dm320/spi-dm320.c | |||
@@ -124,17 +124,19 @@ void spi_init(void) | |||
124 | /* Enable TX */ | 124 | /* Enable TX */ |
125 | IO_SERIAL0_TX_ENABLE = 0x0001; | 125 | IO_SERIAL0_TX_ENABLE = 0x0001; |
126 | #ifndef CREATIVE_ZVx | 126 | #ifndef CREATIVE_ZVx |
127 | /* Set GIO 18 to output for touch screen slave enable */ | 127 | /* Setup SPI Chip Select Pins: |
128 | /* Set GIO 29 to output for backlight enable */ | 128 | * 12 - RTC |
129 | IO_GIO_DIR1 &= ~(GIO_TS_ENABLE | GIO_BL_ENABLE); | 129 | * 18 - Touchscreen |
130 | IO_GIO_INV1 &= ~(GIO_TS_ENABLE | GIO_BL_ENABLE); /* non-inverted */ | 130 | * 29 - Backlight |
131 | IO_GIO_FSEL1 &= ~(0x03<<2); /* normal pin */ | 131 | */ |
132 | IO_GIO_FSEL2 &= ~(0x03<<8); /* normal pin */ | 132 | /* 12: output, non-inverted, no-irq, falling edge, no-chat, normal */ |
133 | dm320_set_io(12, false, false, false, false, false, 0x00); | ||
133 | 134 | ||
134 | /* Set GIO 12 to output for rtc slave enable */ | 135 | /* 18: output, non-inverted, no-irq, falling edge, no-chat, normal */ |
135 | IO_GIO_DIR0 &= ~GIO_RTC_ENABLE; | 136 | dm320_set_io(18, false, false, false, false, false, 0x00); |
136 | IO_GIO_INV0 &= ~(GIO_RTC_ENABLE); /* non-inverted */ | 137 | |
137 | IO_GIO_FSEL0 &= ~(0x03<<6); /* normal pin */ | 138 | /* 29: output, non-inverted, no-irq, falling edge, no-chat, normal */ |
139 | dm320_set_io(29, false, false, false, false, false, 0x00); | ||
138 | #endif | 140 | #endif |
139 | /* make sure only one is ever enabled at a time */ | 141 | /* make sure only one is ever enabled at a time */ |
140 | spi_disable_all_targets(); | 142 | spi_disable_all_targets(); |