2025-01-24 08:20 AM
Hi,
I have a STM8s003 which I have already programmed with the Arduino IDE but the commands “digitalWrite” and “digitalRead” were too slow for me. I also found an alternative that works with the Arduino but not with the STM8: CLR(PORTA, 2); SET(PORTA, 2); I got these commands from the site:
https://electronics.stackexchange.com/questions/22585/arduino-faster-alternatives-to-digitalread-and-digitalwrite
When compiling for the STM8, the error message is: “Undefined identifier ‘PORTA’ ”
Do you have any idea how else the ports are addressed or something?
2025-01-24 09:09 AM
Definitions would need to come for an include file, which you'd pull via #include "stm8s003.h" or something materially similar from an STM8 SPL or similar library.
Perhaps look at the variant code Arduino is using to support the part currently.