From cf3a9e04b8c8e87a3bec55fcdecdc492651f1ae4 Mon Sep 17 00:00:00 2001 From: whitequark Date: Sat, 8 Aug 2015 12:16:27 +0300 Subject: [PATCH] libbase: add const qualifiers. --- software/include/base/spiflash.h | 4 ++-- software/libbase/spiflash.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/software/include/base/spiflash.h b/software/include/base/spiflash.h index ce5a1d9b..a4ff495a 100644 --- a/software/include/base/spiflash.h +++ b/software/include/base/spiflash.h @@ -1,8 +1,8 @@ #ifndef __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 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 */ diff --git a/software/libbase/spiflash.c b/software/libbase/spiflash.c index 529fd47b..31d56a10 100644 --- a/software/libbase/spiflash.c +++ b/software/libbase/spiflash.c @@ -89,7 +89,7 @@ void erase_flash_sector(unsigned int addr) 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; @@ -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) -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; -- 2.30.2