diff options
author | Krzysztof Blazewicz <krzysztof.blazewicz@uxeon.com> | 2016-09-06 15:15:19 +0200 |
---|---|---|
committer | Krzysztof Blazewicz <krzysztof.blazewicz@uxeon.com> | 2016-11-16 12:43:27 +0100 |
commit | fa833f96df05ea25bba44396754d1d8f24aece92 (patch) | |
tree | 83a2f42c9696243c2a3ae5d728525a4a8934cd83 /stmhal/make-stmconst.py | |
parent | 7928b3e347972f1c2144f7ca60c7eb84ff0dde7b (diff) | |
download | micropython-fa833f96df05ea25bba44396754d1d8f24aece92.tar.gz micropython-fa833f96df05ea25bba44396754d1d8f24aece92.zip |
stmhal/make-stmconst.py: fix regex's to work with current CMSIS
CMSIS v2.5.0 removed all uint32_t casts and uses only Misra Cast (U)
Diffstat (limited to 'stmhal/make-stmconst.py')
-rw-r--r-- | stmhal/make-stmconst.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/make-stmconst.py b/stmhal/make-stmconst.py index e9fbb477c9..05c0c08c96 100644 --- a/stmhal/make-stmconst.py +++ b/stmhal/make-stmconst.py @@ -29,9 +29,9 @@ class Lexer: re_comment = r'(?P<comment>[A-Za-z0-9 \-/_()&]+)' re_addr_offset = r'Address offset: (?P<offset>0x[0-9A-Z]{2,3})' regexs = ( - ('#define hex', re.compile(r'#define +(?P<id>[A-Z0-9_]+) +\(\(uint32_t\)(?P<hex>0x[0-9A-F]+)\)($| +/\*)')), + ('#define hex', re.compile(r'#define +(?P<id>[A-Z0-9_]+) +(?:\(\(uint32_t\))?(?P<hex>0x[0-9A-F]+)U?(?:\))?($| +/\*)')), ('#define X', re.compile(r'#define +(?P<id>[A-Z0-9_]+) +(?P<id2>[A-Z0-9_]+)($| +/\*)')), - ('#define X+hex', re.compile(r'#define +(?P<id>[A-Za-z0-9_]+) +\((?P<id2>[A-Z0-9_]+) \+ (?P<hex>0x[0-9A-F]+)\)($| +/\*)')), + ('#define X+hex', re.compile(r'#define +(?P<id>[A-Za-z0-9_]+) +\((?P<id2>[A-Z0-9_]+) \+ (?P<hex>0x[0-9A-F]+)U?\)($| +/\*)')), ('#define typedef', re.compile(r'#define +(?P<id>[A-Z0-9_]+(ext)?) +\(\([A-Za-z0-9_]+_TypeDef \*\) (?P<id2>[A-Za-z0-9_]+)\)($| +/\*)')), ('typedef struct', re.compile(r'typedef struct$')), ('{', re.compile(r'{$')), |