Issue with word Data Type When Porting Arduino Library to STM32
Hi @Middleware & OS I am porting some Arduino library code to STM32 and encountering issues with the
word
data type. The compiler gives me the error: "expected expression before 'word'". Here is the code:
The Arduino compiler does not produce an error for this code. Do you have any suggestions?
I tried replacing word
with unsigned short
or uint16_t
, but the error persists.Solution:Jump to solution
@Sterling The issue arises because
word
is a specific data type and function in the Arduino environment, which may not be directly available or compatible with STM32 libraries.4 Replies
Solution
@Sterling The issue arises because
word
is a specific data type and function in the Arduino environment, which may not be directly available or compatible with STM32 libraries.Instead of using
word
, manually combine the bytes to create the 16-bit word.Woah, I tried this @Dtynin ... Thanks 🙏
You're welcome 😁 what are friends for?😁😊