zephyr/machine_pin: Use native Zephyr types for Zephyr API calls.

In 1.8, Zephyr made a controversial change of dumping C99 stdint types
and switching to its own types.
This commit is contained in:
Paul Sokolovsky 2017-06-10 19:40:31 +03:00
parent 52410ef5b3
commit 0161939ed1
1 changed files with 2 additions and 2 deletions

View File

@ -117,7 +117,7 @@ STATIC mp_obj_t machine_pin_call(mp_obj_t self_in, size_t n_args, size_t n_kw, c
mp_arg_check_num(n_args, n_kw, 0, 1, false);
machine_pin_obj_t *self = self_in;
if (n_args == 0) {
uint32_t pin_val;
u32_t pin_val;
(void)gpio_pin_read(self->port, self->pin, &pin_val);
return MP_OBJ_NEW_SMALL_INT(pin_val);
} else {
@ -158,7 +158,7 @@ STATIC mp_uint_t machine_pin_ioctl(mp_obj_t self_in, mp_uint_t request, uintptr_
switch (request) {
case MP_PIN_READ: {
uint32_t pin_val;
u32_t pin_val;
gpio_pin_read(self->port, self->pin, &pin_val);
return pin_val;
}