libbase: add const qualifiers.

This commit is contained in:
whitequark 2015-08-08 12:16:27 +03:00
parent 1b34f48660
commit cf3a9e04b8
2 changed files with 4 additions and 4 deletions

View File

@ -1,8 +1,8 @@
#ifndef __SPIFLASH_H #ifndef __SPIFLASH_H
#define __SPIFLASH_H #define __SPIFLASH_H
void write_to_flash_page(unsigned int addr, unsigned char *c, unsigned int len); void write_to_flash_page(unsigned int addr, const unsigned char *c, unsigned int len);
void erase_flash_sector(unsigned int addr); void erase_flash_sector(unsigned int addr);
void write_to_flash(unsigned int addr, unsigned char *c, unsigned int len); void write_to_flash(unsigned int addr, const unsigned char *c, unsigned int len);
#endif /* __SPIFLASH_H */ #endif /* __SPIFLASH_H */

View File

@ -89,7 +89,7 @@ void erase_flash_sector(unsigned int addr)
spiflash_bitbang_en_write(0); spiflash_bitbang_en_write(0);
} }
void write_to_flash_page(unsigned int addr, unsigned char *c, unsigned int len) void write_to_flash_page(unsigned int addr, const unsigned char *c, unsigned int len)
{ {
unsigned int i; unsigned int i;
@ -117,7 +117,7 @@ void write_to_flash_page(unsigned int addr, unsigned char *c, unsigned int len)
#define SPIFLASH_PAGE_MASK (SPIFLASH_PAGE_SIZE - 1) #define SPIFLASH_PAGE_MASK (SPIFLASH_PAGE_SIZE - 1)
void write_to_flash(unsigned int addr, unsigned char *c, unsigned int len) void write_to_flash(unsigned int addr, const unsigned char *c, unsigned int len)
{ {
unsigned int written = 0; unsigned int written = 0;