diff --git a/Firmware/language.c b/Firmware/language.c index ca3b9e88..8660cc63 100644 --- a/Firmware/language.c +++ b/Firmware/language.c @@ -63,7 +63,7 @@ uint8_t lang_select(uint8_t lang) if (lang_check(_SEC_LANG_TABLE)) if (pgm_read_dword(((uint32_t*)(_SEC_LANG_TABLE + 12))) == pgm_read_dword(((uint32_t*)(_PRI_LANG_SIGNATURE)))) //signature valid { - lang_table = _SEC_LANG_TABLE; // set table pointer + lang_table = (lang_table_t*)_SEC_LANG_TABLE; // set table pointer lang_selected = lang; // set language id } } @@ -138,7 +138,7 @@ uint8_t lang_get_header(uint8_t lang, lang_table_header_t* header, uint32_t* off if (lang == LANG_ID_SEC) { uint16_t ui = _SEC_LANG_TABLE; //table pointer - memcpy_P(header, ui, sizeof(lang_table_header_t)); //read table header from progmem + memcpy_P(header, (const void*)ui, sizeof(lang_table_header_t)); //read table header from progmem if (offset) *offset = ui; return (header->magic == LANG_MAGIC)?1:0; //return 1 if magic valid } @@ -147,7 +147,7 @@ uint8_t lang_get_header(uint8_t lang, lang_table_header_t* header, uint32_t* off lang--; while (1) { - w25x20cl_rd_data(addr, header, sizeof(lang_table_header_t)); //read table header from xflash + w25x20cl_rd_data(addr, (uint8_t*)header, sizeof(lang_table_header_t)); //read table header from xflash if (header->magic != LANG_MAGIC) break; //break if not valid if (offset) *offset = addr; if (--lang == 0) return 1;