diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-01-31 16:03:51 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-31 16:03:51 -0500 |
| commit | 7c443fbef2b92bfdd382db9aeaddcdcecbc02cd0 (patch) | |
| tree | 93c06f6ba863e234148555f41042b354286cb52e /shared-bindings/pulseio/PWMOut.h | |
| parent | 63d456127b783efb376bd2b25598cc9e7f9dceb6 (diff) | |
| parent | d72cd5b2d6cbc95665c41a43d6d914e71ac58017 (diff) | |
Merge pull request #1510 from tannewt/terminalio
Add a terminal that shows by default on displays.
Diffstat (limited to 'shared-bindings/pulseio/PWMOut.h')
| -rw-r--r-- | shared-bindings/pulseio/PWMOut.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/shared-bindings/pulseio/PWMOut.h b/shared-bindings/pulseio/PWMOut.h index 0b630816b..c01e0c926 100644 --- a/shared-bindings/pulseio/PWMOut.h +++ b/shared-bindings/pulseio/PWMOut.h @@ -32,7 +32,15 @@ extern const mp_obj_type_t pulseio_pwmout_type; -extern void common_hal_pulseio_pwmout_construct(pulseio_pwmout_obj_t* self, +typedef enum { + PWMOUT_OK, + PWMOUT_INVALID_PIN, + PWMOUT_INVALID_FREQUENCY, + PWMOUT_ALL_TIMERS_ON_PIN_IN_USE, + PWMOUT_ALL_TIMERS_IN_USE +} pwmout_result_t; + +extern pwmout_result_t common_hal_pulseio_pwmout_construct(pulseio_pwmout_obj_t* self, const mcu_pin_obj_t* pin, uint16_t duty, uint32_t frequency, bool variable_frequency); extern void common_hal_pulseio_pwmout_deinit(pulseio_pwmout_obj_t* self); @@ -43,4 +51,8 @@ extern void common_hal_pulseio_pwmout_set_frequency(pulseio_pwmout_obj_t* self, extern uint32_t common_hal_pulseio_pwmout_get_frequency(pulseio_pwmout_obj_t* self); extern bool common_hal_pulseio_pwmout_get_variable_frequency(pulseio_pwmout_obj_t* self); +// This is used by the supervisor to claim PWMOut devices indefinitely. +extern void common_hal_pulseio_pwmout_never_reset(pulseio_pwmout_obj_t *self); +extern void common_hal_pulseio_pwmout_reset_ok(pulseio_pwmout_obj_t *self); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_PULSEIO_PWMOUT_H |
