What is the Problem?

Hello!

Unfortunately, I'm still a newbie when it comes to working with the Arduino. I have successfully completed a few projects. Unfortunately, I'm completely lined up for Mega Chess 2 and don't know what to do next.
I can't get ArduinoMegaChess2.ino to work. Unfortunately, I couldn't find anything with the error messages on Google either. I have already solved some problems with gui.h.
My display https://www.amazon.de/dp/B07Y6179LG/ref=pe_27091401_487027711_TE_SCE_dp_1

At the end I send a few more error messages of well over 100! with.

Please help! Thanks

Post your code between code tags </> well outlined. Copy your errorcode. A screendump is a bad choice.

The greatest problem is #define EFC isn't declared the right way.

Tip: not the last error in the row is the most important. The first error is important. All the rest can be a result of the first error.

1 Like

Hi, @buckfast_beekeeper

To add code please click this link;

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

1 Like

Thanks for the information!
Have used the code completely divided into white section and the red part. I already know that the white ones aren't that bad. I tried to exchange the EFC file and the associated one for a new one. Unfortunately, there was no success.

Thanks

#define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:62:18: note: in expansion of macro 'FLASH_START'
   if (((uint32_t)FLASH_START+address & 3) != 0) {
                  ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.h:25:32: note: suggested alternative: 'IFLASH_ADDR'
 #define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:62:18: note: in expansion of macro 'FLASH_START'
   if (((uint32_t)FLASH_START+address & 3) != 0) {
                  ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope
 #define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:68:36: note: in expansion of macro 'FLASH_START'
   retCode = flash_unlock((uint32_t)FLASH_START+address, (uint32_t)FLASH_START+address + dataLength - 1, 0, 0);
                                    ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.h:25:32: note: suggested alternative: 'IFLASH_ADDR'
 #define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:68:36: note: in expansion of macro 'FLASH_START'
   retCode = flash_unlock((uint32_t)FLASH_START+address, (uint32_t)FLASH_START+address + dataLength - 1, 0, 0);
                                    ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp: In member function 'boolean DueFlashStorage::write_unlocked(uint32_t, byte)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope
 #define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:97:35: note: in expansion of macro 'FLASH_START'
   retCode = flash_write((uint32_t)FLASH_START+address, &value, byteLength, 1);
                                   ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.h:25:32: note: suggested alternative: 'IFLASH_ADDR'
 #define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:97:35: note: in expansion of macro 'FLASH_START'
   retCode = flash_write((uint32_t)FLASH_START+address, &value, byteLength, 1);
                                   ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp: In member function 'boolean DueFlashStorage::write_unlocked(uint32_t, byte*, uint32_t)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope
 #define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:111:17: note: in expansion of macro 'FLASH_START'
   if ((uint32_t)FLASH_START+address < IFLASH1_ADDR) {
                 ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.h:25:32: note: suggested alternative: 'IFLASH_ADDR'
 #define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:111:17: note: in expansion of macro 'FLASH_START'
   if ((uint32_t)FLASH_START+address < IFLASH1_ADDR) {
                 ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope
 #define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:116:17: note: in expansion of macro 'FLASH_START'
   if ((uint32_t)FLASH_START+address >= (IFLASH1_ADDR + IFLASH1_SIZE)) {
                 ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.h:25:32: note: suggested alternative: 'IFLASH_ADDR'
 #define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:116:17: note: in expansion of macro 'FLASH_START'
   if ((uint32_t)FLASH_START+address >= (IFLASH1_ADDR + IFLASH1_SIZE)) {
                 ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:116:56: error: 'IFLASH1_SIZE' was not declared in this scope
   if ((uint32_t)FLASH_START+address >= (IFLASH1_ADDR + IFLASH1_SIZE)) {
                                                        ^~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:116:56: note: suggested alternative: 'IFLASH_PAGE_SIZE'
   if ((uint32_t)FLASH_START+address >= (IFLASH1_ADDR + IFLASH1_SIZE)) {
                                                        ^~~~~~~~~~~~
                                                        IFLASH_PAGE_SIZE


End of White Section!

Now Red Section:

In file included from /Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:1:0:
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope
 #define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:121:18: note: in expansion of macro 'FLASH_START'
   if (((uint32_t)FLASH_START+address & 3) != 0) {
                  ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.h:25:32: note: suggested alternative: 'IFLASH_ADDR'
 #define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:121:18: note: in expansion of macro 'FLASH_START'
   if (((uint32_t)FLASH_START+address & 3) != 0) {
                  ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.h:25:32: error: 'IFLASH1_ADDR' was not declared in this scope
 #define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:127:35: note: in expansion of macro 'FLASH_START'
   retCode = flash_write((uint32_t)FLASH_START+address, data, dataLength, 1);
                                   ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.h:25:32: note: suggested alternative: 'IFLASH_ADDR'
 #define  FLASH_START  ((byte *)IFLASH1_ADDR)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/DueFlashStorage.cpp:127:35: note: in expansion of macro 'FLASH_START'
   retCode = flash_write((uint32_t)FLASH_START+address, data, dataLength, 1);
                                   ^~~~~~~~~~~
In file included from /Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:44:0:
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:116:19: error: 'Efc' was not declared in this scope
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws);
                   ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:116:24: error: 'p_efc' was not declared in this scope
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws);
                        ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:116:40: error: expected primary-expression before 'ul_access_mode'
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws);
                                        ^~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:116:65: error: expected primary-expression before 'ul_fws'
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws);
                                                                 ^~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:117:32: error: variable or field 'efc_enable_frdy_interrupt' declared void
 void efc_enable_frdy_interrupt(Efc *p_efc);
                                ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:117:32: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:117:37: error: 'p_efc' was not declared in this scope
 void efc_enable_frdy_interrupt(Efc *p_efc);
                                     ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:118:33: error: variable or field 'efc_disable_frdy_interrupt' declared void
 void efc_disable_frdy_interrupt(Efc *p_efc);
                                 ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:118:33: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:118:38: error: 'p_efc' was not declared in this scope
 void efc_disable_frdy_interrupt(Efc *p_efc);
                                      ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:119:32: error: variable or field 'efc_set_flash_access_mode' declared void
 void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode);
                                ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:119:32: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:119:37: error: 'p_efc' was not declared in this scope
 void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode);
                                     ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:119:53: error: expected primary-expression before 'ul_mode'
 void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode);
                                                     ^~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:120:36: error: 'Efc' was not declared in this scope
 uint32_t efc_get_flash_access_mode(Efc *p_efc);
                                    ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:120:41: error: 'p_efc' was not declared in this scope
 uint32_t efc_get_flash_access_mode(Efc *p_efc);
                                         ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:121:25: error: variable or field 'efc_set_wait_state' declared void
 void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws);
                         ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:121:25: error: 'Efc' was not declared in this scope
In file included from /Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.h:48:0,
                 from /Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:46:
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:116:19: error: 'Efc' was not declared in this scope
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws);
                   ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:121:30: error: 'p_efc' was not declared in this scope
 void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws);
                              ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:116:24: error: 'p_efc' was not declared in this scope
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws);
                        ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:121:46: error: expected primary-expression before 'ul_fws'
 void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws);
                                              ^~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:122:29: error: 'Efc' was not declared in this scope
 uint32_t efc_get_wait_state(Efc *p_efc);
                             ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:116:40: error: expected primary-expression before 'ul_access_mode'
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws);
                                        ^~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:116:65: error: expected primary-expression before 'ul_fws'
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws);
                                                                 ^~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:117:32: error: variable or field 'efc_enable_frdy_interrupt' declared void
 void efc_enable_frdy_interrupt(Efc *p_efc);
                                ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:117:32: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:122:34: error: 'p_efc' was not declared in this scope
 uint32_t efc_get_wait_state(Efc *p_efc);
                                  ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:117:37: error: 'p_efc' was not declared in this scope
 void efc_enable_frdy_interrupt(Efc *p_efc);
                                     ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:123:30: error: 'Efc' was not declared in this scope
 uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command,
                              ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:123:35: error: 'p_efc' was not declared in this scope
 uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command,
                                   ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:118:33: error: variable or field 'efc_disable_frdy_interrupt' declared void
 void efc_disable_frdy_interrupt(Efc *p_efc);
                                 ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:118:33: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:118:38: error: 'p_efc' was not declared in this scope
 void efc_disable_frdy_interrupt(Efc *p_efc);
                                      ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:123:51: error: expected primary-expression before 'ul_command'
 uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command,
                                                   ^~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:124:12: error: expected primary-expression before 'ul_argument'
   uint32_t ul_argument);
            ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:125:25: error: 'Efc' was not declared in this scope
 uint32_t efc_get_status(Efc *p_efc);
                         ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:125:30: error: 'p_efc' was not declared in this scope
 uint32_t efc_get_status(Efc *p_efc);
                              ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:119:32: error: variable or field 'efc_set_flash_access_mode' declared void
 void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode);
                                ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:119:32: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:119:37: error: 'p_efc' was not declared in this scope
 void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode);
                                     ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:126:25: error: 'Efc' was not declared in this scope
 uint32_t efc_get_result(Efc *p_efc);
                         ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:119:53: error: expected primary-expression before 'ul_mode'
 void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode);
                                                     ^~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:120:36: error: 'Efc' was not declared in this scope
 uint32_t efc_get_flash_access_mode(Efc *p_efc);
                                    ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:120:41: error: 'p_efc' was not declared in this scope
 uint32_t efc_get_flash_access_mode(Efc *p_efc);
                                         ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:121:25: error: variable or field 'efc_set_wait_state' declared void
 void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws);
                         ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:121:25: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:121:30: error: 'p_efc' was not declared in this scope
 void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws);
                              ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:126:30: error: 'p_efc' was not declared in this scope
 uint32_t efc_get_result(Efc *p_efc);
                              ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:127:36: error: 'Efc' was not declared in this scope
 uint32_t efc_perform_read_sequence(Efc *p_efc,
                                    ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:127:41: error: 'p_efc' was not declared in this scope
 uint32_t efc_perform_read_sequence(Efc *p_efc,
                                         ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:128:12: error: expected primary-expression before 'ul_cmd_st'
   uint32_t ul_cmd_st, uint32_t ul_cmd_sp,
            ^~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:128:32: error: expected primary-expression before 'ul_cmd_sp'
   uint32_t ul_cmd_st, uint32_t ul_cmd_sp,
                                ^~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:129:12: error: expected primary-expression before '*' token
   uint32_t *p_ul_buf, uint32_t ul_size);
            ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:129:13: error: 'p_ul_buf' was not declared in this scope
   uint32_t *p_ul_buf, uint32_t ul_size);
             ^~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:121:46: error: expected primary-expression before 'ul_fws'
 void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws);
                                              ^~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:122:29: error: 'Efc' was not declared in this scope
 uint32_t efc_get_wait_state(Efc *p_efc);
                             ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:122:34: error: 'p_efc' was not declared in this scope
 uint32_t efc_get_wait_state(Efc *p_efc);
                                  ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:129:32: error: expected primary-expression before 'ul_size'
   uint32_t *p_ul_buf, uint32_t ul_size);
                                ^~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:84:27: error: variable or field 'efc_write_fmr' declared void
 extern void efc_write_fmr(Efc *p_efc, uint32_t ul_fmr);
                           ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:84:27: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:84:32: error: 'p_efc' was not declared in this scope
 extern void efc_write_fmr(Efc *p_efc, uint32_t ul_fmr);
                                ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:123:30: error: 'Efc' was not declared in this scope
 uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command,
                              ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:123:35: error: 'p_efc' was not declared in this scope
 uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command,
                                   ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:84:48: error: expected primary-expression before 'ul_fmr'
 extern void efc_write_fmr(Efc *p_efc, uint32_t ul_fmr);
                                                ^~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:85:33: error: 'Efc' was not declared in this scope
 extern uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr);
                                 ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:85:38: error: 'p_efc' was not declared in this scope
 extern uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr);
                                      ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:123:51: error: expected primary-expression before 'ul_command'
 uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command,
                                                   ^~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:124:12: error: expected primary-expression before 'ul_argument'
   uint32_t ul_argument);
            ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:125:25: error: 'Efc' was not declared in this scope
 uint32_t efc_get_status(Efc *p_efc);
                         ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:125:30: error: 'p_efc' was not declared in this scope
 uint32_t efc_get_status(Efc *p_efc);
                              ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:85:54: error: expected primary-expression before 'ul_fcr'
 extern uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr);
                                                      ^~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:95:19: error: redefinition of 'uint32_t efc_init'
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws)
                   ^~~
In file included from /Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:44:0:
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:116:10: note: 'uint32_t efc_init' previously defined here
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws);
          ^~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:95:19: error: 'Efc' was not declared in this scope
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws)
                   ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:126:25: error: 'Efc' was not declared in this scope
 uint32_t efc_get_result(Efc *p_efc);
                         ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:95:24: error: 'p_efc' was not declared in this scope
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws)
                        ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:126:30: error: 'p_efc' was not declared in this scope
 uint32_t efc_get_result(Efc *p_efc);
                              ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:95:40: error: expected primary-expression before 'ul_access_mode'
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws)
                                        ^~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:95:65: error: expected primary-expression before 'ul_fws'
 uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws)
                                                                 ^~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:106:32: error: variable or field 'efc_enable_frdy_interrupt' declared void
 void efc_enable_frdy_interrupt(Efc *p_efc)
                                ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:106:32: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:127:36: error: 'Efc' was not declared in this scope
 uint32_t efc_perform_read_sequence(Efc *p_efc,
                                    ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:106:37: error: 'p_efc' was not declared in this scope
 void efc_enable_frdy_interrupt(Efc *p_efc)
                                     ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:127:41: error: 'p_efc' was not declared in this scope
 uint32_t efc_perform_read_sequence(Efc *p_efc,
                                         ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:118:33: error: variable or field 'efc_disable_frdy_interrupt' declared void
 void efc_disable_frdy_interrupt(Efc *p_efc)
                                 ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:118:33: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:128:12: error: expected primary-expression before 'ul_cmd_st'
   uint32_t ul_cmd_st, uint32_t ul_cmd_sp,
            ^~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:128:32: error: expected primary-expression before 'ul_cmd_sp'
   uint32_t ul_cmd_st, uint32_t ul_cmd_sp,
                                ^~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:129:12: error: expected primary-expression before '*' token
   uint32_t *p_ul_buf, uint32_t ul_size);
            ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:129:13: error: 'p_ul_buf' was not declared in this scope
   uint32_t *p_ul_buf, uint32_t ul_size);
             ^~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:118:38: error: 'p_efc' was not declared in this scope
 void efc_disable_frdy_interrupt(Efc *p_efc)
                                      ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:131:32: error: variable or field 'efc_set_flash_access_mode' declared void
 void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode)
                                ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:131:32: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:131:37: error: 'p_efc' was not declared in this scope
 void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode)
                                     ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:129:32: error: expected primary-expression before 'ul_size'
   uint32_t *p_ul_buf, uint32_t ul_size);
                                ^~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:89:31: error: 'IFLASH0_PAGE_SIZE' was not declared in this scope
 # define IFLASH_PAGE_SIZE     IFLASH0_PAGE_SIZE
                               ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:94:35: note: in expansion of macro 'IFLASH_PAGE_SIZE'
 static uint32_t gs_ul_page_buffer[IFLASH_PAGE_SIZE / sizeof(uint32_t)];
                                   ^~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:131:53: error: expected primary-expression before 'ul_mode'
 void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode)
                                                     ^~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:145:36: error: redefinition of 'uint32_t efc_get_flash_access_mode'
 uint32_t efc_get_flash_access_mode(Efc *p_efc)
                                    ^~~
In file included from /Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:44:0:
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:120:10: note: 'uint32_t efc_get_flash_access_mode' previously defined here
 uint32_t efc_get_flash_access_mode(Efc *p_efc);
          ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:145:36: error: 'Efc' was not declared in this scope
 uint32_t efc_get_flash_access_mode(Efc *p_efc)
                                    ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:145:41: error: 'p_efc' was not declared in this scope
 uint32_t efc_get_flash_access_mode(Efc *p_efc)
                                         ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:156:25: error: variable or field 'efc_set_wait_state' declared void
 void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws)
                         ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:156:25: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:156:30: error: 'p_efc' was not declared in this scope
 void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws)
                              ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:89:31: note: suggested alternative: 'IFLASH_PAGE_SIZE'
 # define IFLASH_PAGE_SIZE     IFLASH0_PAGE_SIZE
                               ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:94:35: note: in expansion of macro 'IFLASH_PAGE_SIZE'
 static uint32_t gs_ul_page_buffer[IFLASH_PAGE_SIZE / sizeof(uint32_t)];
                                   ^~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:106:31: error: variable or field 'translate_address' declared void
 static void translate_address(Efc **pp_efc, uint32_t ul_addr,
                               ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:106:31: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:156:46: error: expected primary-expression before 'ul_fws'
 void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws)
                                              ^~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:170:29: error: redefinition of 'uint32_t efc_get_wait_state'
 uint32_t efc_get_wait_state(Efc *p_efc)
                             ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:106:37: error: 'pp_efc' was not declared in this scope
 static void translate_address(Efc **pp_efc, uint32_t ul_addr,
                                     ^~~~~~
In file included from /Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:44:0:
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:122:10: note: 'uint32_t efc_get_wait_state' previously defined here
 uint32_t efc_get_wait_state(Efc *p_efc);
          ^~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:170:29: error: 'Efc' was not declared in this scope
 uint32_t efc_get_wait_state(Efc *p_efc)
                             ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:170:34: error: 'p_efc' was not declared in this scope
 uint32_t efc_get_wait_state(Efc *p_efc)
                                  ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:106:54: error: expected primary-expression before 'ul_addr'
 static void translate_address(Efc **pp_efc, uint32_t ul_addr,
                                                      ^~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:107:12: error: expected primary-expression before '*' token
   uint16_t *pus_page, uint16_t *pus_offset)
            ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:107:13: error: 'pus_page' was not declared in this scope
   uint16_t *pus_page, uint16_t *pus_offset)
             ^~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:188:30: error: redefinition of 'uint32_t efc_perform_command'
 uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command,
                              ^~~
In file included from /Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:44:0:
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:123:10: note: 'uint32_t efc_perform_command' previously defined here
 uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command,
          ^~~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:188:30: error: 'Efc' was not declared in this scope
 uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command,
                              ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:188:35: error: 'p_efc' was not declared in this scope
 uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command,
                                   ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:188:51: error: expected primary-expression before 'ul_command'
 uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command,
                                                   ^~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:189:12: error: expected primary-expression before 'ul_argument'
   uint32_t ul_argument)
            ^~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:218:25: error: redefinition of 'uint32_t efc_get_status'
 uint32_t efc_get_status(Efc *p_efc)
                         ^~~
In file included from /Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:44:0:
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:125:10: note: 'uint32_t efc_get_status' previously defined here
 uint32_t efc_get_status(Efc *p_efc);
          ^~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:218:25: error: 'Efc' was not declared in this scope
 uint32_t efc_get_status(Efc *p_efc)
                         ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:218:30: error: 'p_efc' was not declared in this scope
 uint32_t efc_get_status(Efc *p_efc)
                              ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:230:25: error: redefinition of 'uint32_t efc_get_result'
 uint32_t efc_get_result(Efc *p_efc)
                         ^~~
In file included from /Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:44:0:
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:126:10: note: 'uint32_t efc_get_result' previously defined here
 uint32_t efc_get_result(Efc *p_efc);
          ^~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:230:25: error: 'Efc' was not declared in this scope
 uint32_t efc_get_result(Efc *p_efc)
                         ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:230:30: error: 'p_efc' was not declared in this scope
 uint32_t efc_get_result(Efc *p_efc)
                              ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:248:36: error: redefinition of 'uint32_t efc_perform_read_sequence'
 uint32_t efc_perform_read_sequence(Efc *p_efc,
                                    ^~~
In file included from /Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:44:0:
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.h:127:10: note: 'uint32_t efc_perform_read_sequence' previously defined here
 uint32_t efc_perform_read_sequence(Efc *p_efc,
          ^~~~~~~~~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:248:36: error: 'Efc' was not declared in this scope
 uint32_t efc_perform_read_sequence(Efc *p_efc,
                                    ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:248:41: error: 'p_efc' was not declared in this scope
 uint32_t efc_perform_read_sequence(Efc *p_efc,
                                         ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:249:12: error: expected primary-expression before 'ul_cmd_st'
   uint32_t ul_cmd_st, uint32_t ul_cmd_sp,
            ^~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:249:32: error: expected primary-expression before 'ul_cmd_sp'
   uint32_t ul_cmd_st, uint32_t ul_cmd_sp,
                                ^~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:250:12: error: expected primary-expression before '*' token
   uint32_t *p_ul_buf, uint32_t ul_size)
            ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:250:13: error: 'p_ul_buf' was not declared in this scope
   uint32_t *p_ul_buf, uint32_t ul_size)
             ^~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:250:32: error: expected primary-expression before 'ul_size'
   uint32_t *p_ul_buf, uint32_t ul_size)
                                ^~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:306:20: error: variable or field 'efc_write_fmr' declared void
 void efc_write_fmr(Efc *p_efc, uint32_t ul_fmr)
                    ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:306:20: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:306:25: error: 'p_efc' was not declared in this scope
 void efc_write_fmr(Efc *p_efc, uint32_t ul_fmr)
                         ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:306:41: error: expected primary-expression before 'ul_fmr'
 void efc_write_fmr(Efc *p_efc, uint32_t ul_fmr)
                                         ^~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:320:26: error: redefinition of 'uint32_t efc_perform_fcr'
 uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr)
                          ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:85:17: note: 'uint32_t efc_perform_fcr' previously defined here
 extern uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr);
                 ^~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:320:26: error: 'Efc' was not declared in this scope
 uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr)
                          ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:320:31: error: 'p_efc' was not declared in this scope
 uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr)
                               ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/efc.cpp:320:47: error: expected primary-expression before 'ul_fcr'
 uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr)
                                               ^~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:107:13: note: suggested alternative: 'isSpace'
   uint16_t *pus_page, uint16_t *pus_offset)
             ^~~~~~~~
             isSpace
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:107:32: error: expected primary-expression before '*' token
   uint16_t *pus_page, uint16_t *pus_offset)
                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:107:33: error: 'pus_offset' was not declared in this scope
   uint16_t *pus_page, uint16_t *pus_offset)
                                 ^~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:145:29: error: variable or field 'compute_address' declared void
 static void compute_address(Efc *p_efc, uint16_t us_page, uint16_t us_offset,
                             ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:145:29: error: 'Efc' was not declared in this scope
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:145:34: error: 'p_efc' was not declared in this scope
 static void compute_address(Efc *p_efc, uint16_t us_page, uint16_t us_offset,
                                  ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:145:50: error: expected primary-expression before 'us_page'
 static void compute_address(Efc *p_efc, uint16_t us_page, uint16_t us_offset,
                                                  ^~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:145:68: error: expected primary-expression before 'us_offset'
 static void compute_address(Efc *p_efc, uint16_t us_page, uint16_t us_offset,
                                                                    ^~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:146:12: error: expected primary-expression before '*' token
   uint32_t *pul_addr)
            ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:146:13: error: 'pul_addr' was not declared in this scope
   uint32_t *pul_addr)
             ^~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'void compute_lock_range(uint32_t, uint32_t, uint32_t*, uint32_t*)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:91:38: error: 'IFLASH0_LOCK_REGION_SIZE' was not declared in this scope
 # define IFLASH_LOCK_REGION_SIZE     IFLASH0_LOCK_REGION_SIZE
                                      ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:184:43: note: in expansion of macro 'IFLASH_LOCK_REGION_SIZE'
  ul_actual_start = ul_start - (ul_start % IFLASH_LOCK_REGION_SIZE);
                                           ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:91:38: note: suggested alternative: 'IFLASH_LOCK_REGION_SIZE'
 # define IFLASH_LOCK_REGION_SIZE     IFLASH0_LOCK_REGION_SIZE
                                      ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:184:43: note: in expansion of macro 'IFLASH_LOCK_REGION_SIZE'
  ul_actual_start = ul_start - (ul_start % IFLASH_LOCK_REGION_SIZE);
                                           ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_init(uint32_t, uint32_t)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:83:18: error: 'EFC0' was not declared in this scope
 # define EFC     EFC0
                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:207:11: note: in expansion of macro 'EFC'
  efc_init(EFC, ul_mode, ul_fws);
           ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:83:18: note: suggested alternative: 'EFC'
 # define EFC     EFC0
                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:207:11: note: in expansion of macro 'EFC'
  efc_init(EFC, ul_mode, ul_fws);
           ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:207:31: error: 'efc_init' cannot be used as a function
  efc_init(EFC, ul_mode, ul_fws);
                               ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_set_wait_state(uint32_t, uint32_t)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:226:2: error: 'Efc' was not declared in this scope
  Efc *p_efc;
  ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:226:7: error: 'p_efc' was not declared in this scope
  Efc *p_efc;
       ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:228:2: error: 'translate_address' was not declared in this scope
  translate_address(&p_efc, ul_address, NULL, NULL);
  ^~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:228:2: note: suggested alternative: 'ul_address'
  translate_address(&p_efc, ul_address, NULL, NULL);
  ^~~~~~~~~~~~~~~~~
  ul_address
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:229:2: error: 'efc_set_wait_state' was not declared in this scope
  efc_set_wait_state(p_efc, ul_fws);
  ^~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:229:2: note: suggested alternative: 'efc_get_wait_state'
  efc_set_wait_state(p_efc, ul_fws);
  ^~~~~~~~~~~~~~~~~~
  efc_get_wait_state
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_set_wait_state_adaptively(uint32_t)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:244:2: error: 'Efc' was not declared in this scope
  Efc *p_efc;
  ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:244:7: error: 'p_efc' was not declared in this scope
  Efc *p_efc;
       ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:245:19: error: 'SystemCoreClock' was not declared in this scope
  uint32_t clock = SystemCoreClock;
                   ^~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:247:2: error: 'translate_address' was not declared in this scope
  translate_address(&p_efc, ul_address, NULL, NULL);
  ^~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:247:2: note: suggested alternative: 'ul_address'
  translate_address(&p_efc, ul_address, NULL, NULL);
  ^~~~~~~~~~~~~~~~~
  ul_address
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:250:14: error: 'CHIP_FREQ_FWS_0' was not declared in this scope
  if (clock < CHIP_FREQ_FWS_0) {
              ^~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:251:3: error: 'efc_set_wait_state' was not declared in this scope
   efc_set_wait_state(p_efc, 0);
   ^~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:251:3: note: suggested alternative: 'efc_get_wait_state'
   efc_set_wait_state(p_efc, 0);
   ^~~~~~~~~~~~~~~~~~
   efc_get_wait_state
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:252:21: error: 'CHIP_FREQ_FWS_1' was not declared in this scope
  } else if (clock < CHIP_FREQ_FWS_1) {
                     ^~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:253:3: error: 'efc_set_wait_state' was not declared in this scope
   efc_set_wait_state(p_efc, 1);
   ^~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:253:3: note: suggested alternative: 'efc_get_wait_state'
   efc_set_wait_state(p_efc, 1);
   ^~~~~~~~~~~~~~~~~~
   efc_get_wait_state
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:254:21: error: 'CHIP_FREQ_FWS_2' was not declared in this scope
  } else if (clock < CHIP_FREQ_FWS_2) {
                     ^~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:255:3: error: 'efc_set_wait_state' was not declared in this scope
   efc_set_wait_state(p_efc, 2);
   ^~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:255:3: note: suggested alternative: 'efc_get_wait_state'
   efc_set_wait_state(p_efc, 2);
   ^~~~~~~~~~~~~~~~~~
   efc_get_wait_state
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:256:21: error: 'CHIP_FREQ_FWS_3' was not declared in this scope
  } else if (clock < CHIP_FREQ_FWS_3) {
                     ^~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:257:3: error: 'efc_set_wait_state' was not declared in this scope
   efc_set_wait_state(p_efc, 3);
   ^~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:257:3: note: suggested alternative: 'efc_get_wait_state'
   efc_set_wait_state(p_efc, 3);
   ^~~~~~~~~~~~~~~~~~
   efc_get_wait_state
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:259:3: error: 'efc_set_wait_state' was not declared in this scope
   efc_set_wait_state(p_efc, 4);
   ^~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:259:3: note: suggested alternative: 'efc_get_wait_state'
   efc_set_wait_state(p_efc, 4);
   ^~~~~~~~~~~~~~~~~~
   efc_get_wait_state
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_get_wait_state(uint32_t)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:273:2: error: 'Efc' was not declared in this scope
  Efc *p_efc;
  ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:273:7: error: 'p_efc' was not declared in this scope
  Efc *p_efc;
       ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:275:2: error: 'translate_address' was not declared in this scope
  translate_address(&p_efc, ul_address, NULL, NULL);
  ^~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:275:2: note: suggested alternative: 'ul_address'
  translate_address(&p_efc, ul_address, NULL, NULL);
  ^~~~~~~~~~~~~~~~~
  ul_address
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:276:33: error: 'efc_get_wait_state' cannot be used as a function
  return efc_get_wait_state(p_efc);
                                 ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_get_descriptor(uint32_t, uint32_t*, uint32_t)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:291:2: error: 'Efc' was not declared in this scope
  Efc *p_efc;
  ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:291:7: error: 'p_efc' was not declared in this scope
  Efc *p_efc;
       ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:295:2: error: 'translate_address' was not declared in this scope
  translate_address(&p_efc, ul_address, NULL, NULL);
  ^~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:295:2: note: suggested alternative: 'ul_address'
  translate_address(&p_efc, ul_address, NULL, NULL);
  ^~~~~~~~~~~~~~~~~
  ul_address
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:298:64: error: 'efc_perform_command' cannot be used as a function
  if (FLASH_RC_OK != efc_perform_command(p_efc, EFC_FCMD_GETD, 0)) {
                                                                ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:303:33: error: 'efc_get_result' cannot be used as a function
    ul_tmp = efc_get_result(p_efc);
                                 ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_erase_all(uint32_t)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:373:2: error: 'Efc' was not declared in this scope
  Efc *p_efc;
  ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:373:7: error: 'p_efc' was not declared in this scope
  Efc *p_efc;
       ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:375:2: error: 'translate_address' was not declared in this scope
  translate_address(&p_efc, ul_address, NULL, NULL);
  ^~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:375:2: note: suggested alternative: 'ul_address'
  translate_address(&p_efc, ul_address, NULL, NULL);
  ^~~~~~~~~~~~~~~~~
  ul_address
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:377:60: error: 'efc_perform_command' cannot be used as a function
  if (EFC_RC_OK != efc_perform_command(p_efc, EFC_FCMD_EA, 0)) {
                                                            ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_write(uint32_t, const void*, uint32_t, uint32_t)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:485:2: error: 'Efc' was not declared in this scope
  Efc *p_efc;
  ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:485:7: error: 'p_efc' was not declared in this scope
  Efc *p_efc;
       ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:495:41: error: 'gs_ul_page_buffer' was not declared in this scope
  uint8_t *puc_page_buffer = (uint8_t *) gs_ul_page_buffer;
                                         ^~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:495:41: note: suggested alternative: 'puc_page_buffer'
  uint8_t *puc_page_buffer = (uint8_t *) gs_ul_page_buffer;
                                         ^~~~~~~~~~~~~~~~~
                                         puc_page_buffer
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:497:2: error: 'translate_address' was not declared in this scope
  translate_address(&p_efc, ul_address, &us_page, &us_offset);
  ^~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:497:2: note: suggested alternative: 'ul_address'
  translate_address(&p_efc, ul_address, &us_page, &us_offset);
  ^~~~~~~~~~~~~~~~~
  ul_address
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:500:40: error: 'efc_get_wait_state' cannot be used as a function
  ul_fws_temp = efc_get_wait_state(p_efc);
                                        ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:501:2: error: 'efc_set_wait_state' was not declared in this scope
  efc_set_wait_state(p_efc, 6);
  ^~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:501:2: note: suggested alternative: 'efc_get_wait_state'
  efc_set_wait_state(p_efc, 6);
  ^~~~~~~~~~~~~~~~~~
  efc_get_wait_state
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:89:31: error: 'IFLASH0_PAGE_SIZE' was not declared in this scope
 # define IFLASH_PAGE_SIZE     IFLASH0_PAGE_SIZE
                               ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:506:30: note: in expansion of macro 'IFLASH_PAGE_SIZE'
   writeSize = Min((uint32_t) IFLASH_PAGE_SIZE - us_offset,
                              ^~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:89:31: note: suggested alternative: 'IFLASH_PAGE_SIZE'
 # define IFLASH_PAGE_SIZE     IFLASH0_PAGE_SIZE
                               ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:506:30: note: in expansion of macro 'IFLASH_PAGE_SIZE'
   writeSize = Min((uint32_t) IFLASH_PAGE_SIZE - us_offset,
                              ^~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:506:15: error: 'Min' was not declared in this scope
   writeSize = Min((uint32_t) IFLASH_PAGE_SIZE - us_offset,
               ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:506:15: note: suggested alternative: 'sin'
   writeSize = Min((uint32_t) IFLASH_PAGE_SIZE - us_offset,
               ^~~
               sin
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:508:3: error: 'compute_address' was not declared in this scope
   compute_address(p_efc, us_page, 0, &ul_page_addr);
   ^~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:508:3: note: suggested alternative: 'ul_address'
   compute_address(p_efc, us_page, 0, &ul_page_addr);
   ^~~~~~~~~~~~~~~
   ul_address
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:534:13: error: 'efc_perform_command' cannot be used as a function
      us_page);
             ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:537:13: error: 'efc_perform_command' cannot be used as a function
      us_page);
             ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_lock(uint32_t, uint32_t, uint32_t*, uint32_t*)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:572:2: error: 'Efc' was not declared in this scope
  Efc *p_efc;
  ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:572:7: error: 'p_efc' was not declared in this scope
  Efc *p_efc;
       ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:91:38: error: 'IFLASH0_LOCK_REGION_SIZE' was not declared in this scope
 # define IFLASH_LOCK_REGION_SIZE     IFLASH0_LOCK_REGION_SIZE
                                      ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:577:4: note: in expansion of macro 'IFLASH_LOCK_REGION_SIZE'
    IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
    ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:91:38: note: suggested alternative: 'IFLASH_LOCK_REGION_SIZE'
 # define IFLASH_LOCK_REGION_SIZE     IFLASH0_LOCK_REGION_SIZE
                                      ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:577:4: note: in expansion of macro 'IFLASH_LOCK_REGION_SIZE'
    IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
    ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:89:31: error: 'IFLASH0_PAGE_SIZE' was not declared in this scope
 # define IFLASH_PAGE_SIZE     IFLASH0_PAGE_SIZE
                               ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:577:30: note: in expansion of macro 'IFLASH_PAGE_SIZE'
    IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
                              ^~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:89:31: note: suggested alternative: 'IFLASH_PAGE_SIZE'
 # define IFLASH_PAGE_SIZE     IFLASH0_PAGE_SIZE
                               ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:577:30: note: in expansion of macro 'IFLASH_PAGE_SIZE'
    IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
                              ^~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:591:2: error: 'translate_address' was not declared in this scope
  translate_address(&p_efc, ul_actual_start, &us_start_page, 0);
  ^~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:591:2: note: suggested alternative: '__emutls_get_address'
  translate_address(&p_efc, ul_actual_start, &us_start_page, 0);
  ^~~~~~~~~~~~~~~~~
  __emutls_get_address
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:596:68: error: 'efc_perform_command' cannot be used as a function
   ul_error = efc_perform_command(p_efc, EFC_FCMD_SLB, us_start_page);
                                                                    ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_unlock(uint32_t, uint32_t, uint32_t*, uint32_t*)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:621:2: error: 'Efc' was not declared in this scope
  Efc *p_efc;
  ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:621:7: error: 'p_efc' was not declared in this scope
  Efc *p_efc;
       ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:91:38: error: 'IFLASH0_LOCK_REGION_SIZE' was not declared in this scope
 # define IFLASH_LOCK_REGION_SIZE     IFLASH0_LOCK_REGION_SIZE
                                      ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:626:4: note: in expansion of macro 'IFLASH_LOCK_REGION_SIZE'
    IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
    ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:91:38: note: suggested alternative: 'IFLASH_LOCK_REGION_SIZE'
 # define IFLASH_LOCK_REGION_SIZE     IFLASH0_LOCK_REGION_SIZE
                                      ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:626:4: note: in expansion of macro 'IFLASH_LOCK_REGION_SIZE'
    IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
    ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:89:31: error: 'IFLASH0_PAGE_SIZE' was not declared in this scope
 # define IFLASH_PAGE_SIZE     IFLASH0_PAGE_SIZE
                               ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:626:30: note: in expansion of macro 'IFLASH_PAGE_SIZE'
    IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
                              ^~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:89:31: note: suggested alternative: 'IFLASH_PAGE_SIZE'
 # define IFLASH_PAGE_SIZE     IFLASH0_PAGE_SIZE
                               ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:626:30: note: in expansion of macro 'IFLASH_PAGE_SIZE'
    IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
                              ^~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:638:2: error: 'translate_address' was not declared in this scope
  translate_address(&p_efc, ul_actual_start, &us_start_page, 0);
  ^~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:638:2: note: suggested alternative: '__emutls_get_address'
  translate_address(&p_efc, ul_actual_start, &us_start_page, 0);
  ^~~~~~~~~~~~~~~~~
  __emutls_get_address
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:644:18: error: 'efc_perform_command' cannot be used as a function
     us_start_page);
                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_is_locked(uint32_t, uint32_t)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:664:2: error: 'Efc' was not declared in this scope
  Efc *p_efc;
  ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:664:7: error: 'p_efc' was not declared in this scope
  Efc *p_efc;
       ^~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:675:2: error: 'translate_address' was not declared in this scope
  translate_address(&p_efc, ul_start, &us_start_page, 0);
  ^~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:675:2: note: suggested alternative: '__emutls_get_address'
  translate_address(&p_efc, ul_start, &us_start_page, 0);
  ^~~~~~~~~~~~~~~~~
  __emutls_get_address
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:91:38: error: 'IFLASH0_LOCK_REGION_SIZE' was not declared in this scope
 # define IFLASH_LOCK_REGION_SIZE     IFLASH0_LOCK_REGION_SIZE
                                      ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:679:27: note: in expansion of macro 'IFLASH_LOCK_REGION_SIZE'
  us_num_pages_in_region = IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
                           ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:91:38: note: suggested alternative: 'IFLASH_LOCK_REGION_SIZE'
 # define IFLASH_LOCK_REGION_SIZE     IFLASH0_LOCK_REGION_SIZE
                                      ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:679:27: note: in expansion of macro 'IFLASH_LOCK_REGION_SIZE'
  us_num_pages_in_region = IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
                           ^~~~~~~~~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:89:31: error: 'IFLASH0_PAGE_SIZE' was not declared in this scope
 # define IFLASH_PAGE_SIZE     IFLASH0_PAGE_SIZE
                               ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:679:53: note: in expansion of macro 'IFLASH_PAGE_SIZE'
  us_num_pages_in_region = IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
                                                     ^~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:89:31: note: suggested alternative: 'IFLASH_PAGE_SIZE'
 # define IFLASH_PAGE_SIZE     IFLASH0_PAGE_SIZE
                               ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:679:53: note: in expansion of macro 'IFLASH_PAGE_SIZE'
  us_num_pages_in_region = IFLASH_LOCK_REGION_SIZE / IFLASH_PAGE_SIZE;
                                                     ^~~~~~~~~~~~~~~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:684:55: error: 'efc_perform_command' cannot be used as a function
  ul_error = efc_perform_command(p_efc, EFC_FCMD_GLB, 0);
                                                       ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:687:34: error: 'efc_get_result' cannot be used as a function
  ul_status = efc_get_result(p_efc);
                                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:690:35: error: 'efc_get_result' cannot be used as a function
   ul_status = efc_get_result(p_efc);
                                   ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:708:36: error: 'efc_get_result' cannot be used as a function
    ul_status = efc_get_result(p_efc);
                                    ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_set_gpnvm(uint32_t)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:83:18: error: 'EFC0' was not declared in this scope
 # define EFC     EFC0
                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:733:39: note: in expansion of macro 'EFC'
  if (EFC_RC_OK == efc_perform_command(EFC, EFC_FCMD_SGPB, ul_gpnvm)) {
                                       ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:83:18: note: suggested alternative: 'EFC'
 # define EFC     EFC0
                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:733:39: note: in expansion of macro 'EFC'
  if (EFC_RC_OK == efc_perform_command(EFC, EFC_FCMD_SGPB, ul_gpnvm)) {
                                       ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:733:67: error: 'efc_perform_command' cannot be used as a function
  if (EFC_RC_OK == efc_perform_command(EFC, EFC_FCMD_SGPB, ul_gpnvm)) {
                                                                   ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_clear_gpnvm(uint32_t)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:83:18: error: 'EFC0' was not declared in this scope
 # define EFC     EFC0
                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:757:39: note: in expansion of macro 'EFC'
  if (EFC_RC_OK == efc_perform_command(EFC, EFC_FCMD_CGPB, ul_gpnvm)) {
                                       ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:83:18: note: suggested alternative: 'EFC'
 # define EFC     EFC0
                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:757:39: note: in expansion of macro 'EFC'
  if (EFC_RC_OK == efc_perform_command(EFC, EFC_FCMD_CGPB, ul_gpnvm)) {
                                       ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:757:67: error: 'efc_perform_command' cannot be used as a function
  if (EFC_RC_OK == efc_perform_command(EFC, EFC_FCMD_CGPB, ul_gpnvm)) {
                                                                   ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_is_gpnvm_set(uint32_t)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:83:18: error: 'EFC0' was not declared in this scope
 # define EFC     EFC0
                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:780:39: note: in expansion of macro 'EFC'
  if (EFC_RC_OK != efc_perform_command(EFC, EFC_FCMD_GGPB, 0)) {
                                       ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:83:18: note: suggested alternative: 'EFC'
 # define EFC     EFC0
                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:780:39: note: in expansion of macro 'EFC'
  if (EFC_RC_OK != efc_perform_command(EFC, EFC_FCMD_GGPB, 0)) {
                                       ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:780:60: error: 'efc_perform_command' cannot be used as a function
  if (EFC_RC_OK != efc_perform_command(EFC, EFC_FCMD_GGPB, 0)) {
                                                            ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:83:18: error: 'EFC0' was not declared in this scope
 # define EFC     EFC0
                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:784:33: note: in expansion of macro 'EFC'
  ul_gpnvm_bits = efc_get_result(EFC);
                                 ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:83:18: note: suggested alternative: 'EFC'
 # define EFC     EFC0
                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:784:33: note: in expansion of macro 'EFC'
  ul_gpnvm_bits = efc_get_result(EFC);
                                 ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:784:36: error: 'efc_get_result' cannot be used as a function
  ul_gpnvm_bits = efc_get_result(EFC);
                                    ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp: In function 'uint32_t flash_read_unique_id(uint32_t*, uint32_t)':
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:83:18: error: 'EFC0' was not declared in this scope
 # define EFC     EFC0
                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:826:47: note: in expansion of macro 'EFC'
  if (FLASH_RC_OK != efc_perform_read_sequence(EFC, EFC_FCMD_STUI,
                                               ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:83:18: note: suggested alternative: 'EFC'
 # define EFC     EFC0
                  ^
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:826:47: note: in expansion of macro 'EFC'
  if (FLASH_RC_OK != efc_perform_read_sequence(EFC, EFC_FCMD_STUI,
                                               ^~~
/Users/ragnarok_macmini/Library/Arduino15/ArduinoBibliotheken/libraries/libraries/libraries/Mega Chess/flash_efc.cpp:827:29: error: 'efc_perform_read_sequence' cannot be used as a function
    EFC_FCMD_SPUI, uid_buf, 4)) {
                             ^

exit status 1

Compilation error: exit status 1

Hi,
It would be good if you posted your complete code so we can see where the errors are referenced to.

Thanks... Tom... :smiley: :+1: :coffee: :australia:

looks like some libraries are missing.
Post the link to the description of the project.
post your complete sketch. The forum software can take 120.000 characters of code

Any use ?

Instructions

It looks like the MegaChess2 sketch is using code for an Arduino DUE. What model Arduino are you compiling for?

I tried downloading the four source files from here:
https://projecthub.arduino.cc/Sergey_Urusov/67ce033a-4696-4dbf-b492-2718896b60c5

Line 1009 of ArduinoMegaChess2.ino is missing a '/' from a comment

I had to switch gui.h from mcufriend480 to adafruit320.

I had to install the Adafruit_TFTLCD library.

Now it compiles with just warnings.


Sketch uses 86852 bytes (34%) of program storage space. Maximum is 253952 bytes.
Global variables use 6309 bytes (77%) of dynamic memory, leaving 1883 bytes for local variables. Maximum is 8192 bytes.

I'll try that right away.
I use a MEGA R3.
My Display from Amazon. .
Since this is a different display than in the project, I modified the gui.h at the beginning with the correct data.

//#define mcufriend480
//#define adafruit320
#define Waveshare_ILI9486

#ifdef Waveshare_ILI9486   
 //(ILI9486 screen 480x320)
 #include <UTFTGLUE.h>
 MCUFRIEND_kbv tft;
   #define screen_width 480 
 #define screen_height 320 
 #define mapx1 980
   #define mapx2 110
 #define mapy1 145
 #define mapy2 902
#endif

#ifdef mcufriend480   
 //(MCUFRIEND screen 480x320)
 #include <UTFTGLUE.h>
 #include <Waveshare_ILI9486.h>
   #define screen_width 480 
 #define screen_height 320 
 #define mapx1 980
   #define mapx2 110
 #define mapy1 145
 #define mapy2 902
#endif

#ifdef   adafruit320
 //(screen 320x240)
 #include <Adafruit_TFTLCD.h> 
 Adafruit_TFTLCD   tft;
 #define screen_width 320 
 #define screen_height 240 
 #define mapx1   930
 #define mapx2 170
 #define mapy1 145
 #define mapy2 914
#endif   

#include "TouchScreen.h"

//And even may be pins definitions will need to change according to manual of your touchscreen

int XP = 6, YP = A1, XM = A2, YM = 7;  
TouchScreen   ts(XP, YP, XM, YM, 300);   
TSPoint tp;  

int touchx,touchy,touched;         
#define   MINPRESSURE 10
#define MAXPRESSURE 1000
#define PinBuzz 44

boolean   rotate=0;
boolean sound=0;
boolean menu=0;
boolean pause=0;
unsigned   long guitime=0;
unsigned long statustime=0;

char poledisp[64]; // 
char   statusbuf1[11],statusbuf2[11],statusbuf3[11];
char status_c1, status_c2;

const   uint8_t fig24[6][72] PROGMEM={
{0x0, 0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,   0x0,  0x0,  0x0,  0x0,  0x0,  0x1E, 0x0,  0x0,  0x3F, 0x0,  0x80, 0x7F, 0x0,  0x80,   0x7F, 0x0,
0x80, 0x7F, 0x0,  0x0,  0x3F, 0x0,  0x0,  0x1C, 0x0,  0x0,  0x1C,   0x0,  0x80, 0xFF, 0x0,  0x80, 0xFF, 0x0,  0x0,  0x1C, 0x0,  0x0,  0x1C, 0x0,
0x0,   0x3E, 0x0,  0x0,  0x7F, 0x0,  0x80, 0xFF, 0x0,  0xC0, 0xFF, 0x1,  0xE0, 0xFF,   0x3,  0xE0, 0xFF, 0x3,  0xE0, 0xFF, 0x3,  0x0,  0x0,  0x0
}, //pawn
{0x0,   0x0,  0x0,  0x0,  0x6E, 0x0,  0x0,  0xFF, 0x0,  0x80, 0xFF, 0x1,  0x80, 0xFF, 0x3,   0xC0, 0xFF, 0x7,  0xE0, 0xFF, 0xF,  0xE0, 0xF9, 0xF,
0xF0, 0xF8, 0xF,  0xF0,   0xF8, 0xF,  0x60, 0xFC, 0xF,  0x0,  0xFE, 0xF,  0x0,  0xFF, 0xF,  0x0,  0xFF, 0x7,   0x0,  0xFF, 0x3,  0x0,  0xFF, 0x1,
0x0,  0xFE, 0x0,  0x0,  0x7C, 0x0,  0x0,   0x38, 0x0,  0x0,  0x38, 0x0,  0x0,  0x7C, 0x0,  0xF0, 0xFF, 0xF,  0xF0, 0xFF,   0xF,  0x0,  0x0,  0x0
}, //knight
{0x0, 0x0,  0x0,  0x0,  0x3C, 0x0,  0x0,   0x7E, 0x0,  0x0,  0x7E, 0x0,  0x0,  0x3C, 0x0,  0x0,  0x18, 0x0,  0x80, 0xFF,   0x1,  0xC0, 0xFF, 0x3,
0xE0, 0xFF, 0x7,  0xE0, 0xFF, 0x7,  0xE0, 0xFF, 0x7,  0xE0,   0xFF, 0x7,  0xE0, 0xFF, 0x7,  0xE0, 0xFF, 0x7,  0xE0, 0xFF, 0x7,  0xE0, 0xFF, 0x7,
0xE0,   0xFF, 0x7,  0xC0, 0xFF, 0x3,  0x80, 0xFF, 0x1,  0x0,  0xFF, 0x0,  0x8,  0x7E, 0x10,   0x1C, 0x3C, 0x38, 0xFE, 0xFF, 0x7F, 0x0,  0x0,  0x0
}, //bishop
{0x0, 0x0,   0x0,  0xF0, 0x3C, 0xF,  0xF0, 0x3C, 0xF,  0xF0, 0xFF, 0xF,  0xE0, 0xFF, 0x7,  0xC0,   0xFF, 0x3,  0xC0, 0xFF, 0x3,  0xC0, 0xFF, 0x3,
0xC0, 0xFF, 0x3,  0xC0, 0xFF,   0x3,  0xC0, 0xFF, 0x3,  0xC0, 0xFF, 0x3,  0xC0, 0xFF, 0x3,  0xC0, 0xFF, 0x3,  0xC0,   0xFF, 0x3,  0xC0, 0xFF, 0x3,
0xC0, 0xFF, 0x3,  0xC0, 0xFF, 0x3,  0xC0, 0xFF,   0x3,  0xC0, 0xFF, 0x3,  0xE0, 0xFF, 0x7,  0xF0, 0xFF, 0xF,  0xF0, 0xFF, 0xF,  0x0,   0x0,  0x0
}, //rook
{0x0, 0x0,  0x0,  0xEE, 0xBD, 0x77, 0xEE, 0xBD, 0x77,   0xC6, 0x18, 0x63, 0xC6, 0x18, 0x63, 0xC6, 0x18, 0x63, 0xCC, 0x18, 0x33, 0xCC, 0x18,   0x33,
0xCC, 0x18, 0x33, 0xCC, 0x18, 0x33, 0xCC, 0x18, 0x33, 0x98, 0x99, 0x19,   0x98, 0x99, 0x19, 0x98, 0x99, 0x19, 0x98, 0x99, 0x19, 0x98, 0x99, 0x19,
0x30,   0xFF, 0xC,  0xB0, 0xFF, 0xD,  0xF0, 0xFF, 0xF,  0xE0, 0xFF, 0x7,  0xE0, 0xFF, 0x7,   0xF0, 0xFF, 0xF,  0xF0, 0xFF, 0xF,  0x0,  0x0,  0x0
}, //queen
{0x0, 0x0,   0x0,  0x0,  0x18, 0x0,  0xF0, 0x18, 0xF,  0xF8, 0x99, 0x1F, 0xFC, 0xDB, 0x3F,   0xFE, 0xFF, 0x7F, 0xFE, 0xFF, 0x7F, 0xFE, 0xFF, 0x7F,
0xFE, 0xFF, 0x7F, 0xFE,   0xFF, 0x7F, 0xFE, 0xFF, 0x7F, 0xFE, 0xFF, 0x7F, 0xFE, 0xFF, 0x7F, 0xFE, 0xFF, 0x3F,   0xFC, 0xFF, 0x1F, 0xF8, 0xFF, 0x1F,
0xF0, 0xFF, 0xF,  0xE0, 0xFF, 0x7,  0xE0,   0xFF, 0x7,  0xC0, 0xFF, 0x3,  0xE0, 0xFF, 0x7,  0xF0, 0xFF, 0xF,  0xF0, 0xFF, 0xF,   0x0,  0x0,  0x0
} //king
};

const uint8_t fig24_cont[6][72] PROGMEM={
{0x0,   0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x1C, 0x0,  0x0,  0x22, 0x0,   0x0,  0x41, 0x0,  0x80, 0x80, 0x0,  0x80, 0x80, 0x0,
0x80, 0x80, 0x0,  0x0,   0x41, 0x0,  0x0,  0x22, 0x0,  0xC0, 0xE3, 0x1,  0x40, 0x0,  0x1,  0x40, 0x0,  0x1,   0xC0, 0xE3, 0x1,  0x0,  0x22, 0x0,
0x0,  0x41, 0x0,  0x80, 0x80, 0x0,  0x40,   0x0,  0x1,  0x20, 0x0,  0x2,  0x10, 0x0,  0x4,  0x10, 0x0,  0x4,  0x10, 0x0,  0x4,   0xF0, 0xFF, 0x7
}, //pawn
{0x0, 0x6E, 0x0,  0x0,  0x91, 0x0,  0x80, 0x0,   0x1,  0x40, 0x2,  0x2,  0x40, 0x0,  0x4,  0x20, 0x0,  0x8,  0x10, 0x0,  0x10,   0x10, 0x6,  0x10,
0x8,  0x5,  0x10, 0x8,  0x5,  0x10, 0x90, 0x2,  0x10, 0x60,   0x1,  0x10, 0x80, 0x0,  0x10, 0x80, 0x0,  0x8,  0x80, 0x0,  0x4,  0x80, 0x0,  0x2,
0x0,   0x1,  0x1,  0x0,  0x82, 0x0,  0x0,  0x44, 0x0,  0x0,  0x44, 0x0,  0xF8, 0x83,   0x1F, 0x8,  0x0,  0x10, 0x8,  0x0,  0x10, 0xF8, 0xFF, 0x1F
}, //knight
{0x0,   0x3C, 0x0,  0x0,  0x42, 0x0,  0x0,  0x81, 0x0,  0x0,  0x81, 0x0,  0x0,  0x42, 0x0,   0x80, 0xE7, 0x1,  0x40, 0x0,  0x2,  0x20, 0x18, 0x4,
0x10, 0x18, 0x8,  0x10,   0x18, 0x8,  0x10, 0x18, 0x8,  0x90, 0xFF, 0x9,  0x90, 0xFF, 0x9,  0x10, 0x18, 0x8,   0x10, 0x18, 0x8,  0x10, 0x18, 0x8,
0x10, 0x18, 0x8,  0x20, 0x18, 0x4,  0x40,   0x18, 0x2,  0x88, 0x0,  0x11, 0x14, 0x81, 0x28, 0xE2, 0xC3, 0x47, 0x1,  0x0,  0x80,   0xFF, 0xFF, 0xFF
}, //bishop
{0xF8, 0x7E, 0x1F, 0x8,  0xC3, 0x10, 0x8,  0xC3,   0x10, 0x8,  0x0,  0x10, 0x10, 0x0,  0x8,  0xE0, 0xFF, 0x7,  0x20, 0x0,  0x4,  0x20,   0x0,  0x4,
0x20, 0x0,  0x4,  0x20, 0x0,  0x4,  0x20, 0x0,  0x4,  0x20, 0x0,  0x4,   0x20, 0x0,  0x4,  0x20, 0x0,  0x4,  0x20, 0x0,  0x4,  0x20, 0x0,  0x4,
0x20,   0x0,  0x4,  0x20, 0x0,  0x4,  0x20, 0x0,  0x4,  0xE0, 0xFF, 0x7,  0x10, 0x0,  0x8,   0x8,  0x0,  0x10, 0x8,  0x0,  0x10, 0xF8, 0xFF, 0x1F
}, //rook
{0xEF, 0xBD,   0xF7, 0x11, 0x42, 0x88, 0x11, 0x42, 0x88, 0x29, 0xA5, 0x94, 0x29, 0xA5, 0x94, 0x29,   0xA5, 0x94, 0x32, 0xA5, 0x4C, 0x32, 0xA5, 0x4C,
0x32, 0xA5, 0x4C, 0x32, 0xA5,   0x4C, 0x32, 0xA5, 0x4C, 0x64, 0x66, 0x26, 0x64, 0x66, 0x26, 0x64, 0x66, 0x26, 0x64,   0x66, 0x26, 0x64, 0x66, 0x26,
0xC8, 0x0,  0x13, 0x48, 0x0,  0x12, 0x8,  0x0,   0x10, 0x10, 0x0,  0x8,  0xF0, 0xFF, 0xF,  0x8,  0x0,  0x10, 0x8,  0x0,  0x10,   0xF8, 0xFF, 0x1F
}, //queen
{0x0, 0x18, 0x0,  0xF0, 0x24, 0xF,  0x8,  0xA5,   0x10, 0x4,  0x66, 0x20, 0x2,  0x24, 0x40, 0x1,  0x24, 0x80, 0x1,  0x18, 0x80, 0x1,   0x18, 0x80,
0x1,  0x18, 0x80, 0x1,  0x18, 0x80, 0x1,  0x18, 0x80, 0x1,  0x18,   0x80, 0x1,  0x18, 0x80, 0x1,  0x18, 0x40, 0x2,  0x18, 0x20, 0x4,  0x18, 0x20,
0xE8,   0xFF, 0x17, 0x10, 0x0,  0x8,  0x10, 0x0,  0x8,  0x20, 0x0,  0x4,  0xF0, 0xFF, 0xF,   0x8,  0x0,  0x10, 0x8,  0x0,  0x10, 0xF8, 0xFF, 0x1F
} //king
};

const   uint8_t fig32[6][128] PROGMEM={
{0x0, 0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,   0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,
0x0,  0x0,  0x0,  0x0,  0x0,   0x0,  0x0,  0x0,  0x0,  0xF0, 0xF,  0x0,  0x0,  0xF8, 0x1F, 0x0,
0x0,  0xFC,   0x3F, 0x0,  0x0,  0xFC, 0x3F, 0x0,  0x0,  0xFC, 0x3F, 0x0,  0x0,  0xF8, 0x1F, 0x0,
0x0,   0xF0, 0xF,  0x0,  0x0,  0xE0, 0x7,  0x0,  0x0,  0xFF, 0xFF, 0x0,  0x0,  0xFF,   0xFF, 0x0,
0x0,  0xFF, 0xFF, 0x0,  0x0,  0xE0, 0x7,  0x0,  0x0,  0xF0, 0xF,  0x0,   0x0,  0xF0, 0xF,  0x0,
0x0,  0xF8, 0x1F, 0x0,  0x0,  0xF8, 0x1F, 0x0,  0x0,   0xFC, 0x3F, 0x0,  0x0,  0xFE, 0x7F, 0x0,
0x0,  0xFE, 0x7F, 0x0,  0x0,  0xFF,   0xFF, 0x0,  0x0,  0xFF, 0xFF, 0x0,  0x80, 0xFF, 0xFF, 0x1,
0x80, 0xFF, 0xFF,   0x1,  0x80, 0xFF, 0xFF, 0x1,  0x80, 0xFF, 0xFF, 0x1,  0x0,  0x0,  0x0,  0x0
},   
{0x0, 0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0xC0, 0xC,  0x0,  0x0,   0xE0, 0x1C, 0x0,
0x0,  0xF8, 0x3F, 0x0,  0x0,  0xFE, 0x7F, 0x0,  0x0,  0xFF,   0xFF, 0x0,  0x80, 0xFF, 0xFF, 0x1,
0xC0, 0xFF, 0xFF, 0x3,  0xE0, 0xFF, 0xFF,   0x7,  0xF0, 0xFF, 0xFF, 0xF,  0xF0, 0xBF, 0xFF, 0x1F,
0xF0, 0x81, 0xFF, 0x1F,   0xE0, 0xC0, 0xFF, 0x1F, 0x0,  0xE0, 0xFF, 0x1F, 0x0,  0xF0, 0xFF, 0x1F,
0x0,   0xF8, 0xFF, 0x1F, 0x0,  0xFC, 0xFF, 0x1F, 0x0,  0xFE, 0xFF, 0xF,  0x0,  0xFE,   0xFF, 0x7,
0x0,  0xFE, 0xFF, 0x1,  0x0,  0xFE, 0xFF, 0x0,  0x0,  0xFE, 0x7F,   0x0,  0x0,  0xFE, 0x3F, 0x0,
0x0,  0xFE, 0x1F, 0x0,  0x0,  0xFC, 0x1F, 0x0,  0x0,   0xF8, 0xF,  0x0,  0x0,  0xF0, 0xF,  0x0,
0x0,  0xFF, 0xFF, 0x0,  0x80, 0xFF,   0xFF, 0x1,  0x80, 0xFF, 0xFF, 0x1,  0x0,  0x0,  0x0,  0x0
}, {
0x0,  0x0,   0x0,  0x0,  0x0,  0xE0, 0x7,  0x0,  0x0,  0xF0, 0xF,  0x0,  0x0,  0xF8, 0x1F,   0x0,
0x0,  0xFC, 0x3F, 0x0,  0x0,  0xF8, 0x1F, 0x0,  0x0,  0xF0, 0xF,  0x0,  0x0,   0xE0, 0x7,  0x0,
0x0,  0xFE, 0x7F, 0x0,  0x0,  0xFF, 0xFF, 0x0,  0x80, 0xFF,   0xFF, 0x1,  0x80, 0xFF, 0xFF, 0x1,
0x80, 0xFF, 0xFF, 0x1,  0x80, 0xFF, 0xFF,   0x1,  0x80, 0xFF, 0xFF, 0x1,  0x80, 0xFF, 0xFF, 0x1,
0x80, 0xFF, 0xFF, 0x1,  0x80,   0xFF, 0xFF, 0x1,  0x80, 0xFF, 0xFF, 0x1,  0x80, 0xFF, 0xFF, 0x1,
0x80, 0xFF,   0xFF, 0x1,  0x80, 0xFF, 0xFF, 0x1,  0x80, 0xFF, 0xFF, 0x1,  0x0,  0xFF, 0xFF, 0x0,
0x0,   0xFE, 0x7F, 0x0,  0x0,  0xFC, 0x3F, 0x0,  0x20, 0xF8, 0x1F, 0x4,  0x70, 0xF0,   0xF,  0xE,
0xF8, 0xFF, 0xFF, 0x1F, 0xF8, 0xFF, 0xFF, 0x1F, 0xF8, 0xFF, 0xFF,   0x1F, 0x0,  0x0,  0x0,  0x0
}, {
 0x0, 0x0,  0x0,  0x0,  0xE0, 0xE3, 0xC7,   0x7,  0xE0, 0xE3, 0xC7, 0x7,  0xE0, 0xE3, 0xC7, 0x7,
0xE0, 0xFF, 0xFF, 0x7,  0xE0,   0xFF, 0xFF, 0x7,  0xE0, 0xFF, 0xFF, 0x7,  0xC0, 0xFF, 0xFF, 0x3,
0x80, 0xFF,   0xFF, 0x1,  0x0,  0xFF, 0xFF, 0x0,  0x0,  0xFF, 0xFF, 0x0,  0x0,  0xFF, 0xFF, 0x0,
0x0,   0xFF, 0xFF, 0x0,  0x0,  0xFF, 0xFF, 0x0,  0x0,  0xFF, 0xFF, 0x0,  0x0,  0xFF,   0xFF, 0x0,
0x0,  0xFF, 0xFF, 0x0,  0x0,  0xFF, 0xFF, 0x0,  0x0,  0xFF, 0xFF,   0x0,  0x0,  0xFF, 0xFF, 0x0,
0x0,  0xFF, 0xFF, 0x0,  0x0,  0xFF, 0xFF, 0x0,  0x0,   0xFF, 0xFF, 0x0,  0x0,  0xFF, 0xFF, 0x0,
0x80, 0xFF, 0xFF, 0x1,  0xC0, 0xFF,   0xFF, 0x3,  0xE0, 0xFF, 0xFF, 0x7,  0xF0, 0xFF, 0xFF, 0xF,
0xF0, 0xFF, 0xFF,   0xF,  0xF0, 0xFF, 0xFF, 0xF,  0xF0, 0xFF, 0xFF, 0xF,  0x0,  0x0,  0x0,  0x0
},   {
0x0,  0x0,  0x0,  0x0,  0x0,  0x80, 0x1,  0x0,  0x0,  0xC6, 0x63, 0x0,  0x0,   0xCF, 0xF3, 0x0,
0xC,  0x8F, 0xF1, 0x30, 0x1E, 0x86, 0x61, 0x78, 0x1E, 0xC6,   0x63, 0x78, 0xC,  0xCF, 0xF3, 0x30,
0xC,  0xCF, 0xF3, 0x30, 0x1E, 0xCF, 0xF3,   0x78, 0x1E, 0xCF, 0xF3, 0x78, 0x1C, 0xCF, 0xF3, 0x38,
0x3C, 0x8E, 0x71, 0x3C,   0x3C, 0xCE, 0x73, 0x3C, 0x38, 0xEE, 0x77, 0x1C, 0x38, 0xFE, 0x7F, 0x1E,
0x38,   0xFF, 0xFF, 0x1E, 0x78, 0xFF, 0xFF, 0x1E, 0xF0, 0xFF, 0xFF, 0xF,  0xF0, 0xFF, 0xFF,   0xF,
0xF0, 0xFF, 0xFF, 0xF,  0xF0, 0xFF, 0xFF, 0xF,  0xF0, 0xFF, 0xFF, 0x7,  0xE0,   0xFF, 0xFF, 0x7,
0xC0, 0xFF, 0xFF, 0x3,  0xC0, 0xFF, 0xFF, 0x3,  0x80, 0xFF,   0xFF, 0x1,  0x0,  0xFF, 0xFF, 0x0,
0x0,  0xFF, 0xFF, 0x0,  0x80, 0xFF, 0xFF,   0x1,  0x80, 0xFF, 0xFF, 0x1,  0x0,  0x0,  0x0,  0x0
}, {
0x0,  0x0,  0x0,   0x0,  0x0,  0x80, 0x1,  0x0,  0x0,  0xC0, 0x3,  0x0,  0x0,  0xC0, 0x3,  0x0,
0xE0,   0x81, 0x81, 0x7,  0xF8, 0x87, 0xE1, 0x1F, 0xFC, 0xCF, 0xF3, 0x3F, 0xFE, 0xDF, 0xFB,   0x7F,
0xFE, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0x7F,   0xFE, 0xFF, 0xFF, 0x7F,
0xFE, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0x7F, 0xFE,   0xFF, 0xFF, 0x7F, 0xFE, 0xFF, 0xFF, 0x7F,
0xFE, 0xFF, 0xFF, 0x7F, 0xFE, 0xFF,   0xFF, 0x7F, 0xFC, 0xFF, 0xFF, 0x3F, 0xF8, 0xFF, 0xFF, 0x1F,
0xF8, 0xFF, 0xFF,   0x1F, 0xF0, 0xFF, 0xFF, 0xF,  0xF0, 0xFF, 0xFF, 0xF,  0xE0, 0xFF, 0xFF, 0x7,
0xC0,   0xFF, 0xFF, 0x3,  0xC0, 0xFF, 0xFF, 0x3,  0x80, 0xFF, 0xFF, 0x1,  0x0,  0xFF, 0xFF,   0x0,
0x0,  0xFF, 0xFF, 0x0,  0x80, 0xFF, 0xFF, 0x1,  0x80, 0xFF, 0xFF, 0x1,  0x0,   0x0,  0x0,  0x0
}
};

const uint8_t fig32_cont[6][128] PROGMEM={
{0x0,   0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,  0x0,   0x0,
0x0,  0x0,  0x0,  0x0,  0x0,  0xF0, 0xF,  0x0,  0x0,  0x8,  0x10, 0x0,   0x0,  0x4,  0x20, 0x0,
0x0,  0x2,  0x40, 0x0,  0x0,  0x2,  0x40, 0x0,  0x0,   0x2,  0x40, 0x0,  0x0,  0x4,  0x20, 0x0,
0x0,  0x8,  0x10, 0x0,  0x80, 0x1F,   0xF8, 0x1,  0x80, 0x0,  0x0,  0x1,  0x80, 0x0,  0x0,  0x1,
0x80, 0x0,  0x0,  0x1,   0x80, 0x1F, 0xF8, 0x1,  0x0,  0x8,  0x10, 0x0,  0x0,  0x8,  0x10, 0x0,
0x0,   0x4,  0x20, 0x0,  0x0,  0x4,  0x20, 0x0,  0x0,  0x2,  0x40, 0x0,  0x0,  0x1,  0x80,   0x0,
0x0,  0x1,  0x80, 0x0,  0x80, 0x0,  0x0,  0x1,  0x80, 0x0,  0x0,  0x1,  0x40,   0x0,  0x0,  0x2,
0x40, 0x0,  0x0,  0x2,  0x40, 0xFF, 0xFF, 0x2,  0x40, 0x0,  0x0,   0x2,  0xC0, 0xFF, 0xFF, 0x3
}, {
0x0,  0x0,  0x0,  0x0,  0x0,  0xC0, 0xC,   0x0,  0x0,  0x20, 0x13, 0x0,  0x0,  0x18, 0x23, 0x0,
0x0,  0x6,  0x60, 0x0,   0x0,  0x19, 0x90, 0x0,  0x80, 0x18, 0x88, 0x1,  0x40, 0x0,  0x40, 0x2,
0x20,   0x0,  0x20, 0x6,  0x10, 0x0,  0x0,  0x9,  0x8,  0x0,  0x80, 0x18, 0x8,  0x40, 0x0,   0x24,
0x8,  0x7E, 0x0,  0x22, 0x10, 0x21, 0x0,  0x20, 0xE0, 0x10, 0x0,  0x20,   0x0,  0x8,  0x0,  0x20,
0x0,  0x4,  0x0,  0x20, 0x0,  0x2,  0x0,  0x20, 0x0,   0x1,  0x0,  0x10, 0x0,  0x1,  0x0,  0x8,
0x0,  0x1,  0x0,  0x6,  0x0,  0x1,   0x0,  0x1,  0x0,  0x1,  0x80, 0x0,  0x0,  0x1,  0x40, 0x0,
0x0,  0x1,  0x20,   0x0,  0x0,  0x2,  0x20, 0x0,  0x0,  0x4,  0x10, 0x0,  0x0,  0xF,  0xF0, 0x0,
0x80,   0x0,  0x0,  0x1,  0x40, 0xFF, 0xFF, 0x2,  0x40, 0x0,  0x0,  0x2,  0xC0, 0xFF, 0xFF,   0x3
}, {
0x0,  0xE0, 0x7,  0x0,  0x0,  0x10, 0x8,  0x0,  0x0,  0x8,  0x10,   0x0,  0x0,  0x4,  0x20, 0x0,
0x0,  0x2,  0x40, 0x0,  0x0,  0x4,  0x20, 0x0,  0x0,   0x8,  0x10, 0x0,  0x0,  0x1E, 0x78, 0x0,
0x0,  0x1,  0x80, 0x0,  0x80, 0x80,   0x1,  0x1,  0x40, 0x80, 0x1,  0x2,  0x40, 0x80, 0x1,  0x2,
0x40, 0x80, 0x1,  0x2,   0x40, 0x80, 0x1,  0x2,  0x40, 0x80, 0x1,  0x2,  0x40, 0xFE, 0x7F, 0x2,
0x40,   0xFE, 0x7F, 0x2,  0x40, 0xFE, 0x7F, 0x2,  0x40, 0x80, 0x1,  0x2,  0x40, 0x80, 0x1,   0x2,
0x40, 0x80, 0x1,  0x2,  0x40, 0x80, 0x1,  0x2,  0x40, 0x80, 0x1,  0x2,   0x80, 0x80, 0x1,  0x1,
0x0,  0x81, 0x81, 0x0,  0x20, 0x82, 0x41, 0x4,  0x50,   0x4,  0x20, 0xA,  0x88, 0xF,  0xF0, 0x11,
0x4,  0x0,  0x0,  0x20, 0x4,  0x0,   0x0,  0x20, 0x4,  0x0,  0x0,  0x20, 0xFC, 0xFF, 0xFF, 0x3F
}, {
0xF0,  0xF7,   0xEF, 0xF,  0x10, 0x14, 0x28, 0x8,  0x10, 0x14, 0x28, 0x8,  0x10, 0x1C, 0x38, 0x8,
0x10,   0x0,  0x0,  0x8,  0x90, 0x81, 0x81, 0x9,  0x90, 0xFF, 0xFF, 0x9,  0x20, 0x0,  0x0,   0x4,
0x40, 0x0,  0x0,  0x2,  0x80, 0x0,  0x0,  0x1,  0x80, 0x0,  0x0,  0x1,   0x80, 0x0,  0x0,  0x1,
0x80, 0x0,  0x0,  0x1,  0x80, 0x0,  0x0,  0x1,  0x80,   0x0,  0x0,  0x1,  0x80, 0x0,  0x0,  0x1,
0x80, 0x0,  0x0,  0x1,  0x80, 0x0,  0x0,   0x1,  0x80, 0x0,  0x0,  0x1,  0x80, 0x0,  0x0,  0x1,
0x80, 0x0,  0x0,  0x1,   0x80, 0x0,  0x0,  0x1,  0x80, 0x0,  0x0,  0x1,  0x80, 0x0,  0x0,  0x1,
0x40,   0xFE, 0x7F, 0x2,  0x20, 0x0,  0x0,  0x4,  0x10, 0x0,  0x0,  0x8,  0x8,  0x0,  0x0,   0x10,
0xE8, 0xFF, 0xFF, 0x17, 0x8,  0x0,  0x0,  0x10, 0x8,  0x0,  0x0,  0x10,   0xF8, 0xFF, 0xFF, 0x1F
}, {
0x0,  0x80, 0x1,  0x0,  0x0,  0x46, 0x62, 0x0,   0x0,  0x29, 0x94, 0x0,  0x8C, 0x30, 0xC,  0x31,
0x92, 0x50, 0xA,  0x49, 0x21,   0x49, 0x92, 0x84, 0x21, 0x29, 0x94, 0x84, 0x92, 0x30, 0xC,  0x49,
0x92, 0x30,   0xC,  0x49, 0xA1, 0x30, 0xC,  0x85, 0xA1, 0x30, 0xC,  0x85, 0xA2, 0x30, 0xC,  0x45,
0x42,   0x51, 0x8A, 0x42, 0x42, 0x31, 0x8C, 0x42, 0x44, 0x11, 0x88, 0x22, 0x44, 0x1,  0x80,   0x21,
0xC4, 0x0,  0x0,  0x21, 0x84, 0x0,  0x0,  0x21, 0x8,  0xE0, 0x7,  0x10,   0x8,  0x1E, 0x78, 0x10,
0xC8, 0x1,  0x80, 0x13, 0x8,  0x80, 0x1,  0x10, 0x8,   0xC2, 0x43, 0x8,  0x10, 0x87, 0xE1, 0x8,
0x20, 0x2,  0x40, 0x4,  0x20, 0x0,   0x0,  0x4,  0x40, 0x0,  0x0,  0x2,  0x80, 0x0,  0x0,  0x1,
0x80, 0xFE, 0x7F,   0x1,  0x40, 0x0,  0x0,  0x2,  0x40, 0x0,  0x0,  0x2,  0xC0, 0xFF, 0xFF, 0x3  
},   {
 0x0, 0x80, 0x1,  0x0,  0x0,  0x40, 0x2,  0x0,  0x0,  0x20, 0x4,  0x0,  0xE0,   0x21, 0x84, 0x7,
0x18, 0x46, 0x62, 0x18, 0x4,  0x48, 0x12, 0x20, 0x2,  0x30,   0xC,  0x40, 0x1,  0x30, 0xC,  0x80,
0x1,  0x60, 0x6,  0x80, 0x1,  0xC0, 0x3,   0x80, 0x1,  0x80, 0x1,  0x80, 0x1,  0x80, 0x1,  0x80,
0x1,  0x80, 0x1,  0x80,   0x1,  0x80, 0x1,  0x80, 0x1,  0x80, 0x1,  0x80, 0x1,  0x80, 0x1,  0x80,
0x1,   0x80, 0x1,  0x80, 0x1,  0x80, 0x1,  0x80, 0x2,  0x80, 0x1,  0x40, 0x4,  0x80,   0x1,  0x20,
0x4,  0x80, 0x1,  0x20, 0x8,  0xE0, 0x7,  0x10, 0x8,  0x1C, 0x38,   0x10, 0xD0, 0x3,  0xC0, 0xB,
0x20, 0x80, 0x1,  0x4,  0x20, 0xC6, 0x63, 0x4,  0x40,   0x80, 0x1,  0x2,  0x80, 0x0,  0x0,  0x1,
0x80, 0xFE, 0x5F, 0x1,  0x40, 0x0,  0x0,   0x2,  0x40, 0x0,  0x0,  0x2,  0xC0, 0xFF, 0xFF, 0x3
}
};

uint16_t   BLACK,BLUE,RED,GREEN,CYAN,MAGENTA,YELLOW,WHITE,GRAY,DARK,GRAY2,BLACKF,WHITEF;

//**********************************   
class Button {
public:
int bx,by,bw,bh,bshift;
String bs;
const   uint8_t* bp;
 Button(int x,int y,int w,int h,int x1,int y1,int w1,int h1,String   s,const uint8_t* p, int shift);
 void Show(int shift); 
 void Show(String   s); 
 void Hide();
 boolean IsPressed();
private:
boolean active;
   void ishow(uint16_t textcolor,uint16_t backcolor);
};
Button::Button(int x,int   y,int w,int h,int x1,int y1,int w1,int h1,String s,const uint8_t* p=NULL, int shift=0)   {
  if (screen_height==320) {
   bx=x; by=y; bw=w; bh=h; 
  } else {
    bx=x1; by=y1; bw=w1; bh=h1;  
  }
  bs=s; bp=p; bshift=shift;
};
void   Button::Show(int shift=0) {
 bshift=shift; 
 active=true;
 ishow(WHITE,DARK);   
};
void Button::Show(String s) {
 bs=s; 
 active=true;
 ishow(WHITE,DARK);   
};
void Button::Hide() { 
 active=false; 
 ishow(GRAY,DARK);  
};
boolean   Button::IsPressed() {  
  if (active&&abs(bx+bw/2-touchx)<bw/2&&abs(by+bh/2-touchy)<bh/2)   {
    ishow(WHITE,GRAY); 
    touchx=0; touchy=0;        
    return true;
   } 
  return false;
};  
void Button::ishow(uint16_t textcolor,uint16_t   backcolor) {  
  tft.fillRoundRect(bx+2,by+2,bw,bh,3,GRAY2);               
   tft.fillRoundRect(bx,by,bw,bh,3,backcolor);               
  tft.setTextColor(textcolor);
   if (screen_height==320) {
   tft.setTextSize(2);    
   tft.setCursor(bx+(bw-bs.length()*12)/2,by+(bh-12)/2);        
  }  else {
   tft.setTextSize(1);    
   tft.setCursor(bx+(bw-bs.length()*6)/2,by+(bh-8)/2);            
  }
  if (bp!=NULL) { 
   tft.drawBitmap(1+bx+(bw-16)/2, by+(bh-16)/2,   bp+bshift*32, 16, 16,textcolor);          
  } 
  else  tft.print(bs);    
}

Button   BAction(354, 280, 100, 30, 252, 210, 60, 20, "START");
Button BMenu(354, 20,   100, 30, 252, 20, 60, 20, "MENU");
Button BBack(354, 58, 100, 30, 252, 47,   60, 20, "BACK");
Button BTime(354, 96, 100, 30, 252, 74, 60, 20, "5 s");
Button   BNew(354, 134, 100, 30, 252, 101, 60, 20, "NEW");
Button BAuto(354, 172, 100,   30, 252, 128, 60, 20, "AUTO:B");
Button BRotate(354, 210, 100, 30, 252, 155,   60, 20, "ROTATE");
Button BSave(354, 248, 100, 30, 252, 182, 60, 20, "SAVE");
Button   BLoad(354, 286, 100, 30, 252, 209, 60, 20, "LOAD");

//**********************************   
void drawBitmap(int16_t x, int16_t y,
            const uint8_t *bitmap,   int16_t w, int16_t h,
            uint16_t color) {
  int16_t i, j, byteWidth   = (w + 7) / 8;  
  for(j=0; j<h; j++) {
    for(i=0; i<w; i++ ) {      
         if(pgm_read_byte(bitmap + j * byteWidth + i / 8) & (1 << (i % 8))) {        
         tft.drawPixel(x+i, y+j, color);
      }      
    }
  }
}
//****************************
uint16_t   getColor(uint8_t red, uint8_t green, uint8_t blue)
{
  red   >>= 3;
  green   >>= 2;
  blue  >>= 3;
  return (red << 11) | (green << 5) | blue;
}
//****************************
void   show_fig(int c) {
uint16_t colorf,color,color_cont;  
   colorf=BLACKF;   
    int i=column[c]-1; 
   int j=8-row[c];
   if ((i+j+2)%2==0) colorf=WHITEF;            
   int jj=j, ii=i;
   if (rotate) { jj=7-j; ii=7-i; }   
   color=BLACK;   color_cont=getColor(128,128,100); 
   if (pole[c]>0) { color=WHITE; color_cont=BLACK;   }
   if (screen_height==320) {
    tft.fillRect(ii*39+10,jj*39,39,39,colorf);     
    tft.drawRect(ii*39+10,jj*39,39,39,GRAY);  
    if (pole[c]!=0) {
      drawBitmap(ii*39+14, jj*39+5,&fig32[abs(pole[c])-1][0], 32, 32,color);          
      drawBitmap(ii*39+14, jj*39+5,&fig32_cont[abs(pole[c])-1][0], 32, 32,color_cont);                  
    }
   } else { //height 240
    tft.fillRect(ii*28+12,jj*28,29,29,colorf);     
    tft.drawRect(ii*28+12,jj*28,29,29,GRAY);  
    if (pole[c]!=0) {
      drawBitmap(ii*28+14, jj*28+3,&fig24[abs(pole[c])-1][0], 24, 24,color);          
      drawBitmap(ii*28+14, jj*28+3,&fig24_cont[abs(pole[c])-1][0], 24, 24,color_cont);                  
    } 
   }
}
//****************************
void   show_color() { 
int posx, posyw, posyb, rad;  
if (screen_height==320) {  
   posx=334; posyw=290; posyb=24; rad=5;   
 } else { //240
  posx=244; posyw=214;   posyb=20; rad=4;
 }
 if (rotate) { int r=posyb; posyb=posyw; posyw=r; }
   tft.fillCircle(posx,posyb,rad,BLACK); tft.fillCircle(posx,posyw,rad,BLACK);
   if (pos[0].w) tft.fillCircle(posx,posyw,rad,GRAY); else  tft.drawCircle(posx,posyb,rad,GRAY);   
 uint16_t col=BLACK;
 int r2=rad*2;
 if (autow) col=DARK;
 tft.drawRect(posx-rad,posyw+r2,r2,r2,col);   
 col=BLACK;
 if (autob) col=DARK;
 tft.drawRect(posx-rad,posyb+r2,r2,r2,col);   
} 
//****************************
void show_board() { 
  for (int i=0;i<64;i++)   { 
    if (poledisp[i]!=pole[i]) show_fig(i);      
    poledisp[i]=pole[i];
   }
  show_color();   
}
//****************************
void border()   {
  tft.setTextColor(GRAY,BLACK);
  tft.setTextSize(1);  
  if (screen_height==320)   {
   for (int j=1;j<9;j++) {
    tft.setCursor(1,j*39-22);  
    if (rotate)   tft.print(j); else tft.print(9-j);
   }
   for (byte i=1;i<9;i++) { 
    tft.setCursor(i*39-11,312);     
    if (rotate) tft.print(char(96+9-i)); else tft.print(char(96+i));  
    }               
  } else { //240      
   for (int j=1;j<9;j++) {
     tft.setCursor(2,j*28-15);  
    if (rotate) tft.print(j); else tft.print(9-j);
    }
   for (byte i=1;i<9;i++) { 
    tft.setCursor(i*28-1,228);    
    if   (rotate) tft.print(char(96+9-i)); else tft.print(char(96+i));  
   }                 
   }
}
//****************************
void cleardisplayboard() {
  for   (int i=0;i<64;i++) poledisp[i]=-100; //          
}
//****************************
void   initboard() {        
  cleardisplayboard();
  tft.fillScreen(BLACK);        
   border();    
  tft.setTextSize(1);  
  if (screen_height==320) {  
    tft.setCursor(337,1);  tft.setTextColor(WHITE);    
   tft.print(F("Arduino   Mega Chess II"));     
  } else { //240   
   tft.setCursor(242,1); tft.setTextColor(WHITE);       
   tft.print(F("Arduino Mega"));  
   tft.setCursor(252,10);
    tft.print(F("Chess II"));  
  }
}
//****************************
void   show_steps() {
  if (screen_height==320) {
   tft.fillRect(330,56,135,150,GRAY2);                
  }
   else {
   tft.fillRect(240,44,74,114,GRAY2);               
   } 
  tft.setTextColor(GRAY);    
  tft.setTextSize(2);    
  int st=0;   
  if (ply>8) st=ply-8;
  if (st<0) st=0;    
  for (int i=st;i<ply;i++)   {
    if (i%2==0) {
     tft.setTextSize(1);   
     if (screen_height==320)    
      tft.setCursor(332,(i-st)*18+64);    
     else 
      tft.setCursor(244,(i-st)*14+48);     
     tft.print(String(i/2+1)+".");
    }
    if (screen_height==320)   {  
     tft.setTextSize(2);    
     tft.setCursor(360,(i-st)*18+60);    
     } else {
     tft.setTextSize(1);    
     tft.setCursor(268,(i-st)*14+48);     
    }       
    tft.print(str_step(steps[i])); 
  }
  
  
     
}
//****************************
void definecolors() {
 BLACK  =0x0000;
   BLUE   =0x07FF;  //0x001F;
 RED    =0xF800;
 GREEN  =0x07E0;
 CYAN   =0x07FF;
   MAGENTA=0xF81F;
 YELLOW =0xFFE0;
 WHITE  =0xFFFF;
 GRAY   =0x7BEF;
   DARK   =getColor(32,32,32); 
 GRAY2   =getColor(16,16,16); 
 BLACKF  =getColor(94,58,0);   
 WHITEF  =getColor(180,114,0); 
}
//****************************
void   beep(int leng) {
  analogWrite(PinBuzz, 20);
  delay(2); 
  if (!sound)   analogWrite(PinBuzz, 0);  
  delay(leng); 
  analogWrite(PinBuzz, 0);   
}   
//****************************
void guistart() {
  tft.reset();  
   tft.begin(tft.readID()); 
  tft.setRotation(1);     
  definecolors();
   initboard();
  BAction.Show("START");
  BMenu.Show("MENU");    
   show_board();
}  
//****************************  
String get_time(int   tim) {  
  char sz[10];        
  //sprintf(sz, "%02d:%02d:%02d", tim/3600,(tim%3600)/60,tim%60);       
  sprintf(sz, "%d:%02d",tim/60,tim%60);      
  String s=sz; s.trim();
   return String(sz);
}
//****************************
void clearstatus()   {
  if (screen_height==320) {
    tft.fillRect(330,210,135,60,GRAY2);             
   } else {
    tft.fillRect(242,169,70,36,GRAY2);             
  }
  for   (int j=0;j<11;j++) { statusbuf1[j]=' '; statusbuf2[j]=' '; statusbuf3[j]=' '; }   
  guitime=millis();
  statustime=guitime;
  status_c1=-1;
  status_c2=-1;
}
//****************************
void   print_changed(String s, char* b, uint16_t c) {
  for (int i=0;i<11;i++) {
     if (b[i]!=s[i]) {     
     tft.setTextColor(c,GRAY2);
     tft.print(s[i]);   
    } else {     
     tft.setTextColor(GRAY2,GRAY2);
     tft.print("   "); 
    }
    b[i]=s[i];
  }  
}
//****************************
void   status_step(char c,byte show,uint16_t col=0) {
uint16_t color,color2;  
  if   (c<0||c>63) return;
  color=BLACKF;   
  int i=column[c]-1; 
  int j=8-row[c];   
  if ((i+j+2)%2==0) color=WHITEF;           
  color2=GRAY;   
  if   (show) { color=col; color2=color; }
  int jj=j, ii=i;
  if (rotate) { jj=7-j;   ii=7-i; }     
  if (screen_height==320) {
   tft.drawRect(ii*39+10,jj*39,39,39,color2);         
   tft.drawRect(ii*39+11,jj*39+1,37,37,color);        
  } else {   //height 240
   tft.drawRect(ii*28+12,jj*28,29,29,color2);    
   tft.drawRect(ii*28+13,jj*28+1,27,27,color);     
  }       
}
//****************************
void showstatus(String   s1, String s2, String s3, uint16_t c1=GRAY, uint16_t c2=GRAY, uint16_t c3=GRAY)   {  
  tft.setTextWrap(1);
  tft.setTextColor(GRAY);    
  if (screen_height==320)   {
   tft.setTextSize(2);      
   tft.setCursor(334,213); print_changed(s1,statusbuf1,c1);
    tft.setCursor(334,233); print_changed(s2,statusbuf2,c2);
   tft.setCursor(334,253);   print_changed(s3,statusbuf3,c3);
  } else {
   tft.setTextSize(1);      
    tft.setCursor(244,172); print_changed(s1,statusbuf1,c1);
   tft.setCursor(244,184);   print_changed(s2,statusbuf2,c2);
   tft.setCursor(244,196); print_changed(s3,statusbuf3,c3);
   }  
  if (status_c1!=pos[0].cut.c1||status_c2!=pos[0].cut.c2) {
    if (status_c1!=-1)   { status_step(status_c1,0); status_step(status_c2,0); }
    status_c1=pos[0].cut.c1;
     status_c2=pos[0].cut.c2;
    status_step(status_c1,1,getColor(220,0,0));
     status_step(status_c2,1,getColor(0,180,0));
   }
}
//****************************
boolean   gettouch() {
  //digitalWrite(13, HIGH);
  tp = ts.getPoint();
  //digitalWrite(13,   LOW);   
  // if sharing pins, you'll need to fix the directions of the touchscreen   pins  
  pinMode(XM, OUTPUT);  
  pinMode(YP, OUTPUT);      
  int x=map(tp.y,mapx1,mapx2,0,screen_width-1);
   int y=map(tp.x,mapy1,mapy2,0,screen_height-1);
  touched=0;
  if ((abs(x-touchx)>5||abs(y-touchy)>5)&&tp.z>MINPRESSURE&&tp.z<MAXPRESSURE)   {    
    touched=1;  
    touchx=x;
    touchy=y; 
    //tft.drawPixel(x,y,GREEN);
     //Serial.println(tp.y);
    //Serial.println(tp.x);
  }
  return touched;     
}
//****************************
void erasestatus() {
  if (status_c1>-1)   status_step(status_c1,0); 
  if (status_c2>-1) status_step(status_c2,0);
   status_c1=-1;  
  status_c2=-1;         
}
//**********************************    
signed char field_pressed() {
 signed char c;
 if (screen_height==320)   {
  c=(touchx-10)/39+8*(touchy/39);    
 } else {
  c=(touchx-10)/28+8*(touchy/28);    
 }
 if (c<0||c>63) c=-1; else if (rotate) c=63-c;
 if (c!=-1&&status_c1==-1)   
  if ((pos[0].w&&pole[c]<=0)||(!pos[0].w&&pole[c]>=0)) c=-1;
 if (c!=-1&&status_c1!=-1&&c==status_c1)   c=-1;  
 //Serial.println(c);
 return c;
}
//****************************
void   clearmenu() {
 if (screen_height==320) {
   tft.fillRect(330,56,135,220,BLACK);                
   tft.fillRect(350,276,115,43,BLACK);               
  }   else {
   tft.fillRect(240,40,80,166,BLACK);               
   tft.fillRect(250,206,69,33,BLACK);                
  }   
}
//****************************  

But I have now run through the gui.h again and there are already many errors.
I think I'll leave chess, I still don't know enough for that...

Thank you all very much.

Why are you declaring 'tft' as an "MCUFRIEND_kbv" object?

Look at the examples that came with the "Waveshare_ILI9486" library to see what type the object should be. Usually, it would be something like this:
ILI9486 tft;

Thanks for your help, especially to johnwasser!
Fixed the error. Unfortunately the chess is still not working.
Unfortunately I have to admit defeat. I just don't know enough about programming the Arduino. I'm really overwhelmed by this. I have now programmed a test program that works with my hardware. So the TFT works normally. I will now familiarize myself even more with the world of the Arduino IDE and later try to get the chess to work. It doesn't seem to make sense to me at the moment, and my English isn't that good either.
So thanks everyone and maybe the chess will work out and then I'll post it here!

  #define Waveshare_ILI9486
//#define mcufriend480
//#define adafruit320

#ifdef Waveshare_ILI9486   
 //(ILI9486 screen 480x320)
 #include <Waveshare_ILI9486.h>
Waveshare_ILI9486  tft;
   #define screen_width 480 
 #define screen_height 320 
 #define mapx1 980
   #define mapx2 110
 #define mapy1 145
 #define mapy2 902
#endif

Recreating a chess program with a different screen and a different microcontroller is a challenge for an experienced programmer (depending on how portable and well written the code is).
Not recommended for a newbie...

You can't use the same name in both places.

Try:

#define waveshare480
#ifdef waveshare480

Unfortunately you are right!
Nevertheless I was able to learn something thanks to the forum, even if the project fails in the end.

1 Like

Very true. If you have the stamina to ask specific questions the project will be 101% sure a success. As long as the users here can see that your knoweldge grows you can ask hundreds of questions and each and every question will be answered.

best regards Stefan

You could if it looked like this:

#define Waveshare_ILI9486 Waveshare_ILI9486

Then it'll get expanded to itself at compile time and can be used in an #ifdef directive.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.