Added type hints for analogio

This commit is contained in:
dherrada 2020-07-02 09:36:22 -04:00
parent e808dca893
commit 6fd6747e9e
2 changed files with 9 additions and 9 deletions

View File

@ -70,7 +70,7 @@ STATIC mp_obj_t analogio_analogin_make_new(const mp_obj_type_t *type,
return MP_OBJ_FROM_PTR(self);
}
//| def deinit(self, ) -> Any:
//| def deinit(self, ) -> None:
//| """Turn off the AnalogIn and release the pin for other use."""
//| ...
//|
@ -86,13 +86,13 @@ STATIC void check_for_deinit(analogio_analogin_obj_t *self) {
raise_deinited_error();
}
}
//| def __enter__(self, ) -> Any:
//| def __enter__(self, ) -> None:
//| """No-op used by Context Managers."""
//| ...
//|
// Provided by context manager helper.
//| def __exit__(self, ) -> Any:
//| def __exit__(self, ) -> None:
//| """Automatically deinitializes the hardware when exiting a context. See
//| :ref:`lifetime-and-contextmanagers` for more info."""
//| ...
@ -104,7 +104,7 @@ STATIC mp_obj_t analogio_analogin___exit__(size_t n_args, const mp_obj_t *args)
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(analogio_analogin___exit___obj, 4, 4, analogio_analogin___exit__);
//| value: Any = ...
//| value: int = ...
//| """The value on the analog pin between 0 and 65535 inclusive (16-bit). (read-only)
//|
//| Even if the underlying analog to digital converter (ADC) is lower
@ -124,7 +124,7 @@ const mp_obj_property_t analogio_analogin_value_obj = {
(mp_obj_t)&mp_const_none_obj},
};
//| reference_voltage: Any = ...
//| reference_voltage: Optional[float] = ...
//| """The maximum voltage measurable (also known as the reference voltage) as a
//| `float` in Volts."""
//|

View File

@ -66,7 +66,7 @@ STATIC mp_obj_t analogio_analogout_make_new(const mp_obj_type_t *type, mp_uint_t
return MP_OBJ_FROM_PTR(self);
}
//| def deinit(self, ) -> Any:
//| def deinit(self, ) -> None:
//| """Turn off the AnalogOut and release the pin for other use."""
//| ...
//|
@ -79,13 +79,13 @@ STATIC mp_obj_t analogio_analogout_deinit(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(analogio_analogout_deinit_obj, analogio_analogout_deinit);
//| def __enter__(self, ) -> Any:
//| def __enter__(self, ) -> None:
//| """No-op used by Context Managers."""
//| ...
//|
// Provided by context manager helper.
//| def __exit__(self, ) -> Any:
//| def __exit__(self, ) -> None:
//| """Automatically deinitializes the hardware when exiting a context. See
//| :ref:`lifetime-and-contextmanagers` for more info."""
//| ...
@ -97,7 +97,7 @@ STATIC mp_obj_t analogio_analogout___exit__(size_t n_args, const mp_obj_t *args)
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(analogio_analogout___exit___obj, 4, 4, analogio_analogout___exit__);
//| value: Any = ...
//| value: None = ...
//| """The value on the analog pin between 0 and 65535 inclusive (16-bit). (write-only)
//|
//| Even if the underlying digital to analog converter (DAC) is lower