summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2010-07-31 12:43:38 +0000
committerBertrik Sikken <bertrik@sikken.nl>2010-07-31 12:43:38 +0000
commit4a8ea6c9d9b0db1de59ee4d2b9cc0125caa990c7 (patch)
treea3c6697c6de315cfab1f839191b1d62293978bca /firmware
parentc2529c341d4ecb8bea28f99f0f9e28e70c311487 (diff)
downloadrockbox-4a8ea6c9d9b0db1de59ee4d2b9cc0125caa990c7.tar.gz
rockbox-4a8ea6c9d9b0db1de59ee4d2b9cc0125caa990c7.tar.bz2
rockbox-4a8ea6c9d9b0db1de59ee4d2b9cc0125caa990c7.zip
Various minor clean-ups for Zen Vision
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27636 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/audio/tlv320.c9
-rw-r--r--firmware/drivers/isp1583.c5
-rw-r--r--firmware/target/arm/tms320dm320/creative-zvm/powermgmt-creativezvm.c5
-rw-r--r--firmware/target/arm/tms320dm320/debug-dm320.c1
-rw-r--r--firmware/target/arm/tms320dm320/spi-dm320.c4
-rw-r--r--firmware/target/arm/tms320dm320/uart-dm320.c2
6 files changed, 14 insertions, 12 deletions
diff --git a/firmware/drivers/audio/tlv320.c b/firmware/drivers/audio/tlv320.c
index b537fd5773..dc19023521 100644
--- a/firmware/drivers/audio/tlv320.c
+++ b/firmware/drivers/audio/tlv320.c
@@ -69,14 +69,14 @@ int tenthdb2master(int db)
#define TLV320_ADDR 0x1A
#endif
-struct tlv320_info
+static struct tlv320_info
{
int vol_l;
int vol_r;
} tlv320;
/* Shadow registers */
-unsigned tlv320_regs[0xf];
+static unsigned tlv320_regs[0xf];
static void tlv320_write_reg(unsigned reg, unsigned value)
{
@@ -304,8 +304,8 @@ void audiohw_disable_recording(void)
value_pc |= PC_ADC | PC_MIC | PC_LINE; /* ADC, MIC and LINE off */
tlv320_write_reg(REG_PC, value_pc);
}
-#endif
+#ifdef HAVE_FMRADIO_IN
void audiohw_set_monitor(bool enable)
{
unsigned value_aap, value_pc;
@@ -325,3 +325,6 @@ void audiohw_set_monitor(bool enable)
tlv320_write_reg(REG_AAP, value_aap);
tlv320_write_reg(REG_PC, value_pc);
}
+#endif /* HAVE_FMRADIO_IN */
+#endif /* HAVE_RECORDING */
+
diff --git a/firmware/drivers/isp1583.c b/firmware/drivers/isp1583.c
index 26d638171c..f45ff6eb5e 100644
--- a/firmware/drivers/isp1583.c
+++ b/firmware/drivers/isp1583.c
@@ -397,15 +397,16 @@ static void setup_endpoints(void)
ZVM_SPECIFIC;
}
-void usb_helper(void)
+#if 0 /* currently unused */
+static void usb_helper(void)
{
if(ISP1583_GEN_INT_READ & ISP1583_INIT_INTEN_READ)
{
logf("Helper detected interrupt... [%d]", (int)current_tick);
usb_drv_int();
}
- return;
}
+#endif
void usb_drv_init(void)
{
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/powermgmt-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/powermgmt-creativezvm.c
index d85ade18c3..a6d19347c4 100644
--- a/firmware/target/arm/tms320dm320/creative-zvm/powermgmt-creativezvm.c
+++ b/firmware/target/arm/tms320dm320/creative-zvm/powermgmt-creativezvm.c
@@ -26,7 +26,7 @@
/* THIS CONTAINS CURRENTLY DUMMY CODE! */
-unsigned short current_voltage = 3910;
+static const unsigned short current_voltage = 3910;
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
{
0
@@ -48,9 +48,6 @@ const unsigned short percent_to_volt_charge[11] =
{
100, 300, 400, 500, 600, 700, 800, 900, 1000, 1200, 1320,
};
-void read_battery_inputs(void)
-{
-}
/* Returns battery voltage from ADC [millivolts] */
unsigned int battery_adc_voltage(void)
diff --git a/firmware/target/arm/tms320dm320/debug-dm320.c b/firmware/target/arm/tms320dm320/debug-dm320.c
index 8bf170048e..cc529f5d15 100644
--- a/firmware/target/arm/tms320dm320/debug-dm320.c
+++ b/firmware/target/arm/tms320dm320/debug-dm320.c
@@ -27,6 +27,7 @@
#include "button.h"
#include "lcd.h"
#include "debug.h"
+#include "debug-target.h"
#include "font.h"
#include "lcd-target.h"
diff --git a/firmware/target/arm/tms320dm320/spi-dm320.c b/firmware/target/arm/tms320dm320/spi-dm320.c
index 222228aa8d..12ce0e0d5e 100644
--- a/firmware/target/arm/tms320dm320/spi-dm320.c
+++ b/firmware/target/arm/tms320dm320/spi-dm320.c
@@ -33,7 +33,7 @@
#define GIO_BL_ENABLE (1<<13)
#define GIO_LCD_ENABLE (1<<5)
-struct mutex spi_mtx;
+static struct mutex spi_mtx;
struct SPI_info {
volatile unsigned short *setreg;
@@ -43,7 +43,7 @@ struct SPI_info {
char divider;
};
-struct SPI_info spi_targets[] =
+static struct SPI_info spi_targets[] =
{
#ifndef CREATIVE_ZVx
[SPI_target_TSC2100] = { &IO_GIO_BITCLR1, &IO_GIO_BITSET1,
diff --git a/firmware/target/arm/tms320dm320/uart-dm320.c b/firmware/target/arm/tms320dm320/uart-dm320.c
index 55515aa406..7490695f0f 100644
--- a/firmware/target/arm/tms320dm320/uart-dm320.c
+++ b/firmware/target/arm/tms320dm320/uart-dm320.c
@@ -29,7 +29,7 @@
#define SEND_RING_SIZE 256
#define RECEIVE_RING_SIZE 20
-char
+static char
uart1_send_buffer_ring[SEND_RING_SIZE],
uart1_receive_buffer_ring[RECEIVE_RING_SIZE];