Skip to content

Commit

Permalink
libbase: add const qualifiers.
Browse files Browse the repository at this point in the history
  • Loading branch information
whitequark committed Aug 8, 2015
1 parent 1b34f48 commit cf3a9e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions 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 */
4 changes: 2 additions & 2 deletions software/libbase/spiflash.c
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit cf3a9e0

Please sign in to comment.