Hi,
Now that I've got the ESP32 GC9A01A code working in the Arduino, I'm trying to move it into B4R, so trying to keep it as same as possible, espeially the sematics/strucutre before looking to alter it.
I'm getting the above error when calling a routine [edit: should have mentioned that it gets about half way through processing the initial command and repeatedly fails at the same point, but can't see anything unusual at that point]
The routine defintion is:
The InitCmd array is (completely as is in the C code version):
Anyone any thoughts please - is it a problem with the ESP?
Thanks
Dave
Now that I've got the ESP32 GC9A01A code working in the Arduino, I'm trying to move it into B4R, so trying to keep it as same as possible, espeially the sematics/strucutre before looking to alter it.
I'm getting the above error when calling a routine [edit: should have mentioned that it gets about half way through processing the initial command and repeatedly fails at the same point, but can't see anything unusual at that point]
B4X:
SendCommand(Cmd,Convertor.subString(InitCmd,CmdPointer),Bit.And(InitCmd (CmdPointer),0x7f))
The routine defintion is:
B4X:
Private Sub SendCommand (CommandByte As Byte, DataBytes() As Byte, NumberDataBytes As Byte)
The InitCmd array is (completely as is in the C code version):
B4X:
InitCmd = Array As Byte (GC9A01A_INREGEN2, 0, _
0xEB, 1, 0x14, _
GC9A01A_INREGEN1, 0, _
GC9A01A_INREGEN2, 0, _
0xEB, 1, 0x14, _
0x84, 1, 0x40, _
0x85, 1, 0xFF, _
0x86, 1, 0xFF, _
0x87, 1, 0xFF, _
0x88, 1, 0x0A, _
0x89, 1, 0x21, _
0x8A, 1, 0x00, _
0x8B, 1, 0x80, _
0x8C, 1, 0x01, _
0x8D, 1, 0x01, _
0x8E, 1, 0xFF, _
0x8F, 1, 0xFF, _
0xB6, 2, 0x00, 0x00, _
GC9A01A_MADCTL, 1, MADCTL_MXorBGR, _
GC9A01A_PIXFMT, 1, 0x05, _
0x90, 4, 0x08, 0x08, 0x08, 0x08, _
0xBD, 1, 0x06, _
0xBC, 1, 0x00, _
0xFF, 3, 0x60, 0x01, 0x04, _
GC9A01A1_VREG1A, 1, 0x13, _
GC9A01A1_VREG1B, 1, 0x13, _
GC9A01A1_VREG2A, 1, 0x22, _
0xBE, 1, 0x11, _
ILI9341_GMCTRN1, 2, 0x10, 0x0E, _
0xDF, 3, 0x21, 0x0c, 0x02, _
GC9A01A_GAMMA1, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A, _
GC9A01A_GAMMA2, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F, _
GC9A01A_GAMMA3, 6, 0x45, 0x09, 0x08, 0x08, 0x26, 0x2A, _
GC9A01A_GAMMA4, 6, 0x43, 0x70, 0x72, 0x36, 0x37, 0x6F, _
0xED, 2, 0x1B, 0x0B, _
0xAE, 1, 0x77, _
0xCD, 1, 0x63, _
0x70, 9, 0x07, 0x07, 0x04, 0x0E, 0x0F, 0x09, 0x07, 0x08, 0x03, _
ILI9341_FRAMERATE, 1, 0x34, _
0x62, 12, 0x18, 0x0D, 0x71, 0xED, 0x70, 0x70, 0x18, 0x0F, 0x71, 0xEF, 0x70, 0x70, _
0x63, 12, 0x18, 0x11, 0x71, 0xF1, 0x70, 0x70, 0x18, 0x13, 0x71, 0xF3, 0x70, 0x70, _
0x64, 7, 0x28, 0x29, 0xF1, 0x01, 0xF1, 0x00, 0x07, _
0x66, 10, 0x3C, 0x00, 0xCD, 0x67, 0x45, 0x45, 0x10, 0x00, 0x00, 0x00, _
0x67, 10, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x01, 0x54, 0x10, 0x32, 0x98, _
0x74, 7, 0x10, 0x85, 0x80, 0x00, 0x00, 0x4E, 0x00, _
0x98, 2, 0x3e, 0x07, _
GC9A01A_TEON, 0, _
GC9A01A_INVON, 0, _
GC9A01A_SLPOUT, 0x80, _
GC9A01A_DISPON, 0x80, _
0x00) ' End of list
Anyone any thoughts please - is it a problem with the ESP?
Thanks
Dave
Last edited: