diff options
author | Herwin Grobben <h.grobben@aemics.nl> | 2021-03-05 10:05:19 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-03-10 23:44:02 +1100 |
commit | 35c602d3b8e1ee2d06715c75fa0b4ca7a353372e (patch) | |
tree | 34a10d270087dd38f6880b3b8040b9e903ab77dd | |
parent | 59a129f22f096d992496111c498b3ea97e637115 (diff) | |
download | micropython-35c602d3b8e1ee2d06715c75fa0b4ca7a353372e.tar.gz micropython-35c602d3b8e1ee2d06715c75fa0b4ca7a353372e.zip |
stm32/make-stmconst.py: Allow "[]" chars when parsing source comments.
For STM32WB MCUs, EXTI offset addresses were not parsed due to the
appearance of "[31:0]" in a comment in the .h file.
-rw-r--r-- | ports/stm32/make-stmconst.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ports/stm32/make-stmconst.py b/ports/stm32/make-stmconst.py index ac5c56f5c7..602bdc6c19 100644 --- a/ports/stm32/make-stmconst.py +++ b/ports/stm32/make-stmconst.py @@ -46,7 +46,7 @@ class LexerError(Exception): class Lexer: re_io_reg = r"__IO uint(?P<bits>8|16|32)_t +(?P<reg>[A-Z0-9]+)" - re_comment = r"(?P<comment>[A-Za-z0-9 \-/_()&:]+)" + re_comment = r"(?P<comment>[A-Za-z0-9 \-/_()&:\[\]]+)" re_addr_offset = r"Address offset: (?P<offset>0x[0-9A-Z]{2,3})" regexs = ( ( |