Build fix for const qualifier not being respected.

This commit is contained in:
harry 2024-02-24 13:28:36 -05:00
parent 5f3ce5896a
commit de549f0eb9
1 changed files with 4 additions and 4 deletions

View File

@ -227,7 +227,7 @@ static uint8 flash_buffer_v[10];
static uint8 cfi_mode = 0; static uint8 cfi_mode = 0;
// Micron 4-gbit memory CFI data // 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,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x51, 0x52, 0x59, 0x02, 0x00, 0x40, 0x00, 0x00, 0x51, 0x52, 0x59, 0x02, 0x00, 0x40, 0x00, 0x00,
@ -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)) #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; uint8 bit1, bit2, count = 0;
for (int i = 0; i < 32; i++) for (int i = 0; i < 32; i++)
@ -298,7 +298,7 @@ static inline uint8 string_to_bits(char* bitsstr, int* bits)
return count; 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; uint32 result = 0;
int bits[32]; int bits[32];
@ -311,7 +311,7 @@ static inline uint32 get_bits(uint32 V, char* bitsstr)
return result; 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]; int bits[32];
uint8 count = string_to_bits(bitsstr, bits); uint8 count = string_to_bits(bitsstr, bits);