summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tms320dm320
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2012-01-07 22:04:12 +0000
committerRafaël Carré <rafael.carre@gmail.com>2012-01-07 22:04:12 +0000
commit28d1af853c5e853e69991b29b5acc6b2e3b1abfe (patch)
tree834e0fc6f66569d500e60b036a66e0bcb01dc259 /firmware/target/arm/tms320dm320
parent12ef8723f8f69ab70e2af7ac8a2cc4b7bf319b96 (diff)
Clean spi.h and spi-target.h
Only target-specific (list of SPI targets) go in spi-target.h API go into spi.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31615 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tms320dm320')
-rw-r--r--firmware/target/arm/tms320dm320/creative-zvm/lcd-creativezvm.c1
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/backlight-mr500.c2
-rw-r--r--firmware/target/arm/tms320dm320/sansa-connect/backlight-sansaconnect.c1
-rw-r--r--firmware/target/arm/tms320dm320/spi-dm320.c10
-rw-r--r--firmware/target/arm/tms320dm320/spi-target.h14
5 files changed, 9 insertions, 19 deletions
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/lcd-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/lcd-creativezvm.c
index e6d9e034ed..204a99f87c 100644
--- a/firmware/target/arm/tms320dm320/creative-zvm/lcd-creativezvm.c
+++ b/firmware/target/arm/tms320dm320/creative-zvm/lcd-creativezvm.c
@@ -28,7 +28,6 @@
#include "string-extra.h" /* memset16() */
#include "cpu.h"
#include "spi.h"
-#include "spi-target.h"
#include "lcd-target.h"
#include "ltv350qv.h"
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/backlight-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/backlight-mr500.c
index fe94cf4be4..0cebc1bd5c 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/backlight-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/backlight-mr500.c
@@ -26,7 +26,7 @@
#include "backlight.h"
#include "lcd.h"
#include "power.h"
-#include "spi-target.h"
+#include "spi.h"
#include "lcd-target.h"
short read_brightness = 0x0;
diff --git a/firmware/target/arm/tms320dm320/sansa-connect/backlight-sansaconnect.c b/firmware/target/arm/tms320dm320/sansa-connect/backlight-sansaconnect.c
index 50301c0237..4104c21e52 100644
--- a/firmware/target/arm/tms320dm320/sansa-connect/backlight-sansaconnect.c
+++ b/firmware/target/arm/tms320dm320/sansa-connect/backlight-sansaconnect.c
@@ -26,7 +26,6 @@
#include "backlight.h"
#include "lcd.h"
#include "power.h"
-#include "spi-target.h"
#include "lcd-target.h"
static void _backlight_write_brightness(int brightness)
diff --git a/firmware/target/arm/tms320dm320/spi-dm320.c b/firmware/target/arm/tms320dm320/spi-dm320.c
index c2e774462a..e9a097b0ea 100644
--- a/firmware/target/arm/tms320dm320/spi-dm320.c
+++ b/firmware/target/arm/tms320dm320/spi-dm320.c
@@ -43,9 +43,12 @@ struct SPI_info {
bool clk_invert;
};
-static const struct SPI_info spi_targets[] =
+static const struct SPI_info spi_targets[SPI_MAX_TARGETS] =
{
-#ifndef CREATIVE_ZVx
+#if defined(CREATIVE_ZVx)
+ [SPI_target_LTV250QV] = { &IO_GIO_BITCLR2, &IO_GIO_BITSET2,
+ GIO_LCD_ENABLE, true, 0x07},
+#elif defined(MROBE_500)
[SPI_target_TSC2100] = { &IO_GIO_BITCLR1, &IO_GIO_BITSET1,
GIO_TS_ENABLE, 0x260D, true},
/* RTC seems to have timing problems if the CLK idles low */
@@ -54,9 +57,6 @@ static const struct SPI_info spi_targets[] =
/* This appears to work properly idling low, idling high is very glitchy */
[SPI_target_BACKLIGHT] = { &IO_GIO_BITCLR1, &IO_GIO_BITSET1,
GIO_BL_ENABLE, 0x2656, false},
-#else
- [SPI_target_LTV250QV] = { &IO_GIO_BITCLR2, &IO_GIO_BITSET2,
- GIO_LCD_ENABLE, true, 0x07},
#endif
};
diff --git a/firmware/target/arm/tms320dm320/spi-target.h b/firmware/target/arm/tms320dm320/spi-target.h
index 013737b291..965d499377 100644
--- a/firmware/target/arm/tms320dm320/spi-target.h
+++ b/firmware/target/arm/tms320dm320/spi-target.h
@@ -22,23 +22,15 @@
#ifndef SPI_TARGET_H
#define SPI_TARGET_H
-#include <inttypes.h>
-#include <stdbool.h>
-
enum SPI_target {
-#ifndef CREATIVE_ZVx
+#if defined(CREATIVE_ZVx)
+ SPI_target_LTV250QV = 0,
+#elif defined(MROBE_500)
SPI_target_TSC2100 = 0,
SPI_target_RX5X348AB,
SPI_target_BACKLIGHT,
-#else
- SPI_target_LTV250QV = 0,
#endif
SPI_MAX_TARGETS,
};
-void spi_init(void);
-int spi_block_transfer(enum SPI_target target,
- const uint8_t *tx_bytes, unsigned int tx_size,
- uint8_t *rx_bytes, unsigned int rx_size);
-
#endif