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
b1537a57
Commit
b1537a57
authored
Oct 05, 2016
by
Damien George
Browse files
stmhal/mphalport: Change pin obj type to const pointer, to avoid casts.
parent
bcf60b43
Changes
1
Hide whitespace changes
Inline
Side-by-side
stmhal/mphalport.h
View file @
b1537a57
...
...
@@ -43,8 +43,8 @@ void mp_hal_set_interrupt_char(int c); // -1 to disable
// C-level pin HAL
#include "stmhal/pin.h"
#define mp_hal_pin_obj_t pin_obj_t*
#define mp_hal_get_pin_obj(o)
(pin_obj_t*)
pin_find(o)
#define mp_hal_pin_obj_t
const
pin_obj_t*
#define mp_hal_get_pin_obj(o) pin_find(o)
#define mp_hal_pin_input(p) mp_hal_gpio_config((p)->gpio, (p)->pin, 0, 0, 0)
#define mp_hal_pin_output(p) mp_hal_gpio_config((p)->gpio, (p)->pin, 1, 0, 0)
#define mp_hal_pin_open_drain(p) mp_hal_gpio_config((p)->gpio, (p)->pin, 5, 0, 0)
...
...
Write
Preview
Markdown
is supported
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