Open tonluc123 opened 9 months ago
On Fri, 24 Nov 2023 08:39:59 -0800 tonluc123 @.***> wrote:
Hello, I tried to run example as is with no change at all with arduino ide and got:
C:\Users\PC\Documents\Arduino\libraries\CST816S\CST816S.cpp:27:10: fatal error: FunctionalInterrupt.h: No such file or directory 27 |
include
| ^ ~~~~~~compilation terminated. exit status 1 Error compiling for board Raspberry Pi Pico W.
Arduino: 1.8.19 (Windows 10), TD: 1.56, Board: "Raspberry Pi Pico W, 2MB (no FS), 133 MHz, Small (-Os) (standard), Disabled, Disabled, Disabled, Disabled, None, Pico SDK, Worldwide, IPv4 Only, Default (UF2)"
Any ideas of what is happening with the cpp file ? Thanks Lucas
OK. in CST816S.cpp you'll see:
attachInterrupt(digitalPinToInterrupt(irq), tp_isr, FALLING);
with tp_isr being:
static void tp_isr() { tp_event = true; }
This means: when the pin labeled "irq" does from high to low, call the interrupt routine tp_isr(). tp_isr() sets the variable tp_event.
This attachInterrupt probably needs to be modified for a pico.
koen
I have seen a similar report for this issue with your answer that this lib only supports esp's and I was wondering if there was any progress from you or anyone else concerning this issue. Sorry for this, I understand that you guys do all the job and we use your lib's without any struggle. My struggle is with a gc9a01 from waveshare that happens to use this chip. Lucas
On Fri, 24 Nov 2023 11:31:44 -0800 tonluc123 @.***> wrote:
I have seen a similar report for this issue with your answer that this lib only supports esp's and I was wondering if there was any progress from you or anyone else concerning this issue. Sorry for this, I understand that you guys do all the job and we use your lib's without any struggle. My struggle is with a gc9a01 from waveshare that happens to use this chip. Lucas
I'm using this library on stm32 and Chinese stm32-lookalikes.
You could try going from interrupt to polling. in cst816t.cpp: in void cst816t::begin: comment out the line with: attachInterrupt(digitalPinToInterrupt(irq), tp_isr, FALLING);
in bool cst816t::available()
koen
The main thing is: when the pin "irq" goes down, read the registers of the chip.
koen
Hi Koen, No luck with those changes but I managed to make it work with this: (bottom of the page) https://forum.pjrc.com/index.php?threads/issues-with-cst816s-controller-libraries.73180/ Lucas
On Sun, 26 Nov 2023 04:11:48 -0800 tonluc123 @.***> wrote:
Hi Koen, No luck with those changes but I managed to make it work with this: (bottom of the page) https://forum.pjrc.com/index.php?threads/issues-with-cst816s-controller-libraries.73180/ Lucas
OK.
IIRC, the "NONE" is if you poll the controller but the screen hasn't been touched since the last poll.
koen
Hello, I tried to run example as is with no change at all with arduino ide and got:
C:\Users\PC\Documents\Arduino\libraries\CST816S\CST816S.cpp:27:10: fatal error: FunctionalInterrupt.h: No such file or directory 27 | #include
| ^
~~~~~~ compilation terminated. exit status 1 Error compiling for board Raspberry Pi Pico W.Arduino: 1.8.19 (Windows 10), TD: 1.56, Board: "Raspberry Pi Pico W, 2MB (no FS), 133 MHz, Small (-Os) (standard), Disabled, Disabled, Disabled, Disabled, None, Pico SDK, Worldwide, IPv4 Only, Default (UF2)"
Any ideas of what is happening with the cpp file ? Thanks Lucas