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
8a15e0b1
Commit
8a15e0b1
authored
Aug 10, 2016
by
Damien George
Browse files
esp8266: PULL_UP is not supported on Pin(16), so raise an exception.
parent
b203c177
Changes
1
Hide whitespace changes
Inline
Side-by-side
esp8266/modpybpin.c
View file @
8a15e0b1
...
...
@@ -244,7 +244,11 @@ STATIC mp_obj_t pyb_pin_obj_init_helper(pyb_pin_obj_t *self, mp_uint_t n_args, c
// configure the GPIO as requested
if
(
self
->
phys_port
==
16
)
{
// TODO: Set pull up/pull down
// only pull-down seems to be supported by the hardware, and
// we only expose pull-up behaviour in software
if
(
pull
!=
GPIO_PULL_NONE
)
{
nlr_raise
(
mp_obj_new_exception_msg
(
&
mp_type_ValueError
,
"Pin(16) doesn't support pull"
));
}
}
else
{
PIN_FUNC_SELECT
(
self
->
periph
,
self
->
func
);
#if 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