How to generate a MicroPython QSTR from a C macro? #10966
Unanswered
pablogventura
asked this question in
Using MicroPython
Replies: 1 comment 4 replies
-
Just use There is a tool that automatically creates this macro based on the pattern |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using MicroPython and I would like to generate a QSTR that contains the contents of a macro. For example, I have the following macro:
#define MY_MACRO "hello"
How can I generate a QSTR that has the value "hello" and is called MP_QSTR_MY_MACRO?
When I use MP_QSTR_MY_MACRO, that QSTR contains "MY_MACRO" instead of "hello".
Beta Was this translation helpful? Give feedback.
All reactions