Trouble compiling
Hi there, Really great work. I'm trying to do exactly this with an ESP32 and an IT8951 board. When I compile this I get a bunch of error messages. Any guidance on where I might be going wrong? I'm new to arduino so I really appreciate your help.
Thank you in advance.
Error code:
it8951:513:25: error: variable or field 'IT8951LoadImgStart' declared void
void IT8951LoadImgStart(IT8951LdImgInfo pstLdImgInfo)
^
it8951:513:25: error: 'IT8951LdImgInfo' was not declared in this scope
it8951:528:29: error: variable or field 'IT8951LoadImgAreaStart' declared void
void IT8951LoadImgAreaStart(IT8951LdImgInfo* pstLdImgInfo ,IT8951AreaImgInfo* pstAreaImgInfo)
^
it8951:528:29: error: 'IT8951LdImgInfo' was not declared in this scope
it8951:528:46: error: 'pstLdImgInfo' was not declared in this scope
void IT8951LoadImgAreaStart(IT8951LdImgInfo* pstLdImgInfo ,IT8951AreaImgInfo* pstAreaImgInfo)
^
it8951:528:60: error: 'IT8951AreaImgInfo' was not declared in this scope
void IT8951LoadImgAreaStart(IT8951LdImgInfo* pstLdImgInfo ,IT8951AreaImgInfo* pstAreaImgInfo)
^
it8951:528:79: error: 'pstAreaImgInfo' was not declared in this scope
void IT8951LoadImgAreaStart(IT8951LdImgInfo* pstLdImgInfo ,IT8951AreaImgInfo* pstAreaImgInfo)
^
it8951:601:37: error: variable or field 'IT8951HostAreaPackedPixelWrite' declared void
void IT8951HostAreaPackedPixelWrite(IT8951LdImgInfo* pstLdImgInfo,IT8951AreaImgInfo* pstAreaImgInfo)
^
it8951:601:37: error: 'IT8951LdImgInfo' was not declared in this scope
it8951:601:54: error: 'pstLdImgInfo' was not declared in this scope
void IT8951HostAreaPackedPixelWrite(IT8951LdImgInfo* pstLdImgInfo,IT8951AreaImgInfo* pstAreaImgInfo)
^
it8951:601:67: error: 'IT8951AreaImgInfo' was not declared in this scope
void IT8951HostAreaPackedPixelWrite(IT8951LdImgInfo* pstLdImgInfo,IT8951AreaImgInfo* pstAreaImgInfo)
^
it8951:601:86: error: 'pstAreaImgInfo' was not declared in this scope
void IT8951HostAreaPackedPixelWrite(IT8951LdImgInfo* pstLdImgInfo,IT8951AreaImgInfo* pstAreaImgInfo)
^
D:\grezz\Documents\digibadge\Software\1 AUg\it8951_arduino-master\main\main.ino: In function 'void setup()':
main:9:30: error: 'CS' was not declared in this scope
Serial.printf("CS %i\n", CS);
^
main:10:33: error: 'RESET' was not declared in this scope
Serial.printf("RESET %i\n", RESET);
^
main:11:32: error: 'HRDY' was not declared in this scope
Serial.printf("HRDY %i\n", HRDY);
^
D:\grezz\Documents\digibadge\Software\1 AUg\it8951_arduino-master\main\main.ino: In function 'void loop()':
main:26:23: error: 'gstI80DevInfo' was not declared in this scope
int x = random(0, gstI80DevInfo.usPanelW - pic_width);
^
D:\grezz\Documents\digibadge\Software\1 AUg\it8951_arduino-master\main\display.ino: In function 'uint8_t display_begin()':
display:5:13: error: 'CS' was not declared in this scope
pinMode(CS, OUTPUT);
^
display:6:13: error: 'RESET' was not declared in this scope
pinMode(RESET, OUTPUT);
^
display:7:13: error: 'HRDY' was not declared in this scope
pinMode(HRDY, INPUT);
^
D:\grezz\Documents\digibadge\Software\1 AUg\it8951_arduino-master\main\display.ino: In function 'void display_buffer(uint8_t*, uint32_t, uint32_t, uint32_t, uint32_t)':
display:15:5: error: 'gpFrameBuf' was not declared in this scope
gpFrameBuf = addr;
^
D:\grezz\Documents\digibadge\Software\1 AUg\it8951_arduino-master\main\it8951.ino: In function 'void IT8951LoadImgStart(IT8951LdImgInfo)':
it8951:517:26: error: base operand of '->' has non-pointer type 'IT8951LdImgInfo'
usArg = (pstLdImgInfo->usEndianType << 8 )
^
it8951:518:19: error: base operand of '->' has non-pointer type 'IT8951LdImgInfo'
|(pstLdImgInfo->usPixelFormat << 4)
^
it8951:519:19: error: base operand of '->' has non-pointer type 'IT8951LdImgInfo'
|(pstLdImgInfo->usRotate);
^
exit status 1 variable or field 'IT8951LoadImgStart' declared void
The Arduino IDE is really crappy... Please try renaming the folder "it8951_arduino" to just "it8951", reopen the project and try again.
What do you know, that solved the problem and compiled instantly 😊. Thanks also for such a quick reply.