diff options
author | Michael Giacomelli <giac2000@hotmail.com> | 2008-12-25 03:23:22 +0000 |
---|---|---|
committer | Michael Giacomelli <giac2000@hotmail.com> | 2008-12-25 03:23:22 +0000 |
commit | e25f1f9f2aed34c0f1a759d3bf64de7f9c5574ff (patch) | |
tree | f51d6cbcccb69355bccaef5af8dcadc74e51466a | |
parent | 70e9c7aed361787a404c4856211ddf53127fca9a (diff) | |
download | rockbox-e25f1f9f2aed34c0f1a759d3bf64de7f9c5574ff.tar.gz rockbox-e25f1f9f2aed34c0f1a759d3bf64de7f9c5574ff.zip |
Hopefully fix read.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19586 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/menus/settings_menu.c | 20 | ||||
-rw-r--r-- | firmware/drivers/serial.c | 37 | ||||
-rw-r--r-- | firmware/target/arm/imx31/gigabeat-s/serial-imx31.h | 2 |
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 @@ | |||
58 | static void tagcache_rebuild_with_splash(void) | 58 | static void tagcache_rebuild_with_splash(void) |
59 | { | 59 | { |
60 | tagcache_rebuild(); | 60 | tagcache_rebuild(); |
61 | splash(HZ*2, ID2P(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); | 61 | splash(HZ*2, ID2P(LANG_TAGCACHE_FORCE_UPDATE_SPLASH)); |
62 | } | 62 | } |
63 | 63 | ||
64 | static void tagcache_update_with_splash(void) | 64 | static void tagcache_update_with_splash(void) |
@@ -72,17 +72,17 @@ MENUITEM_SETTING(tagcache_ram, &global_settings.tagcache_ram, NULL); | |||
72 | #endif | 72 | #endif |
73 | MENUITEM_SETTING(tagcache_autoupdate, &global_settings.tagcache_autoupdate, NULL); | 73 | MENUITEM_SETTING(tagcache_autoupdate, &global_settings.tagcache_autoupdate, NULL); |
74 | MENUITEM_FUNCTION(tc_init, 0, ID2P(LANG_TAGCACHE_FORCE_UPDATE), | 74 | MENUITEM_FUNCTION(tc_init, 0, ID2P(LANG_TAGCACHE_FORCE_UPDATE), |
75 | (int(*)(void))tagcache_rebuild_with_splash, | 75 | (int(*)(void))tagcache_rebuild_with_splash, |
76 | NULL, NULL, Icon_NOICON); | 76 | NULL, NULL, Icon_NOICON); |
77 | MENUITEM_FUNCTION(tc_update, 0, ID2P(LANG_TAGCACHE_UPDATE), | 77 | MENUITEM_FUNCTION(tc_update, 0, ID2P(LANG_TAGCACHE_UPDATE), |
78 | (int(*)(void))tagcache_update_with_splash, | 78 | (int(*)(void))tagcache_update_with_splash, |
79 | NULL, NULL, Icon_NOICON); | 79 | NULL, NULL, Icon_NOICON); |
80 | MENUITEM_SETTING(runtimedb, &global_settings.runtimedb, NULL); | 80 | MENUITEM_SETTING(runtimedb, &global_settings.runtimedb, NULL); |
81 | MENUITEM_FUNCTION(tc_export, 0, ID2P(LANG_TAGCACHE_EXPORT), | 81 | MENUITEM_FUNCTION(tc_export, 0, ID2P(LANG_TAGCACHE_EXPORT), |
82 | (int(*)(void))tagtree_export, NULL, | 82 | (int(*)(void))tagtree_export, NULL, |
83 | NULL, Icon_NOICON); | 83 | NULL, Icon_NOICON); |
84 | MENUITEM_FUNCTION(tc_import, 0, ID2P(LANG_TAGCACHE_IMPORT), | 84 | MENUITEM_FUNCTION(tc_import, 0, ID2P(LANG_TAGCACHE_IMPORT), |
85 | (int(*)(void))tagtree_import, NULL, | 85 | (int(*)(void))tagtree_import, NULL, |
86 | NULL, Icon_NOICON); | 86 | NULL, Icon_NOICON); |
87 | MAKE_MENU(tagcache_menu, ID2P(LANG_TAGCACHE), 0, Icon_NOICON, | 87 | MAKE_MENU(tagcache_menu, ID2P(LANG_TAGCACHE), 0, Icon_NOICON, |
88 | #ifdef HAVE_TC_RAMCACHE | 88 | #ifdef HAVE_TC_RAMCACHE |
@@ -268,7 +268,7 @@ MENUITEM_SETTING(touchpad_sensitivity, &global_settings.touchpad_sensitivity, NU | |||
268 | #endif | 268 | #endif |
269 | 269 | ||
270 | 270 | ||
271 | MAKE_MENU(system_menu, ID2P(LANG_SYSTEM), | 271 | MAKE_MENU(system_menu, ID2P(LANG_SYSTEM), |
272 | 0, Icon_System_menu, | 272 | 0, Icon_System_menu, |
273 | &start_screen, | 273 | &start_screen, |
274 | #if (BATTERY_CAPACITY_INC > 0) || (BATTERY_TYPES_COUNT > 1) | 274 | #if (BATTERY_CAPACITY_INC > 0) || (BATTERY_TYPES_COUNT > 1) |
@@ -285,7 +285,7 @@ MAKE_MENU(system_menu, ID2P(LANG_SYSTEM), | |||
285 | #if CONFIG_CHARGING | 285 | #if CONFIG_CHARGING |
286 | &car_adapter_mode, | 286 | &car_adapter_mode, |
287 | #endif | 287 | #endif |
288 | #ifdef IPOD_ACCESSORY_PROTOCOL, | 288 | #ifdef IPOD_ACCESSORY_PROTOCOL |
289 | &serial_bitrate, | 289 | &serial_bitrate, |
290 | #endif | 290 | #endif |
291 | #ifdef HAVE_ACCESSORY_SUPPLY | 291 | #ifdef HAVE_ACCESSORY_SUPPLY |
@@ -322,7 +322,7 @@ static int bmark_callback(int action,const struct menu_item_ex *this_item) | |||
322 | { | 322 | { |
323 | if(global_settings.usemrb == BOOKMARK_NO) | 323 | if(global_settings.usemrb == BOOKMARK_NO) |
324 | global_settings.usemrb = BOOKMARK_YES; | 324 | global_settings.usemrb = BOOKMARK_YES; |
325 | 325 | ||
326 | } | 326 | } |
327 | break; | 327 | break; |
328 | } | 328 | } |
@@ -361,7 +361,7 @@ static int talk_callback(int action,const struct menu_item_ex *this_item) | |||
361 | if (this_item == &talk_dir_clip_item) | 361 | if (this_item == &talk_dir_clip_item) |
362 | break; | 362 | break; |
363 | if (!oldval && global_settings.talk_file_clip) | 363 | if (!oldval && global_settings.talk_file_clip) |
364 | { | 364 | { |
365 | /* force reload if newly talking thumbnails, | 365 | /* force reload if newly talking thumbnails, |
366 | because the clip presence is cached only if enabled */ | 366 | because the clip presence is cached only if enabled */ |
367 | reload_directory(); | 367 | reload_directory(); |
@@ -374,7 +374,7 @@ MENUITEM_SETTING(talk_filetype_item, &global_settings.talk_filetype, NULL); | |||
374 | MENUITEM_SETTING(talk_battery_level_item, | 374 | MENUITEM_SETTING(talk_battery_level_item, |
375 | &global_settings.talk_battery_level, NULL); | 375 | &global_settings.talk_battery_level, NULL); |
376 | MAKE_MENU(voice_settings_menu, ID2P(LANG_VOICE), 0, Icon_Voice, | 376 | MAKE_MENU(voice_settings_menu, ID2P(LANG_VOICE), 0, Icon_Voice, |
377 | &talk_menu_item, &talk_dir_item, &talk_dir_clip_item, | 377 | &talk_menu_item, &talk_dir_item, &talk_dir_clip_item, |
378 | &talk_file_item, &talk_file_clip_item, &talk_filetype_item, | 378 | &talk_file_item, &talk_file_clip_item, &talk_filetype_item, |
379 | &talk_battery_level_item); | 379 | &talk_battery_level_item); |
380 | /* VOICE MENU */ | 380 | /* 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 @@ | |||
52 | #define VOLUP 0xD0 | 52 | #define VOLUP 0xD0 |
53 | #define VOLDN 0xE0 | 53 | #define VOLDN 0xE0 |
54 | 54 | ||
55 | void serial_setup (void) | 55 | void serial_setup (void) |
56 | { | 56 | { |
57 | /* Set PB10 function to serial Rx */ | 57 | /* Set PB10 function to serial Rx */ |
58 | PBCR1 = (PBCR1 & 0xffcf) | 0x0020; | 58 | PBCR1 = (PBCR1 & 0xffcf) | 0x0020; |
59 | 59 | ||
60 | SMR1 = 0x00; | 60 | SMR1 = 0x00; |
61 | SCR1 = 0; | 61 | SCR1 = 0; |
62 | BRR1 = (FREQ/(32*9600))-1; | 62 | BRR1 = (FREQ/(32*9600))-1; |
@@ -77,7 +77,7 @@ int tx_rdy(void) | |||
77 | return 1; | 77 | return 1; |
78 | } | 78 | } |
79 | 79 | ||
80 | int rx_rdy(void) | 80 | int rx_rdy(void) |
81 | { | 81 | { |
82 | if(SSR1 & SCI_RDRF) | 82 | if(SSR1 & SCI_RDRF) |
83 | return 1; | 83 | return 1; |
@@ -110,7 +110,7 @@ int remote_control_rx(void) | |||
110 | static int last_was_error = false; | 110 | static int last_was_error = false; |
111 | int btn; | 111 | int btn; |
112 | int ret = BUTTON_NONE; | 112 | int ret = BUTTON_NONE; |
113 | 113 | ||
114 | /* Errors? Just clear'em. The receiver stops if we don't */ | 114 | /* Errors? Just clear'em. The receiver stops if we don't */ |
115 | if(SSR1 & (SCI_ORER | SCI_FER | SCI_PER)) { | 115 | if(SSR1 & (SCI_ORER | SCI_FER | SCI_PER)) { |
116 | and_b(~(SCI_ORER | SCI_FER | SCI_PER), &SSR1); | 116 | and_b(~(SCI_ORER | SCI_FER | SCI_PER), &SSR1); |
@@ -121,7 +121,7 @@ int remote_control_rx(void) | |||
121 | 121 | ||
122 | if(rx_rdy()) { | 122 | if(rx_rdy()) { |
123 | btn = rx_readc(); | 123 | btn = rx_readc(); |
124 | 124 | ||
125 | if(last_was_error) | 125 | if(last_was_error) |
126 | { | 126 | { |
127 | last_valid_button = BUTTON_NONE; | 127 | last_valid_button = BUTTON_NONE; |
@@ -170,7 +170,7 @@ int remote_control_rx(void) | |||
170 | ret = last_valid_button; | 170 | ret = last_valid_button; |
171 | last_valid_button = BUTTON_NONE; | 171 | last_valid_button = BUTTON_NONE; |
172 | } | 172 | } |
173 | 173 | ||
174 | last_was_error = false; | 174 | last_was_error = false; |
175 | 175 | ||
176 | return ret; | 176 | return ret; |
@@ -179,7 +179,7 @@ int remote_control_rx(void) | |||
179 | #endif /* !HAVE_FMADC && !STORAGE_MMC */ | 179 | #endif /* !HAVE_FMADC && !STORAGE_MMC */ |
180 | #elif defined(CPU_COLDFIRE) && defined(HAVE_SERIAL) | 180 | #elif defined(CPU_COLDFIRE) && defined(HAVE_SERIAL) |
181 | 181 | ||
182 | void serial_setup (void) | 182 | void serial_setup (void) |
183 | { | 183 | { |
184 | UCR0 = 0x30; /* Reset transmitter */ | 184 | UCR0 = 0x30; /* Reset transmitter */ |
185 | UCSR0 = 0xdd; /* Timer mode */ | 185 | UCSR0 = 0xdd; /* Timer mode */ |
@@ -199,7 +199,7 @@ int tx_rdy(void) | |||
199 | return 0; | 199 | return 0; |
200 | } | 200 | } |
201 | 201 | ||
202 | int rx_rdy(void) | 202 | int rx_rdy(void) |
203 | { | 203 | { |
204 | /* a dummy */ | 204 | /* a dummy */ |
205 | return 0; | 205 | return 0; |
@@ -236,9 +236,9 @@ int tx_rdy(void) | |||
236 | return 0; | 236 | return 0; |
237 | } | 237 | } |
238 | 238 | ||
239 | /*Not ready...After first Rx, UTS1 & UTS1_RXEMPTY | 239 | /*Not ready...After first Rx, UTS1 & UTS1_RXEMPTY |
240 | keeps returning true*/ | 240 | keeps returning true*/ |
241 | int rx_rdy(void) | 241 | int rx_rdy(void) |
242 | { | 242 | { |
243 | if(!(UTS1 & EUARTUTS_RXEMPTY)) | 243 | if(!(UTS1 & EUARTUTS_RXEMPTY)) |
244 | return 1; | 244 | return 1; |
@@ -256,7 +256,7 @@ static int autobaud = 0; | |||
256 | void serial_setup (void) | 256 | void serial_setup (void) |
257 | { | 257 | { |
258 | int tmp; | 258 | int tmp; |
259 | 259 | ||
260 | #if (MODEL_NUMBER == 3) || (MODEL_NUMBER == 8) | 260 | #if (MODEL_NUMBER == 3) || (MODEL_NUMBER == 8) |
261 | 261 | ||
262 | /* Route the Tx/Rx pins. 4G Ipod??? */ | 262 | /* Route the Tx/Rx pins. 4G Ipod??? */ |
@@ -267,7 +267,7 @@ void serial_setup (void) | |||
267 | (*(volatile unsigned long *)(0x7000008C)) &= ~0x0C; | 267 | (*(volatile unsigned long *)(0x7000008C)) &= ~0x0C; |
268 | GPO32_ENABLE &= ~0x0C; | 268 | GPO32_ENABLE &= ~0x0C; |
269 | #endif | 269 | #endif |
270 | 270 | ||
271 | DEV_EN = DEV_EN | DEV_SER0; | 271 | DEV_EN = DEV_EN | DEV_SER0; |
272 | CPU_HI_INT_DIS = SER0_MASK; | 272 | CPU_HI_INT_DIS = SER0_MASK; |
273 | 273 | ||
@@ -314,7 +314,7 @@ int tx_rdy(void) | |||
314 | return 0; | 314 | return 0; |
315 | } | 315 | } |
316 | 316 | ||
317 | int rx_rdy(void) | 317 | int rx_rdy(void) |
318 | { | 318 | { |
319 | if((SER0_LSR & 0x1)) | 319 | if((SER0_LSR & 0x1)) |
320 | return 1; | 320 | return 1; |
@@ -337,7 +337,7 @@ void SERIAL0(void) | |||
337 | static int badbaud = 0; | 337 | static int badbaud = 0; |
338 | static bool newpkt = true; | 338 | static bool newpkt = true; |
339 | char temp; | 339 | char temp; |
340 | 340 | ||
341 | while(rx_rdy()) | 341 | while(rx_rdy()) |
342 | { | 342 | { |
343 | temp = rx_readc(); | 343 | temp = rx_readc(); |
@@ -428,7 +428,7 @@ void SERIAL0(void) | |||
428 | } | 428 | } |
429 | 429 | ||
430 | #else /* Other targets */ | 430 | #else /* Other targets */ |
431 | void serial_setup (void) | 431 | void serial_setup (void) |
432 | { | 432 | { |
433 | /* a dummy */ | 433 | /* a dummy */ |
434 | } | 434 | } |
@@ -439,14 +439,15 @@ int tx_rdy(void) | |||
439 | return 1; | 439 | return 1; |
440 | } | 440 | } |
441 | 441 | ||
442 | int rx_rdy(void) | 442 | int rx_rdy(void) |
443 | { | 443 | { |
444 | /* a dummy */ | 444 | /* a dummy */ |
445 | return 0; | 445 | return 0; |
446 | } | 446 | } |
447 | 447 | ||
448 | void tx_writec(unsigned char c) | 448 | void tx_writec(const unsigned char c) |
449 | { | 449 | { |
450 | (void)c; | ||
450 | /* a dummy */ | 451 | /* a dummy */ |
451 | } | 452 | } |
452 | 453 | ||
@@ -456,7 +457,7 @@ void dprintf(const char * str, ... ) | |||
456 | { | 457 | { |
457 | char dprintfbuff[256]; | 458 | char dprintfbuff[256]; |
458 | char * ptr; | 459 | char * ptr; |
459 | 460 | ||
460 | va_list ap; | 461 | va_list ap; |
461 | va_start(ap, str); | 462 | va_start(ap, str); |
462 | 463 | ||
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 @@ | |||
26 | 26 | ||
27 | int tx_rdy(void); | 27 | int tx_rdy(void); |
28 | int rx_rdy(void); | 28 | int rx_rdy(void); |
29 | void tx_writec(const char c); | 29 | void tx_writec(const unsigned char c); |
30 | void dprintf(const char * str, ... ); | 30 | void dprintf(const char * str, ... ); |
31 | 31 | ||
32 | #endif /* SERIAL_IMX31_H */ | 32 | #endif /* SERIAL_IMX31_H */ |