diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/backlight.c | 2 | ||||
-rw-r--r-- | firmware/drivers/adc.c | 2 | ||||
-rw-r--r-- | firmware/drivers/ata.c | 2 | ||||
-rw-r--r-- | firmware/drivers/lcd-player.c | 6 | ||||
-rw-r--r-- | firmware/drivers/lcd-recorder.c | 8 | ||||
-rw-r--r-- | firmware/export/thread.h | 3 | ||||
-rw-r--r-- | firmware/font.c | 2 | ||||
-rw-r--r-- | firmware/thread.c | 5 |
8 files changed, 16 insertions, 14 deletions
diff --git a/firmware/backlight.c b/firmware/backlight.c index f43c8a06fc..0b3ac5856d 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c | |||
@@ -33,7 +33,7 @@ | |||
33 | 33 | ||
34 | static void backlight_thread(void); | 34 | static void backlight_thread(void); |
35 | static char backlight_stack[DEFAULT_STACK_SIZE]; | 35 | static char backlight_stack[DEFAULT_STACK_SIZE]; |
36 | static char backlight_thread_name[] = "backlight"; | 36 | static const char backlight_thread_name[] = "backlight"; |
37 | static struct event_queue backlight_queue; | 37 | static struct event_queue backlight_queue; |
38 | 38 | ||
39 | static bool charger_was_inserted = 0; | 39 | static bool charger_was_inserted = 0; |
diff --git a/firmware/drivers/adc.c b/firmware/drivers/adc.c index 7be9baf5d5..c81d571b04 100644 --- a/firmware/drivers/adc.c +++ b/firmware/drivers/adc.c | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | static int current_channel; | 25 | static int current_channel; |
26 | static unsigned short adcdata[NUM_ADC_CHANNELS]; | 26 | static unsigned short adcdata[NUM_ADC_CHANNELS]; |
27 | static unsigned int adcreg[NUM_ADC_CHANNELS] = | 27 | static const unsigned int adcreg[NUM_ADC_CHANNELS] = |
28 | { | 28 | { |
29 | ADDRAH_ADDR, ADDRBH_ADDR, ADDRCH_ADDR, ADDRDH_ADDR, | 29 | ADDRAH_ADDR, ADDRBH_ADDR, ADDRCH_ADDR, ADDRDH_ADDR, |
30 | ADDRAH_ADDR, ADDRBH_ADDR, ADDRCH_ADDR, ADDRDH_ADDR | 30 | ADDRAH_ADDR, ADDRBH_ADDR, ADDRCH_ADDR, ADDRDH_ADDR |
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c index 1394ceaf29..663df600ca 100644 --- a/firmware/drivers/ata.c +++ b/firmware/drivers/ata.c | |||
@@ -98,7 +98,7 @@ static bool poweroff = false; | |||
98 | static int poweroff_timeout = 2*HZ; | 98 | static int poweroff_timeout = 2*HZ; |
99 | #endif | 99 | #endif |
100 | static char ata_stack[DEFAULT_STACK_SIZE]; | 100 | static char ata_stack[DEFAULT_STACK_SIZE]; |
101 | static char ata_thread_name[] = "ata"; | 101 | static const char ata_thread_name[] = "ata"; |
102 | static struct event_queue ata_queue; | 102 | static struct event_queue ata_queue; |
103 | static bool initialized = false; | 103 | static bool initialized = false; |
104 | static bool delayed_write = false; | 104 | static bool delayed_write = false; |
diff --git a/firmware/drivers/lcd-player.c b/firmware/drivers/lcd-player.c index 3ae2f5dbb9..88aa53a6d3 100644 --- a/firmware/drivers/lcd-player.c +++ b/firmware/drivers/lcd-player.c | |||
@@ -87,7 +87,7 @@ struct cursorinfo { | |||
87 | 87 | ||
88 | static void scroll_thread(void); | 88 | static void scroll_thread(void); |
89 | static char scroll_stack[DEFAULT_STACK_SIZE]; | 89 | static char scroll_stack[DEFAULT_STACK_SIZE]; |
90 | static char scroll_name[] = "scroll"; | 90 | static const char scroll_name[] = "scroll"; |
91 | static char scroll_speed = 8; /* updates per second */ | 91 | static char scroll_speed = 8; /* updates per second */ |
92 | static int scroll_delay = HZ/2; /* delay before starting scroll */ | 92 | static int scroll_delay = HZ/2; /* delay before starting scroll */ |
93 | static int jump_scroll_delay = HZ/4; /* delay between jump scroll jumps */ | 93 | static int jump_scroll_delay = HZ/4; /* delay between jump scroll jumps */ |
@@ -422,7 +422,7 @@ void lcd_double_height(bool on) | |||
422 | lcd_write_command(on?9:8); | 422 | lcd_write_command(on?9:8); |
423 | } | 423 | } |
424 | 424 | ||
425 | static char icon_pos[] = | 425 | static const char icon_pos[] = |
426 | { | 426 | { |
427 | 0, 0, 0, 0, /* Battery */ | 427 | 0, 0, 0, 0, /* Battery */ |
428 | 2, /* USB */ | 428 | 2, /* USB */ |
@@ -441,7 +441,7 @@ static char icon_pos[] = | |||
441 | 10, /* Param */ | 441 | 10, /* Param */ |
442 | }; | 442 | }; |
443 | 443 | ||
444 | static char icon_mask[] = | 444 | static const char icon_mask[] = |
445 | { | 445 | { |
446 | 0x02, 0x08, 0x04, 0x10, /* Battery */ | 446 | 0x02, 0x08, 0x04, 0x10, /* Battery */ |
447 | 0x04, /* USB */ | 447 | 0x04, /* USB */ |
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index d2949c8758..42cf016f97 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c | |||
@@ -93,7 +93,7 @@ static volatile int scrolling_lines=0; /* Bitpattern of which lines are scrollin | |||
93 | 93 | ||
94 | static void scroll_thread(void); | 94 | static void scroll_thread(void); |
95 | static char scroll_stack[DEFAULT_STACK_SIZE]; | 95 | static char scroll_stack[DEFAULT_STACK_SIZE]; |
96 | static char scroll_name[] = "scroll"; | 96 | static const char scroll_name[] = "scroll"; |
97 | static char scroll_speed = 8; /* updates per second */ | 97 | static char scroll_speed = 8; /* updates per second */ |
98 | static int scroll_delay = HZ/2; /* ticks delay before start */ | 98 | static int scroll_delay = HZ/2; /* ticks delay before start */ |
99 | static char scroll_step = 6; /* pixels per scroll step */ | 99 | static char scroll_step = 6; /* pixels per scroll step */ |
@@ -109,9 +109,9 @@ static int xoffset = 0; /* needed for flip */ | |||
109 | unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; | 109 | unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; |
110 | 110 | ||
111 | /* All zeros and ones bitmaps for area filling */ | 111 | /* All zeros and ones bitmaps for area filling */ |
112 | static unsigned char zeros[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; | 112 | static const unsigned char zeros[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; |
113 | static unsigned char ones[8] = { 0xff, 0xff, 0xff, 0xff, | 113 | static const unsigned char ones[8] = { 0xff, 0xff, 0xff, 0xff, |
114 | 0xff, 0xff, 0xff, 0xff}; | 114 | 0xff, 0xff, 0xff, 0xff}; |
115 | 115 | ||
116 | int lcd_default_contrast(void) | 116 | int lcd_default_contrast(void) |
117 | { | 117 | { |
diff --git a/firmware/export/thread.h b/firmware/export/thread.h index 77209726f7..a7b5709deb 100644 --- a/firmware/export/thread.h +++ b/firmware/export/thread.h | |||
@@ -24,7 +24,8 @@ | |||
24 | #define MAXTHREADS 10 | 24 | #define MAXTHREADS 10 |
25 | #define DEFAULT_STACK_SIZE 0x400 /* Bytes */ | 25 | #define DEFAULT_STACK_SIZE 0x400 /* Bytes */ |
26 | 26 | ||
27 | int create_thread(void* function, void* stack, int stack_size, char *name); | 27 | int create_thread(void* function, void* stack, int stack_size, |
28 | const char *name); | ||
28 | void remove_thread(int threadnum); | 29 | void remove_thread(int threadnum); |
29 | void switch_thread(void); | 30 | void switch_thread(void); |
30 | void sleep_thread(void); | 31 | void sleep_thread(void); |
diff --git a/firmware/font.c b/firmware/font.c index f9453d5bac..f33490869a 100644 --- a/firmware/font.c +++ b/firmware/font.c | |||
@@ -45,7 +45,7 @@ extern struct font sysfont; | |||
45 | static struct font font_ui; | 45 | static struct font font_ui; |
46 | 46 | ||
47 | /* system font table, in order of FONT_xxx definition */ | 47 | /* system font table, in order of FONT_xxx definition */ |
48 | static struct font* sysfonts[MAXFONTS] = { &sysfont, &font_ui }; | 48 | static struct font* const sysfonts[MAXFONTS] = { &sysfont, &font_ui }; |
49 | 49 | ||
50 | /* static buffer allocation structures */ | 50 | /* static buffer allocation structures */ |
51 | static unsigned char mbuf[MAX_FONT_SIZE]; | 51 | static unsigned char mbuf[MAX_FONT_SIZE]; |
diff --git a/firmware/thread.c b/firmware/thread.c index 294359b762..36cb49337c 100644 --- a/firmware/thread.c +++ b/firmware/thread.c | |||
@@ -36,7 +36,7 @@ int num_threads; | |||
36 | static volatile int num_sleepers; | 36 | static volatile int num_sleepers; |
37 | static int current_thread; | 37 | static int current_thread; |
38 | static struct regs thread_contexts[MAXTHREADS] __attribute__ ((section(".idata"))); | 38 | static struct regs thread_contexts[MAXTHREADS] __attribute__ ((section(".idata"))); |
39 | char *thread_name[MAXTHREADS]; | 39 | const char *thread_name[MAXTHREADS]; |
40 | void *thread_stack[MAXTHREADS]; | 40 | void *thread_stack[MAXTHREADS]; |
41 | int thread_stack_size[MAXTHREADS]; | 41 | int thread_stack_size[MAXTHREADS]; |
42 | static char main_thread_name[] = "main"; | 42 | static char main_thread_name[] = "main"; |
@@ -142,7 +142,8 @@ void wake_up_thread(void) | |||
142 | * Return ID if context area could be allocated, else -1. | 142 | * Return ID if context area could be allocated, else -1. |
143 | *--------------------------------------------------------------------------- | 143 | *--------------------------------------------------------------------------- |
144 | */ | 144 | */ |
145 | int create_thread(void* function, void* stack, int stack_size, char *name) | 145 | int create_thread(void* function, void* stack, int stack_size, |
146 | const char *name) | ||
146 | { | 147 | { |
147 | unsigned int i; | 148 | unsigned int i; |
148 | unsigned int stacklen; | 149 | unsigned int stacklen; |