summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/backlight.c6
-rw-r--r--firmware/drivers/lcd.c9
-rw-r--r--firmware/mpeg.c7
-rw-r--r--firmware/usb.c5
4 files changed, 17 insertions, 10 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c
index 72042b748a..32a222929b 100644
--- a/firmware/backlight.c
+++ b/firmware/backlight.c
@@ -30,7 +30,8 @@
30#define BACKLIGHT_OFF 2 30#define BACKLIGHT_OFF 2
31 31
32static void backlight_thread(void); 32static void backlight_thread(void);
33static char backlight_stack[0x400]; 33static char backlight_stack[DEFAULT_STACK_SIZE];
34static char backlight_thread_name[] = "backlight";
34static struct event_queue backlight_queue; 35static struct event_queue backlight_queue;
35 36
36static int backlight_timer; 37static int backlight_timer;
@@ -111,6 +112,7 @@ void backlight_init(void)
111 rtc_write(0x0a, 0x40); /* Enable square wave */ 112 rtc_write(0x0a, 0x40); /* Enable square wave */
112#endif 113#endif
113 queue_init(&backlight_queue); 114 queue_init(&backlight_queue);
114 create_thread(backlight_thread, backlight_stack, sizeof(backlight_stack)); 115 create_thread(backlight_thread, backlight_stack,
116 sizeof(backlight_stack), backlight_thread_name);
115 backlight_on(); 117 backlight_on();
116} 118}
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c
index d8a097214a..e85d79f038 100644
--- a/firmware/drivers/lcd.c
+++ b/firmware/drivers/lcd.c
@@ -112,7 +112,8 @@ struct scrollinfo {
112}; 112};
113 113
114static void scroll_thread(void); 114static void scroll_thread(void);
115static char scroll_stack[0x800]; 115static char scroll_stack[DEFAULT_STACK_SIZE];
116static char scroll_name[] = "scroll";
116static char scroll_speed = 8; /* updates per second */ 117static char scroll_speed = 8; /* updates per second */
117static char scroll_spacing = 3; /* spaces between end and start of text */ 118static char scroll_spacing = 3; /* spaces between end and start of text */
118 119
@@ -381,7 +382,8 @@ void lcd_double_height(bool on)
381#if defined(HAVE_LCD_CHARCELLS) || defined(SIMULATOR) /* not BITMAP */ 382#if defined(HAVE_LCD_CHARCELLS) || defined(SIMULATOR) /* not BITMAP */
382void lcd_init (void) 383void lcd_init (void)
383{ 384{
384 create_thread(scroll_thread, scroll_stack, sizeof(scroll_stack)); 385 create_thread(scroll_thread, scroll_stack,
386 sizeof(scroll_stack), scroll_name);
385} 387}
386#endif 388#endif
387 389
@@ -439,7 +441,8 @@ void lcd_init (void)
439 441
440 lcd_clear_display(); 442 lcd_clear_display();
441 lcd_update(); 443 lcd_update();
442 create_thread(scroll_thread, scroll_stack, sizeof(scroll_stack)); 444 create_thread(scroll_thread, scroll_stack,
445 sizeof(scroll_stack), scroll_name);
443} 446}
444 447
445/* 448/*
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index 4d6113176b..85e7ccc4fe 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -33,7 +33,6 @@
33#include "file.h" 33#include "file.h"
34#endif 34#endif
35 35
36#define MPEG_STACK_SIZE 0x2000
37#define MPEG_CHUNKSIZE 0x20000 36#define MPEG_CHUNKSIZE 0x20000
38#define MPEG_LOW_WATER 0x30000 37#define MPEG_LOW_WATER 0x30000
39 38
@@ -260,7 +259,8 @@ static unsigned char fliptable[] =
260static unsigned short big_fliptable[65536]; 259static unsigned short big_fliptable[65536];
261 260
262static struct event_queue mpeg_queue; 261static struct event_queue mpeg_queue;
263static int mpeg_stack[MPEG_STACK_SIZE/sizeof(int)]; 262static char mpeg_stack[DEFAULT_STACK_SIZE + 0x1000];
263static char mpeg_thread_name[] = "mpeg";
264 264
265/* defined in linker script */ 265/* defined in linker script */
266extern unsigned char mp3buf[]; 266extern unsigned char mp3buf[];
@@ -984,7 +984,8 @@ void mpeg_init(int volume, int bass, int treble)
984 create_fliptable(); 984 create_fliptable();
985 985
986 queue_init(&mpeg_queue); 986 queue_init(&mpeg_queue);
987 create_thread(mpeg_thread, mpeg_stack, sizeof(mpeg_stack)); 987 create_thread(mpeg_thread, mpeg_stack,
988 sizeof(mpeg_stack), mpeg_thread_name);
988 mas_poll_start(2); 989 mas_poll_start(2);
989 990
990#ifndef ARCHOS_RECORDER 991#ifndef ARCHOS_RECORDER
diff --git a/firmware/usb.c b/firmware/usb.c
index 3732d83df6..d7112b971f 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -59,7 +59,8 @@ static int countdown;
59 59
60static int usb_state; 60static int usb_state;
61 61
62static char usb_stack[0x800]; 62static char usb_stack[DEFAULT_STACK_SIZE];
63static char usb_thread_name[] = "usb";
63static struct event_queue usb_queue; 64static struct event_queue usb_queue;
64static bool last_usb_status; 65static bool last_usb_status;
65static bool usb_monitor_enabled; 66static bool usb_monitor_enabled;
@@ -269,7 +270,7 @@ void usb_init(void)
269 last_usb_status = false; 270 last_usb_status = false;
270 271
271 queue_init(&usb_queue); 272 queue_init(&usb_queue);
272 create_thread(usb_thread, usb_stack, sizeof(usb_stack)); 273 create_thread(usb_thread, usb_stack, sizeof(usb_stack), usb_thread_name);
273 274
274 tick_add_task(usb_tick); 275 tick_add_task(usb_tick);
275} 276}