emWin - Language support

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • emWin - Language support

      Hi everyone,
      I have the following files in my project. main.c file contains the main function and string.c file contains the UTF-8 encoded data of a word in english and Korean language. This was my sample code before working on my bigger project in the embedded environment. and is being executed on a microcontroller correctly.

      C Source Code: main.c

      1. enum{
      2. Text_001
      3. };
      4. enum
      5. {
      6. DS_LANG_EN = 0,
      7. DS_LANG_KO = 1,
      8. LANG_MAX
      9. };
      10. void MainTask(void)
      11. {
      12. unsigned char *pLan = NULL;
      13. unsigned short nLanCnt = 0
      14. int nLanRet = 0;
      15. GUI_Init();
      16. GUI_UC_SetEncodeUTF8();
      17. getLanguageInfo(&pLan, &nLanCnt);
      18. nLanRet = GUI_LANG_LoadCSV(pLan, nLanCnt);
      19. GUI_LANG_SetLang(DS_LANG_EN);
      20. GUI_DispStringAt(GUI_LANG_GetText(Text_001), 10,0);
      21. }
      Display All


      C Source Code: string.c

      1. static unsigned char book1[18UL + 1] = {
      2. 0x45, 0x6E, 0x67, 0x6C, 0x69, 0x73, 0x68, 0x2C, 0xED, 0x95, 0x9C, 0xEA, 0xB5, 0xAD, 0xEC, 0x96, 0xB4, 0x2C, 0x00
      3. };
      4. int getLanguageInfo(unsigned char **pLan, unsigned short *nLanCnt)
      5. {
      6. *pLan = book1;
      7. *nLanCnt = sizeof(book1);
      8. return 0;
      9. }
      Display All

      But in my actual project I am having more number of words converted in UTF-8 format, hence leading to in sufficient RAM . having trouble retrieving the the text by using GUI_LANG_LoadCSVEx(); please help me how to use the above api in embedded environment. As the data is stored in non addressable location (ROM/FLash) and it(microcontroller) does not support any CSV or txt file formats.