summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/menus/settings_menu.c20
-rw-r--r--firmware/drivers/serial.c37
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/serial-imx31.h2
3 files changed, 30 insertions, 29 deletions
diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c
index b6e5ad4171..85e4f9649f 100644
--- a/apps/menus/settings_menu.c
+++ b/apps/menus/settings_menu.c
@@ -58,7 +58,7 @@
static void tagcache_rebuild_with_splash(void)
{
tagcache_rebuild();
- splash(HZ*2, ID2P(LANG_TAGCACHE_FORCE_UPDATE_SPLASH));
+ splash(HZ*2, ID2P(LANG_TAGCACHE_FORCE_UPDATE_SPLASH));
}
static void tagcache_update_with_splash(void)
@@ -72,17 +72,17 @@ MENUITEM_SETTING(tagcache_ram, &global_settings.tagcache_ram, NULL);
#endif
MENUITEM_SETTING(tagcache_autoupdate, &global_settings.tagcache_autoupdate, NULL);
MENUITEM_FUNCTION(tc_init, 0, ID2P(LANG_TAGCACHE_FORCE_UPDATE),
- (int(*)(void))tagcache_rebuild_with_splash,
+ (int(*)(void))tagcache_rebuild_with_splash,
NULL, NULL, Icon_NOICON);
MENUITEM_FUNCTION(tc_update, 0, ID2P(LANG_TAGCACHE_UPDATE),
- (int(*)(void))tagcache_update_with_splash,
+ (int(*)(void))tagcache_update_with_splash,
NULL, NULL, Icon_NOICON);
MENUITEM_SETTING(runtimedb, &global_settings.runtimedb, NULL);
MENUITEM_FUNCTION(tc_export, 0, ID2P(LANG_TAGCACHE_EXPORT),
- (int(*)(void))tagtree_export, NULL,
+ (int(*)(void))tagtree_export, NULL,
NULL, Icon_NOICON);
MENUITEM_FUNCTION(tc_import, 0, ID2P(LANG_TAGCACHE_IMPORT),
- (int(*)(void))tagtree_import, NULL,
+ (int(*)(void))tagtree_import, NULL,
NULL, Icon_NOICON);
MAKE_MENU(tagcache_menu, ID2P(LANG_TAGCACHE), 0, Icon_NOICON,
#ifdef HAVE_TC_RAMCACHE
@@ -268,7 +268,7 @@ MENUITEM_SETTING(touchpad_sensitivity, &global_settings.touchpad_sensitivity, NU
#endif
-MAKE_MENU(system_menu, ID2P(LANG_SYSTEM),
+MAKE_MENU(system_menu, ID2P(LANG_SYSTEM),
0, Icon_System_menu,
&start_screen,
#if (BATTERY_CAPACITY_INC > 0) || (BATTERY_TYPES_COUNT > 1)
@@ -285,7 +285,7 @@ MAKE_MENU(system_menu, ID2P(LANG_SYSTEM),
#if CONFIG_CHARGING
&car_adapter_mode,
#endif
-#ifdef IPOD_ACCESSORY_PROTOCOL,
+#ifdef IPOD_ACCESSORY_PROTOCOL
&serial_bitrate,
#endif
#ifdef HAVE_ACCESSORY_SUPPLY
@@ -322,7 +322,7 @@ static int bmark_callback(int action,const struct menu_item_ex *this_item)
{
if(global_settings.usemrb == BOOKMARK_NO)
global_settings.usemrb = BOOKMARK_YES;
-
+
}
break;
}
@@ -361,7 +361,7 @@ static int talk_callback(int action,const struct menu_item_ex *this_item)
if (this_item == &talk_dir_clip_item)
break;
if (!oldval && global_settings.talk_file_clip)
- {
+ {
/* force reload if newly talking thumbnails,
because the clip presence is cached only if enabled */
reload_directory();
@@ -374,7 +374,7 @@ MENUITEM_SETTING(talk_filetype_item, &global_settings.talk_filetype, NULL);
MENUITEM_SETTING(talk_battery_level_item,
&global_settings.talk_battery_level, NULL);
MAKE_MENU(voice_settings_menu, ID2P(LANG_VOICE), 0, Icon_Voice,
- &talk_menu_item, &talk_dir_item, &talk_dir_clip_item,
+ &talk_menu_item, &talk_dir_item, &talk_dir_clip_item,
&talk_file_item, &talk_file_clip_item, &talk_filetype_item,
&talk_battery_level_item);
/* VOICE MENU */
diff --git a/firmware/drivers/serial.c b/firmware/drivers/serial.c
index a496824261..039f7913a0 100644
--- a/firmware/drivers/serial.c
+++ b/firmware/drivers/serial.c
@@ -52,11 +52,11 @@
#define VOLUP 0xD0
#define VOLDN 0xE0
-void serial_setup (void)
+void serial_setup (void)
{
/* Set PB10 function to serial Rx */
PBCR1 = (PBCR1 & 0xffcf) | 0x0020;
-
+
SMR1 = 0x00;
SCR1 = 0;
BRR1 = (FREQ/(32*9600))-1;
@@ -77,7 +77,7 @@ int tx_rdy(void)
return 1;
}
-int rx_rdy(void)
+int rx_rdy(void)
{
if(SSR1 & SCI_RDRF)
return 1;
@@ -110,7 +110,7 @@ int remote_control_rx(void)
static int last_was_error = false;
int btn;
int ret = BUTTON_NONE;
-
+
/* Errors? Just clear'em. The receiver stops if we don't */
if(SSR1 & (SCI_ORER | SCI_FER | SCI_PER)) {
and_b(~(SCI_ORER | SCI_FER | SCI_PER), &SSR1);
@@ -121,7 +121,7 @@ int remote_control_rx(void)
if(rx_rdy()) {
btn = rx_readc();
-
+
if(last_was_error)
{
last_valid_button = BUTTON_NONE;
@@ -170,7 +170,7 @@ int remote_control_rx(void)
ret = last_valid_button;
last_valid_button = BUTTON_NONE;
}
-
+
last_was_error = false;
return ret;
@@ -179,7 +179,7 @@ int remote_control_rx(void)
#endif /* !HAVE_FMADC && !STORAGE_MMC */
#elif defined(CPU_COLDFIRE) && defined(HAVE_SERIAL)
-void serial_setup (void)
+void serial_setup (void)
{
UCR0 = 0x30; /* Reset transmitter */
UCSR0 = 0xdd; /* Timer mode */
@@ -199,7 +199,7 @@ int tx_rdy(void)
return 0;
}
-int rx_rdy(void)
+int rx_rdy(void)
{
/* a dummy */
return 0;
@@ -236,9 +236,9 @@ int tx_rdy(void)
return 0;
}
-/*Not ready...After first Rx, UTS1 & UTS1_RXEMPTY
+/*Not ready...After first Rx, UTS1 & UTS1_RXEMPTY
keeps returning true*/
-int rx_rdy(void)
+int rx_rdy(void)
{
if(!(UTS1 & EUARTUTS_RXEMPTY))
return 1;
@@ -256,7 +256,7 @@ static int autobaud = 0;
void serial_setup (void)
{
int tmp;
-
+
#if (MODEL_NUMBER == 3) || (MODEL_NUMBER == 8)
/* Route the Tx/Rx pins. 4G Ipod??? */
@@ -267,7 +267,7 @@ void serial_setup (void)
(*(volatile unsigned long *)(0x7000008C)) &= ~0x0C;
GPO32_ENABLE &= ~0x0C;
#endif
-
+
DEV_EN = DEV_EN | DEV_SER0;
CPU_HI_INT_DIS = SER0_MASK;
@@ -314,7 +314,7 @@ int tx_rdy(void)
return 0;
}
-int rx_rdy(void)
+int rx_rdy(void)
{
if((SER0_LSR & 0x1))
return 1;
@@ -337,7 +337,7 @@ void SERIAL0(void)
static int badbaud = 0;
static bool newpkt = true;
char temp;
-
+
while(rx_rdy())
{
temp = rx_readc();
@@ -428,7 +428,7 @@ void SERIAL0(void)
}
#else /* Other targets */
-void serial_setup (void)
+void serial_setup (void)
{
/* a dummy */
}
@@ -439,14 +439,15 @@ int tx_rdy(void)
return 1;
}
-int rx_rdy(void)
+int rx_rdy(void)
{
/* a dummy */
return 0;
}
-void tx_writec(unsigned char c)
+void tx_writec(const unsigned char c)
{
+ (void)c;
/* a dummy */
}
@@ -456,7 +457,7 @@ void dprintf(const char * str, ... )
{
char dprintfbuff[256];
char * ptr;
-
+
va_list ap;
va_start(ap, str);
diff --git a/firmware/target/arm/imx31/gigabeat-s/serial-imx31.h b/firmware/target/arm/imx31/gigabeat-s/serial-imx31.h
index 1ee3b4e81c..cbb7be2ec3 100644
--- a/firmware/target/arm/imx31/gigabeat-s/serial-imx31.h
+++ b/firmware/target/arm/imx31/gigabeat-s/serial-imx31.h
@@ -26,7 +26,7 @@
int tx_rdy(void);
int rx_rdy(void);
-void tx_writec(const char c);
+void tx_writec(const unsigned char c);
void dprintf(const char * str, ... );
#endif /* SERIAL_IMX31_H */