parent
eb25e5f0da
commit
1d491e772b
@ -919,8 +919,8 @@ void update_sec_lang_from_external_flash()
|
|||||||
{
|
{
|
||||||
if ((boot_app_magic == BOOT_APP_MAGIC) && (boot_app_flags & BOOT_APP_FLG_USER0))
|
if ((boot_app_magic == BOOT_APP_MAGIC) && (boot_app_flags & BOOT_APP_FLG_USER0))
|
||||||
{
|
{
|
||||||
uint8_t lang = boot_reserved >> 4;
|
uint8_t lang = boot_reserved >> 3;
|
||||||
uint8_t state = boot_reserved & 0xf;
|
uint8_t state = boot_reserved & 0x07;
|
||||||
lang_table_header_t header;
|
lang_table_header_t header;
|
||||||
uint32_t src_addr;
|
uint32_t src_addr;
|
||||||
if (lang_get_header(lang, &header, &src_addr))
|
if (lang_get_header(lang, &header, &src_addr))
|
||||||
@ -928,7 +928,7 @@ void update_sec_lang_from_external_flash()
|
|||||||
lcd_puts_at_P(1,3,PSTR("Language update."));
|
lcd_puts_at_P(1,3,PSTR("Language update."));
|
||||||
for (uint8_t i = 0; i < state; i++) fputc('.', lcdout);
|
for (uint8_t i = 0; i < state; i++) fputc('.', lcdout);
|
||||||
_delay(100);
|
_delay(100);
|
||||||
boot_reserved = (state + 1) | (lang << 4);
|
boot_reserved = (boot_reserved & 0xF8) | ((state + 1) & 0x07);
|
||||||
if ((state * LANGBOOT_BLOCKSIZE) < header.size)
|
if ((state * LANGBOOT_BLOCKSIZE) < header.size)
|
||||||
{
|
{
|
||||||
cli();
|
cli();
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
//#define LANG_MODE 0 // primary language only
|
//#define LANG_MODE 0 // primary language only
|
||||||
#define LANG_MODE 1 // sec. language support
|
#define LANG_MODE 1 // sec. language support
|
||||||
|
|
||||||
#define LANG_SIZE_RESERVED 0x3000 // reserved space for secondary language (12288 bytes)
|
#define LANG_SIZE_RESERVED 0x3000 // reserved space for secondary language (12288 bytes). Maximum 32768 bytes
|
||||||
|
|
||||||
//Community language support
|
//Community language support
|
||||||
#define COMMUNITY_LANG_GROUP 1
|
#define COMMUNITY_LANG_GROUP 1
|
||||||
|
@ -300,5 +300,5 @@ void lang_boot_update_start(uint8_t lang)
|
|||||||
{
|
{
|
||||||
uint8_t cnt = lang_get_count();
|
uint8_t cnt = lang_get_count();
|
||||||
if ((lang < 2) || (lang > cnt)) return; //only languages from xflash can be selected
|
if ((lang < 2) || (lang > cnt)) return; //only languages from xflash can be selected
|
||||||
bootapp_reboot_user0(lang << 4);
|
bootapp_reboot_user0(lang << 3);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user