Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
50ea86fe
Commit
50ea86fe
authored
Feb 22, 2015
by
Damien George
Browse files
stmhal: For pins, define macros mapping board names to cpu names.
parent
2e5704d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
stmhal/boards/make-pins.py
View file @
50ea86fe
...
...
@@ -282,6 +282,9 @@ class Pins(object):
hdr_file
.
write
(
'extern const pin_obj_t * const pin_adc1[];
\n
'
)
hdr_file
.
write
(
'extern const pin_obj_t * const pin_adc2[];
\n
'
)
hdr_file
.
write
(
'extern const pin_obj_t * const pin_adc3[];
\n
'
)
# provide #define's mapping board to cpu name
for
named_pin
in
self
.
board_pins
:
hdr_file
.
write
(
"#define pyb_pin_{:s} pin_{:s}
\n
"
.
format
(
named_pin
.
name
(),
named_pin
.
pin
().
cpu_pin_name
()))
def
print_qstr
(
self
,
qstr_filename
):
with
open
(
qstr_filename
,
'wt'
)
as
qstr_file
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment