summaryrefslogtreecommitdiffstats
path: root/firmware/export
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 /firmware/export
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
Diffstat (limited to 'firmware/export')
-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
4 files changed, 14 insertions, 13 deletions
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);
extern int ata_soft_reset(void);
extern int ata_init(void);
extern int ata_read_sectors(unsigned long start, int count, void* buf);
-extern int ata_write_sectors(unsigned long start, int count, void* buf);
-extern void ata_delayed_write(unsigned long sector, void* buf);
+extern int ata_write_sectors(unsigned long start, int count, const void* buf);
+extern void ata_delayed_write(unsigned long sector, const void* buf);
extern void ata_flush(void);
extern void ata_spin(void);
extern 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
extern int fat_mount(int startsector);
extern void fat_size(unsigned int* size, unsigned int* free);
extern void fat_recalc_free(void);
-extern int fat_create_dir(char* name,
+extern int fat_create_dir(const char* name,
struct fat_dir* newdir,
struct fat_dir* dir);
extern int fat_startsector(void);
extern int fat_open(unsigned int cluster,
struct fat_file* ent,
- struct fat_dir* dir);
-extern int fat_create_file(char* name,
+ const struct fat_dir* dir);
+extern int fat_create_file(const char* name,
struct fat_file* ent,
struct fat_dir* dir);
extern int fat_readwrite(struct fat_file *ent, int sectorcount,
@@ -87,13 +87,13 @@ extern int fat_readwrite(struct fat_file *ent, int sectorcount,
extern int fat_closewrite(struct fat_file *ent, int size, int attr);
extern int fat_seek(struct fat_file *ent, unsigned int sector );
extern int fat_remove(struct fat_file *ent);
-extern int fat_truncate(struct fat_file *ent);
+extern int fat_truncate(const struct fat_file *ent);
extern int fat_rename(struct fat_file* file,
- unsigned char* newname,
+ const unsigned char* newname,
int size, int attr);
extern int fat_opendir(struct fat_dir *ent, unsigned int currdir,
- struct fat_dir *parent_dir);
+ const struct fat_dir *parent_dir);
extern int fat_getnext(struct fat_dir *ent, struct fat_direntry *entry);
extern int fat_get_cluster_size(void);
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 );
extern void lcd_scroll_delay( int ms );
extern void lcd_set_contrast(int val);
extern void lcd_write_command( int byte );
-extern void lcd_write_data( unsigned char* p_bytes, int count );
+extern void lcd_write_data( const unsigned char* p_bytes, int count );
extern int lcd_default_contrast(void);
#if defined(SIMULATOR) || defined(HAVE_LCD_BITMAP)
extern void lcd_update(void);
/* performance function */
-extern void lcd_blit (unsigned char* p_data, int x, int y, int width, int height, int stride);
+extern void lcd_blit (const unsigned char* p_data, int x, int y, int width,
+ int height, int stride);
/* update a fraction of the screen */
extern void lcd_update_rect(int x, int y, int width, int height);
@@ -88,8 +89,8 @@ enum
ICON_PARAM
};
-extern void lcd_define_hw_pattern (int which,char *pattern,int length);
-extern void lcd_define_pattern (int which,char *pattern);
+extern void lcd_define_hw_pattern (int which,const char *pattern,int length);
+extern void lcd_define_pattern (int which,const char *pattern);
extern void lcd_double_height (bool on);
#define JUMP_SCROLL_ALWAYS 5
extern 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 @@
int mas_default_read(unsigned short *buf);
int mas_run(unsigned short address);
int mas_readmem(int bank, int addr, unsigned long* dest, int len);
-int mas_writemem(int bank, int addr, unsigned long* src, int len);
+int mas_writemem(int bank, int addr, const unsigned long* src, int len);
int mas_readreg(int reg);
int mas_writereg(int reg, unsigned int val);
void mas_reset(void);