Skip to content

Commit

Permalink
Build fix for const qualifier not being respected.
Browse files Browse the repository at this point in the history
  • Loading branch information
thor2016 committed Feb 24, 2024
1 parent 5f3ce58 commit de549f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/boards/coolgirl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ static uint8 flash_buffer_v[10];
static uint8 cfi_mode = 0;

// Micron 4-gbit memory CFI data
const uint8 cfi_data[] =
static const uint8 cfi_data[] =
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x51, 0x52, 0x59, 0x02, 0x00, 0x40, 0x00, 0x00,
Expand All @@ -247,7 +247,7 @@ const uint8 cfi_data[] =

#define SET_BITS(target, target_bits, source, source_bits) target = set_bits(target, target_bits, get_bits(source, source_bits))

static inline uint8 string_to_bits(char* bitsstr, int* bits)
static inline uint8 string_to_bits(const char* bitsstr, int* bits)
{
uint8 bit1, bit2, count = 0;
for (int i = 0; i < 32; i++)
Expand Down Expand Up @@ -298,7 +298,7 @@ static inline uint8 string_to_bits(char* bitsstr, int* bits)
return count;
}

static inline uint32 get_bits(uint32 V, char* bitsstr)
static inline uint32 get_bits(const uint32 V, const char* bitsstr)
{
uint32 result = 0;
int bits[32];
Expand All @@ -311,7 +311,7 @@ static inline uint32 get_bits(uint32 V, char* bitsstr)
return result;
}

static inline uint32 set_bits(uint32 V, char* bitsstr, uint32 new_bits)
static inline uint32 set_bits(uint32 V, const char* bitsstr, const uint32 new_bits)
{
int bits[32];
uint8 count = string_to_bits(bitsstr, bits);
Expand Down

0 comments on commit de549f0

Please sign in to comment.