summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-08-17 01:45:48 +0000
committerJens Arnold <amiconn@rockbox.org>2004-08-17 01:45:48 +0000
commit0ceaa5e365b3f6dc78269ed5c4cd43df5c0144eb (patch)
tree7fe6cbadea41f09765b631794b71d65fdbbbffbc
parentc76c568b351d37c485f78cd185b2d52d54fe7a34 (diff)
downloadrockbox-0ceaa5e365b3f6dc78269ed5c4cd43df5c0144eb.tar.gz
rockbox-0ceaa5e365b3f6dc78269ed5c4cd43df5c0144eb.zip
Const policed pointer arguments to functions, part 2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4996 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugin.h9
-rw-r--r--firmware/common/timefuncs.c4
-rw-r--r--firmware/drivers/ata.c8
-rw-r--r--firmware/drivers/fat.c29
-rw-r--r--firmware/drivers/i2c.c2
-rw-r--r--firmware/drivers/lcd-player.c4
-rw-r--r--firmware/drivers/lcd-recorder.c3
-rw-r--r--firmware/drivers/mas.c4
-rw-r--r--firmware/export/ata.h4
-rw-r--r--firmware/export/fat.h12
-rw-r--r--firmware/export/lcd.h9
-rw-r--r--firmware/export/mas.h2
-rw-r--r--firmware/include/timefuncs.h4
-rw-r--r--uisimulator/common/lcd-common.c2
-rw-r--r--uisimulator/common/lcd-playersim.c2
-rw-r--r--uisimulator/win32/timefuncs.h4
-rw-r--r--uisimulator/x11/timefuncs.h4
17 files changed, 55 insertions, 51 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index d44aa7d60b..53648ad4c7 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -116,7 +116,7 @@ struct plugin_api {
116 void (*lcd_stop_scroll)(void); 116 void (*lcd_stop_scroll)(void);
117 void (*lcd_set_contrast)(int x); 117 void (*lcd_set_contrast)(int x);
118#ifdef HAVE_LCD_CHARCELLS 118#ifdef HAVE_LCD_CHARCELLS
119 void (*lcd_define_pattern)(int which,char *pattern); 119 void (*lcd_define_pattern)(int which,const char *pattern);
120 unsigned char (*lcd_get_locked_pattern)(void); 120 unsigned char (*lcd_get_locked_pattern)(void);
121 void (*lcd_unlock_pattern)(unsigned char pat); 121 void (*lcd_unlock_pattern)(unsigned char pat);
122 void (*lcd_putc)(int x, int y, unsigned short ch); 122 void (*lcd_putc)(int x, int y, unsigned short ch);
@@ -145,7 +145,8 @@ struct plugin_api {
145 int min_shown, int max_shown, int orientation); 145 int min_shown, int max_shown, int orientation);
146 void (*checkbox)(int x, int y, int width, int height, bool checked); 146 void (*checkbox)(int x, int y, int width, int height, bool checked);
147 unsigned char* lcd_framebuffer; 147 unsigned char* lcd_framebuffer;
148 void (*lcd_blit) (unsigned char* p_data, int x, int y, int width, int height, int stride); 148 void (*lcd_blit) (const unsigned char* p_data, int x, int y, int width,
149 int height, int stride);
149#ifndef SIMULATOR 150#ifndef SIMULATOR
150 void (*lcd_roll)(int pixels); 151 void (*lcd_roll)(int pixels);
151#endif 152#endif
@@ -235,7 +236,7 @@ struct plugin_api {
235 /* MAS communication */ 236 /* MAS communication */
236#ifndef SIMULATOR 237#ifndef SIMULATOR
237 int (*mas_readmem)(int bank, int addr, unsigned long* dest, int len); 238 int (*mas_readmem)(int bank, int addr, unsigned long* dest, int len);
238 int (*mas_writemem)(int bank, int addr, unsigned long* src, int len); 239 int (*mas_writemem)(int bank, int addr, const unsigned long* src, int len);
239 int (*mas_readreg)(int reg); 240 int (*mas_readreg)(int reg);
240 int (*mas_writereg)(int reg, unsigned int val); 241 int (*mas_writereg)(int reg, unsigned int val);
241#ifdef HAVE_MAS3587F 242#ifdef HAVE_MAS3587F
@@ -251,7 +252,7 @@ struct plugin_api {
251 int(*compar)(const void *, const void *)); 252 int(*compar)(const void *, const void *));
252 int (*kbd_input)(char* buffer, int buflen); 253 int (*kbd_input)(char* buffer, int buflen);
253 struct tm* (*get_time)(void); 254 struct tm* (*get_time)(void);
254 int (*set_time)(struct tm *tm); 255 int (*set_time)(const struct tm *tm);
255 void* (*plugin_get_buffer)(int* buffer_size); 256 void* (*plugin_get_buffer)(int* buffer_size);
256 void* (*plugin_get_mp3_buffer)(int* buffer_size); 257 void* (*plugin_get_mp3_buffer)(int* buffer_size);
257#ifndef SIMULATOR 258#ifndef SIMULATOR
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c
index 9d56126b17..1e95733399 100644
--- a/firmware/common/timefuncs.c
+++ b/firmware/common/timefuncs.c
@@ -27,7 +27,7 @@
27static struct tm tm; 27static struct tm tm;
28#endif 28#endif
29 29
30bool valid_time(struct tm *tm) 30bool valid_time(const struct tm *tm)
31{ 31{
32 if (tm->tm_hour < 0 || tm->tm_hour > 23 || 32 if (tm->tm_hour < 0 || tm->tm_hour > 23 ||
33 tm->tm_sec < 0 || tm->tm_sec > 59 || 33 tm->tm_sec < 0 || tm->tm_sec > 59 ||
@@ -81,7 +81,7 @@ struct tm *get_time(void)
81#endif 81#endif
82} 82}
83 83
84int set_time(struct tm *tm) 84int set_time(const struct tm *tm)
85{ 85{
86#ifdef HAVE_RTC 86#ifdef HAVE_RTC
87 int rc; 87 int rc;
diff --git a/firmware/drivers/ata.c b/firmware/drivers/ata.c
index 663df600ca..05000b02a8 100644
--- a/firmware/drivers/ata.c
+++ b/firmware/drivers/ata.c
@@ -447,11 +447,11 @@ int ata_read_sectors(unsigned long start,
447} 447}
448 448
449/* the tight loop of ata_write_sectors(), to avoid the whole in IRAM */ 449/* the tight loop of ata_write_sectors(), to avoid the whole in IRAM */
450static void copy_write_sectors(unsigned char* buf, 450static void copy_write_sectors(const unsigned char* buf,
451 int wordcount) 451 int wordcount)
452 __attribute__ ((section (".icode"))); 452 __attribute__ ((section (".icode")));
453 453
454static void copy_write_sectors(unsigned char* buf, int wordcount) 454static void copy_write_sectors(const unsigned char* buf, int wordcount)
455{ 455{
456#ifdef PREFER_C_WRITING 456#ifdef PREFER_C_WRITING
457 457
@@ -566,7 +566,7 @@ static void copy_write_sectors(unsigned char* buf, int wordcount)
566 566
567int ata_write_sectors(unsigned long start, 567int ata_write_sectors(unsigned long start,
568 int count, 568 int count,
569 void* buf) 569 const void* buf)
570{ 570{
571 int i; 571 int i;
572 int ret = 0; 572 int ret = 0;
@@ -657,7 +657,7 @@ int ata_write_sectors(unsigned long start,
657 return ret; 657 return ret;
658} 658}
659 659
660extern void ata_delayed_write(unsigned long sector, void* buf) 660extern void ata_delayed_write(unsigned long sector, const void* buf)
661{ 661{
662 memcpy(delayed_sector, buf, SECTOR_SIZE); 662 memcpy(delayed_sector, buf, SECTOR_SIZE);
663 delayed_sector_num = sector; 663 delayed_sector_num = sector;
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index 85a9deaa8c..1b530153a5 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -236,7 +236,7 @@ static int update_fsinfo(void);
236static int first_sector_of_cluster(int cluster); 236static int first_sector_of_cluster(int cluster);
237static int bpb_is_sane(void); 237static int bpb_is_sane(void);
238static void *cache_fat_sector(int secnum); 238static void *cache_fat_sector(int secnum);
239static int create_dos_name(unsigned char *name, unsigned char *newname); 239static int create_dos_name(const unsigned char *name, unsigned char *newname);
240static unsigned int find_free_cluster(unsigned int start); 240static unsigned int find_free_cluster(unsigned int start);
241static int transfer( unsigned int start, int count, char* buf, bool write ); 241static int transfer( unsigned int start, int count, char* buf, bool write );
242 242
@@ -811,8 +811,8 @@ static void fat_time(unsigned short* date,
811static int write_long_name(struct fat_file* file, 811static int write_long_name(struct fat_file* file,
812 unsigned int firstentry, 812 unsigned int firstentry,
813 unsigned int numentries, 813 unsigned int numentries,
814 unsigned char* name, 814 const unsigned char* name,
815 unsigned char* shortname, 815 const unsigned char* shortname,
816 bool is_directory) 816 bool is_directory)
817{ 817{
818 unsigned char buf[SECTOR_SIZE]; 818 unsigned char buf[SECTOR_SIZE];
@@ -949,7 +949,7 @@ static int write_long_name(struct fat_file* file,
949 949
950static int add_dir_entry(struct fat_dir* dir, 950static int add_dir_entry(struct fat_dir* dir,
951 struct fat_file* file, 951 struct fat_file* file,
952 char* name, 952 const char* name,
953 bool is_directory, 953 bool is_directory,
954 bool dotdir) 954 bool dotdir)
955{ 955{
@@ -1178,7 +1178,7 @@ unsigned char char2dos(unsigned char c)
1178 return c; 1178 return c;
1179} 1179}
1180 1180
1181static int create_dos_name(unsigned char *name, unsigned char *newname) 1181static int create_dos_name(const unsigned char *name, unsigned char *newname)
1182{ 1182{
1183 int i,j; 1183 int i,j;
1184 1184
@@ -1265,7 +1265,7 @@ static int update_short_entry( struct fat_file* file, int size, int attr )
1265 return 0; 1265 return 0;
1266} 1266}
1267 1267
1268static int parse_direntry(struct fat_direntry *de, unsigned char *buf) 1268static int parse_direntry(struct fat_direntry *de, const unsigned char *buf)
1269{ 1269{
1270 int i=0,j=0; 1270 int i=0,j=0;
1271 memset(de, 0, sizeof(struct fat_direntry)); 1271 memset(de, 0, sizeof(struct fat_direntry));
@@ -1292,7 +1292,7 @@ static int parse_direntry(struct fat_direntry *de, unsigned char *buf)
1292 1292
1293int fat_open(unsigned int startcluster, 1293int fat_open(unsigned int startcluster,
1294 struct fat_file *file, 1294 struct fat_file *file,
1295 struct fat_dir* dir) 1295 const struct fat_dir* dir)
1296{ 1296{
1297 file->firstcluster = startcluster; 1297 file->firstcluster = startcluster;
1298 file->lastcluster = startcluster; 1298 file->lastcluster = startcluster;
@@ -1311,7 +1311,7 @@ int fat_open(unsigned int startcluster,
1311 return 0; 1311 return 0;
1312} 1312}
1313 1313
1314int fat_create_file(char* name, 1314int fat_create_file(const char* name,
1315 struct fat_file* file, 1315 struct fat_file* file,
1316 struct fat_dir* dir) 1316 struct fat_dir* dir)
1317{ 1317{
@@ -1331,7 +1331,7 @@ int fat_create_file(char* name,
1331 return rc; 1331 return rc;
1332} 1332}
1333 1333
1334int fat_create_dir(char* name, 1334int fat_create_dir(const char* name,
1335 struct fat_dir* newdir, 1335 struct fat_dir* newdir,
1336 struct fat_dir* dir) 1336 struct fat_dir* dir)
1337{ 1337{
@@ -1396,7 +1396,7 @@ int fat_create_dir(char* name,
1396 return rc; 1396 return rc;
1397} 1397}
1398 1398
1399int fat_truncate(struct fat_file *file) 1399int fat_truncate(const struct fat_file *file)
1400{ 1400{
1401 /* truncate trailing clusters */ 1401 /* truncate trailing clusters */
1402 int next; 1402 int next;
@@ -1551,7 +1551,7 @@ int fat_remove(struct fat_file* file)
1551} 1551}
1552 1552
1553int fat_rename(struct fat_file* file, 1553int fat_rename(struct fat_file* file,
1554 unsigned char* newname, 1554 const unsigned char* newname,
1555 int size, 1555 int size,
1556 int attr) 1556 int attr)
1557{ 1557{
@@ -1656,7 +1656,7 @@ static int transfer( unsigned int start, int count, char* buf, bool write )
1656} 1656}
1657 1657
1658 1658
1659int fat_readwrite( struct fat_file *file, int sectorcount, 1659int fat_readwrite( struct fat_file *file, int sectorcount,
1660 void* buf, bool write ) 1660 void* buf, bool write )
1661{ 1661{
1662 int cluster = file->lastcluster; 1662 int cluster = file->lastcluster;
@@ -1801,7 +1801,7 @@ int fat_seek(struct fat_file *file, unsigned int seeksector )
1801} 1801}
1802 1802
1803int fat_opendir(struct fat_dir *dir, unsigned int startcluster, 1803int fat_opendir(struct fat_dir *dir, unsigned int startcluster,
1804 struct fat_dir *parent_dir) 1804 const struct fat_dir *parent_dir)
1805{ 1805{
1806 int rc; 1806 int rc;
1807 1807
@@ -1823,7 +1823,8 @@ int fat_opendir(struct fat_dir *dir, unsigned int startcluster,
1823} 1823}
1824 1824
1825/* convert from unicode to a single-byte charset */ 1825/* convert from unicode to a single-byte charset */
1826static void unicode2iso(unsigned char* unicode, unsigned char* iso, int count ) 1826static void unicode2iso(const unsigned char* unicode, unsigned char* iso,
1827 int count)
1827{ 1828{
1828 int i; 1829 int i;
1829 1830
diff --git a/firmware/drivers/i2c.c b/firmware/drivers/i2c.c
index 24ad77495d..2fc53d579f 100644
--- a/firmware/drivers/i2c.c
+++ b/firmware/drivers/i2c.c
@@ -198,7 +198,7 @@ unsigned char i2c_inb(int ack)
198 return byte; 198 return byte;
199} 199}
200 200
201int i2c_write(int address, unsigned char* buf, int count ) 201int i2c_write(int address, const unsigned char* buf, int count )
202{ 202{
203 int i,x=0; 203 int i,x=0;
204 204
diff --git a/firmware/drivers/lcd-player.c b/firmware/drivers/lcd-player.c
index d4a523afe3..fb870f232a 100644
--- a/firmware/drivers/lcd-player.c
+++ b/firmware/drivers/lcd-player.c
@@ -398,7 +398,7 @@ void lcd_unlock_pattern(unsigned char pat)
398 lcd_free_pat(pat); 398 lcd_free_pat(pat);
399} 399}
400 400
401void lcd_define_pattern(int pat, char *pattern) 401void lcd_define_pattern(int pat, const char *pattern)
402{ 402{
403 int i; 403 int i;
404 for (i=0; i<7; i++) { 404 for (i=0; i<7; i++) {
@@ -410,7 +410,7 @@ void lcd_define_pattern(int pat, char *pattern)
410} 410}
411 411
412#ifndef SIMULATOR 412#ifndef SIMULATOR
413void lcd_define_hw_pattern (int which,char *pattern,int length) 413void lcd_define_hw_pattern (int which,const char *pattern,int length)
414{ 414{
415 lcd_write_command(lcd_pram | which); 415 lcd_write_command(lcd_pram | which);
416 lcd_write_data(pattern, length); 416 lcd_write_data(pattern, length);
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c
index a8dca92b4f..c9781e77ef 100644
--- a/firmware/drivers/lcd-recorder.c
+++ b/firmware/drivers/lcd-recorder.c
@@ -165,7 +165,8 @@ void lcd_init (void)
165 165
166/* Performance function that works with an external buffer 166/* Performance function that works with an external buffer
167 note that y and height are in 8-pixel units! */ 167 note that y and height are in 8-pixel units! */
168void lcd_blit (unsigned char* p_data, int x, int y, int width, int height, int stride) 168void lcd_blit (const unsigned char* p_data, int x, int y, int width,
169 int height, int stride)
169{ 170{
170 /* Copy display bitmap to hardware */ 171 /* Copy display bitmap to hardware */
171 while (height--) 172 while (height--)
diff --git a/firmware/drivers/mas.c b/firmware/drivers/mas.c
index c39a46c9f2..a6fd1d1a21 100644
--- a/firmware/drivers/mas.c
+++ b/firmware/drivers/mas.c
@@ -112,12 +112,12 @@ int mas_readmem(int bank, int addr, unsigned long* dest, int len)
112} 112}
113 113
114/* note: 'len' is number of 32-bit words, not number of bytes! */ 114/* note: 'len' is number of 32-bit words, not number of bytes! */
115int mas_writemem(int bank, int addr, unsigned long* src, int len) 115int mas_writemem(int bank, int addr, const unsigned long* src, int len)
116{ 116{
117 int ret = 0; 117 int ret = 0;
118 int i, j; 118 int i, j;
119 unsigned char buf[60]; 119 unsigned char buf[60];
120 unsigned char* ptr = (unsigned char*)src; 120 const unsigned char* ptr = (const unsigned char*)src;
121 121
122 i2c_begin(); 122 i2c_begin();
123 123
diff --git a/firmware/export/ata.h b/firmware/export/ata.h
index 213d3e5b8b..06de33a8f2 100644
--- a/firmware/export/ata.h
+++ b/firmware/export/ata.h
@@ -42,8 +42,8 @@ extern int ata_hard_reset(void);
42extern int ata_soft_reset(void); 42extern int ata_soft_reset(void);
43extern int ata_init(void); 43extern int ata_init(void);
44extern int ata_read_sectors(unsigned long start, int count, void* buf); 44extern int ata_read_sectors(unsigned long start, int count, void* buf);
45extern int ata_write_sectors(unsigned long start, int count, void* buf); 45extern int ata_write_sectors(unsigned long start, int count, const void* buf);
46extern void ata_delayed_write(unsigned long sector, void* buf); 46extern void ata_delayed_write(unsigned long sector, const void* buf);
47extern void ata_flush(void); 47extern void ata_flush(void);
48extern void ata_spin(void); 48extern void ata_spin(void);
49extern unsigned short* ata_get_identify(void); 49extern unsigned short* ata_get_identify(void);
diff --git a/firmware/export/fat.h b/firmware/export/fat.h
index 24c894ff35..f4f09a2d19 100644
--- a/firmware/export/fat.h
+++ b/firmware/export/fat.h
@@ -72,14 +72,14 @@ struct fat_dir
72extern int fat_mount(int startsector); 72extern int fat_mount(int startsector);
73extern void fat_size(unsigned int* size, unsigned int* free); 73extern void fat_size(unsigned int* size, unsigned int* free);
74extern void fat_recalc_free(void); 74extern void fat_recalc_free(void);
75extern int fat_create_dir(char* name, 75extern int fat_create_dir(const char* name,
76 struct fat_dir* newdir, 76 struct fat_dir* newdir,
77 struct fat_dir* dir); 77 struct fat_dir* dir);
78extern int fat_startsector(void); 78extern int fat_startsector(void);
79extern int fat_open(unsigned int cluster, 79extern int fat_open(unsigned int cluster,
80 struct fat_file* ent, 80 struct fat_file* ent,
81 struct fat_dir* dir); 81 const struct fat_dir* dir);
82extern int fat_create_file(char* name, 82extern int fat_create_file(const char* name,
83 struct fat_file* ent, 83 struct fat_file* ent,
84 struct fat_dir* dir); 84 struct fat_dir* dir);
85extern int fat_readwrite(struct fat_file *ent, int sectorcount, 85extern int fat_readwrite(struct fat_file *ent, int sectorcount,
@@ -87,13 +87,13 @@ extern int fat_readwrite(struct fat_file *ent, int sectorcount,
87extern int fat_closewrite(struct fat_file *ent, int size, int attr); 87extern int fat_closewrite(struct fat_file *ent, int size, int attr);
88extern int fat_seek(struct fat_file *ent, unsigned int sector ); 88extern int fat_seek(struct fat_file *ent, unsigned int sector );
89extern int fat_remove(struct fat_file *ent); 89extern int fat_remove(struct fat_file *ent);
90extern int fat_truncate(struct fat_file *ent); 90extern int fat_truncate(const struct fat_file *ent);
91extern int fat_rename(struct fat_file* file, 91extern int fat_rename(struct fat_file* file,
92 unsigned char* newname, 92 const unsigned char* newname,
93 int size, int attr); 93 int size, int attr);
94 94
95extern int fat_opendir(struct fat_dir *ent, unsigned int currdir, 95extern int fat_opendir(struct fat_dir *ent, unsigned int currdir,
96 struct fat_dir *parent_dir); 96 const struct fat_dir *parent_dir);
97extern int fat_getnext(struct fat_dir *ent, struct fat_direntry *entry); 97extern int fat_getnext(struct fat_dir *ent, struct fat_direntry *entry);
98extern int fat_get_cluster_size(void); 98extern int fat_get_cluster_size(void);
99 99
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index 2a8a7ff0b1..7dda83d8da 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -44,13 +44,14 @@ extern void lcd_scroll_speed( int speed );
44extern void lcd_scroll_delay( int ms ); 44extern void lcd_scroll_delay( int ms );
45extern void lcd_set_contrast(int val); 45extern void lcd_set_contrast(int val);
46extern void lcd_write_command( int byte ); 46extern void lcd_write_command( int byte );
47extern void lcd_write_data( unsigned char* p_bytes, int count ); 47extern void lcd_write_data( const unsigned char* p_bytes, int count );
48extern int lcd_default_contrast(void); 48extern int lcd_default_contrast(void);
49 49
50#if defined(SIMULATOR) || defined(HAVE_LCD_BITMAP) 50#if defined(SIMULATOR) || defined(HAVE_LCD_BITMAP)
51extern void lcd_update(void); 51extern void lcd_update(void);
52/* performance function */ 52/* performance function */
53extern void lcd_blit (unsigned char* p_data, int x, int y, int width, int height, int stride); 53extern void lcd_blit (const unsigned char* p_data, int x, int y, int width,
54 int height, int stride);
54 55
55/* update a fraction of the screen */ 56/* update a fraction of the screen */
56extern void lcd_update_rect(int x, int y, int width, int height); 57extern void lcd_update_rect(int x, int y, int width, int height);
@@ -88,8 +89,8 @@ enum
88 ICON_PARAM 89 ICON_PARAM
89}; 90};
90 91
91extern void lcd_define_hw_pattern (int which,char *pattern,int length); 92extern void lcd_define_hw_pattern (int which,const char *pattern,int length);
92extern void lcd_define_pattern (int which,char *pattern); 93extern void lcd_define_pattern (int which,const char *pattern);
93extern void lcd_double_height (bool on); 94extern void lcd_double_height (bool on);
94#define JUMP_SCROLL_ALWAYS 5 95#define JUMP_SCROLL_ALWAYS 5
95extern void lcd_jump_scroll (int mode); /* 0=off, 1=once, ..., ALWAYS */ 96extern void lcd_jump_scroll (int mode); /* 0=off, 1=once, ..., ALWAYS */
diff --git a/firmware/export/mas.h b/firmware/export/mas.h
index 573b9b6b37..8a60389ade 100644
--- a/firmware/export/mas.h
+++ b/firmware/export/mas.h
@@ -101,7 +101,7 @@
101int mas_default_read(unsigned short *buf); 101int mas_default_read(unsigned short *buf);
102int mas_run(unsigned short address); 102int mas_run(unsigned short address);
103int mas_readmem(int bank, int addr, unsigned long* dest, int len); 103int mas_readmem(int bank, int addr, unsigned long* dest, int len);
104int mas_writemem(int bank, int addr, unsigned long* src, int len); 104int mas_writemem(int bank, int addr, const unsigned long* src, int len);
105int mas_readreg(int reg); 105int mas_readreg(int reg);
106int mas_writereg(int reg, unsigned int val); 106int mas_writereg(int reg, unsigned int val);
107void mas_reset(void); 107void mas_reset(void);
diff --git a/firmware/include/timefuncs.h b/firmware/include/timefuncs.h
index 5c6719e709..03bb06fb9c 100644
--- a/firmware/include/timefuncs.h
+++ b/firmware/include/timefuncs.h
@@ -25,7 +25,7 @@
25#include "time.h" 25#include "time.h"
26 26
27struct tm *get_time(void); 27struct tm *get_time(void);
28int set_time(struct tm *tm); 28int set_time(const struct tm *tm);
29bool valid_time(struct tm *tm); 29bool valid_time(const struct tm *tm);
30 30
31#endif /* _TIMEFUNCS_H_ */ 31#endif /* _TIMEFUNCS_H_ */
diff --git a/uisimulator/common/lcd-common.c b/uisimulator/common/lcd-common.c
index f00e9a28b2..c69ef06f1f 100644
--- a/uisimulator/common/lcd-common.c
+++ b/uisimulator/common/lcd-common.c
@@ -30,7 +30,7 @@
30 #include "lcd-x11.h" 30 #include "lcd-x11.h"
31#endif 31#endif
32 32
33void lcd_blit(unsigned char* p_data, int x, int y, int width, int height, 33void lcd_blit(const unsigned char* p_data, int x, int y, int width, int height,
34 int stride) 34 int stride)
35{ 35{
36 (void)p_data; 36 (void)p_data;
diff --git a/uisimulator/common/lcd-playersim.c b/uisimulator/common/lcd-playersim.c
index ed633b849f..3f3453b9a1 100644
--- a/uisimulator/common/lcd-playersim.c
+++ b/uisimulator/common/lcd-playersim.c
@@ -222,7 +222,7 @@ void lcd_double_height(bool on)
222 lcd_update(); 222 lcd_update();
223} 223}
224 224
225void lcd_define_hw_pattern(int which, char *pattern, int length) 225void lcd_define_hw_pattern(int which, const char *pattern, int length)
226{ 226{
227 int i, j; 227 int i, j;
228 int pat = which / 8; 228 int pat = which / 8;
diff --git a/uisimulator/win32/timefuncs.h b/uisimulator/win32/timefuncs.h
index 57bb3de5ce..8fbc5b1c85 100644
--- a/uisimulator/win32/timefuncs.h
+++ b/uisimulator/win32/timefuncs.h
@@ -4,5 +4,5 @@
4 4
5/* struct tm defined */ 5/* struct tm defined */
6struct tm *get_time(void); 6struct tm *get_time(void);
7int set_time(struct tm *tm); 7int set_time(const struct tm *tm);
8bool valid_time(struct tm *tm); 8bool valid_time(const struct tm *tm);
diff --git a/uisimulator/x11/timefuncs.h b/uisimulator/x11/timefuncs.h
index 59e8b249eb..de17fcdc73 100644
--- a/uisimulator/x11/timefuncs.h
+++ b/uisimulator/x11/timefuncs.h
@@ -3,5 +3,5 @@
3 3
4/* struct tm defined */ 4/* struct tm defined */
5struct tm *get_time(void); 5struct tm *get_time(void);
6int set_time(struct tm *tm); 6int set_time(const struct tm *tm);
7bool valid_time(struct tm *tm); 7bool valid_time(const struct tm *tm);