diff --git a/ports/stm32/make-stmconst.py b/ports/stm32/make-stmconst.py index 770033ef59..5601eb0af4 100644 --- a/ports/stm32/make-stmconst.py +++ b/ports/stm32/make-stmconst.py @@ -41,7 +41,10 @@ class Lexer: r"#define +(?P[A-Z0-9_]+) +\(?(\(uint32_t\))?(?P0x[0-9A-F]+)U?L?\)?($| */\*)" ), ), - ("#define X", re.compile(r"#define +(?P[A-Z0-9_]+) +(?P[A-Z0-9_]+)($| +/\*)")), + ( + "#define X", + re.compile(r"#define +(?P[A-Z0-9_]+) +\(?(?P[A-Z0-9_]+)\)?($| +/\*)"), + ), ( "#define X+hex", re.compile(