2016-11-03 18:50:59 -04:00
|
|
|
/*
|
|
|
|
* This file is part of the Micro Python project, http://micropython.org/
|
|
|
|
*
|
|
|
|
* The MIT License (MIT)
|
|
|
|
*
|
2020-06-03 18:40:05 -04:00
|
|
|
* SPDX-FileCopyrightText: Copyright (c) 2016 Damien P. George
|
2016-11-03 18:50:59 -04:00
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2017-02-19 10:11:33 -05:00
|
|
|
#include "lib/utils/context_manager_helpers.h"
|
2016-11-03 18:50:59 -04:00
|
|
|
#include "py/objproperty.h"
|
|
|
|
#include "py/runtime.h"
|
2017-10-02 20:49:40 -04:00
|
|
|
|
2016-11-29 18:49:50 -05:00
|
|
|
#include "shared-bindings/microcontroller/Pin.h"
|
2020-08-18 16:08:33 -04:00
|
|
|
#include "shared-bindings/pwmio/PWMOut.h"
|
2017-10-02 20:49:40 -04:00
|
|
|
#include "shared-bindings/util.h"
|
2018-07-31 19:53:54 -04:00
|
|
|
#include "supervisor/shared/translate.h"
|
2016-11-03 18:50:59 -04:00
|
|
|
|
2020-05-11 10:48:11 -04:00
|
|
|
//| class PWMOut:
|
2020-05-12 20:15:28 -04:00
|
|
|
//| """Output a Pulse Width Modulated signal on a given pin."""
|
2016-11-03 18:50:59 -04:00
|
|
|
//|
|
2020-07-03 14:23:34 -04:00
|
|
|
//| def __init__(self, pin: microcontroller.Pin, *, duty_cycle: int = 0, frequency: int = 500, variable_frequency: bool = False) -> None:
|
2020-05-11 10:48:11 -04:00
|
|
|
//| """Create a PWM object associated with the given pin. This allows you to
|
|
|
|
//| write PWM signals out on the given pin. Frequency is fixed after init
|
|
|
|
//| unless ``variable_frequency`` is True.
|
2016-11-03 18:50:59 -04:00
|
|
|
//|
|
2020-05-11 10:48:11 -04:00
|
|
|
//| .. note:: When ``variable_frequency`` is True, further PWM outputs may be
|
|
|
|
//| limited because it may take more internal resources to be flexible. So,
|
|
|
|
//| when outputting both fixed and flexible frequency signals construct the
|
|
|
|
//| fixed outputs first.
|
2016-11-03 18:50:59 -04:00
|
|
|
//|
|
2020-05-11 10:48:11 -04:00
|
|
|
//| :param ~microcontroller.Pin pin: The pin to output to
|
|
|
|
//| :param int duty_cycle: The fraction of each pulse which is high. 16-bit
|
|
|
|
//| :param int frequency: The target frequency in Hertz (32-bit)
|
|
|
|
//| :param bool variable_frequency: True if the frequency will change over time
|
2017-02-01 18:07:31 -05:00
|
|
|
//|
|
2020-05-11 10:48:11 -04:00
|
|
|
//| Simple LED fade::
|
2017-01-26 21:05:46 -05:00
|
|
|
//|
|
2020-08-18 16:08:33 -04:00
|
|
|
//| import pwmio
|
2020-05-11 10:48:11 -04:00
|
|
|
//| import board
|
2017-01-26 21:05:46 -05:00
|
|
|
//|
|
2020-08-18 16:08:33 -04:00
|
|
|
//| pwm = pwmio.PWMOut(board.D13) # output on D13
|
2020-05-11 10:48:11 -04:00
|
|
|
//| pwm.duty_cycle = 2 ** 15 # Cycles the pin with 50% duty cycle (half of 2 ** 16) at the default 500hz
|
2017-01-26 21:05:46 -05:00
|
|
|
//|
|
2020-05-11 10:48:11 -04:00
|
|
|
//| PWM at specific frequency (servos and motors)::
|
2017-02-01 18:07:31 -05:00
|
|
|
//|
|
2020-08-18 16:08:33 -04:00
|
|
|
//| import pwmio
|
2020-05-11 10:48:11 -04:00
|
|
|
//| import board
|
2017-02-01 18:07:31 -05:00
|
|
|
//|
|
2020-08-18 16:08:33 -04:00
|
|
|
//| pwm = pwmio.PWMOut(board.D13, frequency=50)
|
2020-05-11 10:48:11 -04:00
|
|
|
//| pwm.duty_cycle = 2 ** 15 # Cycles the pin with 50% duty cycle (half of 2 ** 16) at 50hz
|
2017-02-01 18:07:31 -05:00
|
|
|
//|
|
2020-05-11 10:48:11 -04:00
|
|
|
//| Variable frequency (usually tones)::
|
2017-02-01 18:07:31 -05:00
|
|
|
//|
|
2020-08-18 16:08:33 -04:00
|
|
|
//| import pwmio
|
2020-05-11 10:48:11 -04:00
|
|
|
//| import board
|
|
|
|
//| import time
|
2017-02-01 18:07:31 -05:00
|
|
|
//|
|
2020-08-18 16:08:33 -04:00
|
|
|
//| pwm = pwmio.PWMOut(board.D13, duty_cycle=2 ** 15, frequency=440, variable_frequency=True)
|
2020-05-11 10:48:11 -04:00
|
|
|
//| time.sleep(0.2)
|
|
|
|
//| pwm.frequency = 880
|
|
|
|
//| time.sleep(0.1)"""
|
|
|
|
//| ...
|
2016-11-03 18:50:59 -04:00
|
|
|
//|
|
2020-08-18 16:08:33 -04:00
|
|
|
STATIC mp_obj_t pwmio_pwmout_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
|
2019-01-14 20:26:36 -05:00
|
|
|
enum { ARG_pin, ARG_duty_cycle, ARG_frequency, ARG_variable_frequency };
|
2016-11-03 18:50:59 -04:00
|
|
|
static const mp_arg_t allowed_args[] = {
|
2019-01-14 20:26:36 -05:00
|
|
|
{ MP_QSTR_pin, MP_ARG_REQUIRED | MP_ARG_OBJ, },
|
2017-02-01 18:07:31 -05:00
|
|
|
{ MP_QSTR_duty_cycle, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} },
|
2017-01-26 21:05:46 -05:00
|
|
|
{ MP_QSTR_frequency, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 500} },
|
|
|
|
{ MP_QSTR_variable_frequency, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} },
|
2016-11-03 18:50:59 -04:00
|
|
|
};
|
|
|
|
mp_arg_val_t parsed_args[MP_ARRAY_SIZE(allowed_args)];
|
2019-01-14 20:26:36 -05:00
|
|
|
mp_arg_parse_all(n_args, args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, parsed_args);
|
|
|
|
|
2020-03-05 16:35:31 -05:00
|
|
|
const mcu_pin_obj_t *pin = validate_obj_is_free_pin(parsed_args[ARG_pin].u_obj);
|
2019-01-14 20:26:36 -05:00
|
|
|
|
2017-03-10 12:55:17 -05:00
|
|
|
uint16_t duty_cycle = parsed_args[ARG_duty_cycle].u_int;
|
2017-01-26 21:05:46 -05:00
|
|
|
uint32_t frequency = parsed_args[ARG_frequency].u_int;
|
2019-03-12 21:28:30 -04:00
|
|
|
bool variable_frequency = parsed_args[ARG_variable_frequency].u_bool;
|
2016-11-03 18:50:59 -04:00
|
|
|
|
2019-01-14 20:26:36 -05:00
|
|
|
// create PWM object from the given pin
|
2020-08-18 16:08:33 -04:00
|
|
|
pwmio_pwmout_obj_t *self = m_new_obj(pwmio_pwmout_obj_t);
|
|
|
|
self->base.type = &pwmio_pwmout_type;
|
|
|
|
pwmout_result_t result = common_hal_pwmio_pwmout_construct(self, pin, duty_cycle, frequency, variable_frequency);
|
2021-03-11 08:52:47 -05:00
|
|
|
switch (result) {
|
2021-03-19 09:57:21 -04:00
|
|
|
case PWMOUT_OK:
|
|
|
|
break;
|
2021-03-11 08:52:47 -05:00
|
|
|
case PWMOUT_INVALID_PIN:
|
|
|
|
mp_raise_ValueError(translate("Invalid pin"));
|
|
|
|
break;
|
|
|
|
case PWMOUT_INVALID_FREQUENCY:
|
|
|
|
mp_raise_ValueError(translate("Invalid PWM frequency"));
|
|
|
|
break;
|
|
|
|
case PWMOUT_INVALID_FREQUENCY_ON_PIN:
|
|
|
|
mp_raise_ValueError(translate("Frequency must match existing PWMOut using this timer"));
|
|
|
|
break;
|
|
|
|
case PWMOUT_VARIABLE_FREQUENCY_NOT_AVAILABLE:
|
|
|
|
mp_raise_ValueError(translate("Cannot vary frequency on a timer that is already in use"));
|
|
|
|
break;
|
|
|
|
case PWMOUT_ALL_TIMERS_ON_PIN_IN_USE:
|
|
|
|
mp_raise_ValueError(translate("All timers for this pin are in use"));
|
|
|
|
break;
|
|
|
|
case PWMOUT_ALL_TIMERS_IN_USE:
|
|
|
|
mp_raise_RuntimeError(translate("All timers in use"));
|
|
|
|
break;
|
|
|
|
case PWMOUT_ALL_CHANNELS_IN_USE:
|
|
|
|
mp_raise_RuntimeError(translate("All channels in use"));
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
case PWMOUT_INITIALIZATION_ERROR:
|
|
|
|
mp_raise_RuntimeError(translate("Could not start PWM"));
|
|
|
|
break;
|
2019-01-25 21:31:27 -05:00
|
|
|
}
|
2016-11-03 18:50:59 -04:00
|
|
|
|
|
|
|
return MP_OBJ_FROM_PTR(self);
|
|
|
|
}
|
|
|
|
|
2020-07-03 11:04:03 -04:00
|
|
|
//| def deinit(self) -> None:
|
2020-05-11 10:48:11 -04:00
|
|
|
//| """Deinitialises the PWMOut and releases any hardware resources for reuse."""
|
|
|
|
//| ...
|
2016-11-03 18:50:59 -04:00
|
|
|
//|
|
2020-08-18 16:08:33 -04:00
|
|
|
STATIC mp_obj_t pwmio_pwmout_deinit(mp_obj_t self_in) {
|
|
|
|
pwmio_pwmout_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
|
|
|
common_hal_pwmio_pwmout_deinit(self);
|
2016-11-03 18:50:59 -04:00
|
|
|
return mp_const_none;
|
|
|
|
}
|
2020-08-18 16:08:33 -04:00
|
|
|
STATIC MP_DEFINE_CONST_FUN_OBJ_1(pwmio_pwmout_deinit_obj, pwmio_pwmout_deinit);
|
2016-11-03 18:50:59 -04:00
|
|
|
|
2020-08-18 16:08:33 -04:00
|
|
|
STATIC void check_for_deinit(pwmio_pwmout_obj_t *self) {
|
|
|
|
if (common_hal_pwmio_pwmout_deinited(self)) {
|
2019-06-12 04:00:59 -04:00
|
|
|
raise_deinited_error();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-03 11:04:03 -04:00
|
|
|
//| def __enter__(self) -> PWMOut:
|
2020-05-11 10:48:11 -04:00
|
|
|
//| """No-op used by Context Managers."""
|
|
|
|
//| ...
|
2016-11-03 18:50:59 -04:00
|
|
|
//|
|
2017-02-19 10:11:33 -05:00
|
|
|
// Provided by context manager helper.
|
2016-11-03 18:50:59 -04:00
|
|
|
|
2020-07-03 11:04:03 -04:00
|
|
|
//| def __exit__(self) -> None:
|
2020-05-11 10:48:11 -04:00
|
|
|
//| """Automatically deinitializes the hardware when exiting a context. See
|
|
|
|
//| :ref:`lifetime-and-contextmanagers` for more info."""
|
|
|
|
//| ...
|
2016-11-03 18:50:59 -04:00
|
|
|
//|
|
2020-08-18 16:08:33 -04:00
|
|
|
STATIC mp_obj_t pwmio_pwmout_obj___exit__(size_t n_args, const mp_obj_t *args) {
|
2016-11-03 18:50:59 -04:00
|
|
|
(void)n_args;
|
2020-08-18 16:08:33 -04:00
|
|
|
common_hal_pwmio_pwmout_deinit(args[0]);
|
2016-11-03 18:50:59 -04:00
|
|
|
return mp_const_none;
|
|
|
|
}
|
2020-08-18 16:08:33 -04:00
|
|
|
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(pwmio_pwmout___exit___obj, 4, 4, pwmio_pwmout_obj___exit__);
|
2016-11-03 18:50:59 -04:00
|
|
|
|
2020-07-25 04:58:37 -04:00
|
|
|
//| duty_cycle: int
|
2020-05-11 10:48:11 -04:00
|
|
|
//| """16 bit value that dictates how much of one cycle is high (1) versus low
|
|
|
|
//| (0). 0xffff will always be high, 0 will always be low and 0x7fff will
|
|
|
|
//| be half high and then half low.
|
2016-11-03 18:50:59 -04:00
|
|
|
//|
|
2020-05-11 10:48:11 -04:00
|
|
|
//| Depending on how PWM is implemented on a specific board, the internal
|
|
|
|
//| representation for duty cycle might have less than 16 bits of resolution.
|
|
|
|
//| Reading this property will return the value from the internal representation,
|
|
|
|
//| so it may differ from the value set."""
|
2019-10-25 13:56:41 -04:00
|
|
|
//|
|
2020-08-18 16:08:33 -04:00
|
|
|
STATIC mp_obj_t pwmio_pwmout_obj_get_duty_cycle(mp_obj_t self_in) {
|
|
|
|
pwmio_pwmout_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
2019-06-12 04:00:59 -04:00
|
|
|
check_for_deinit(self);
|
2020-08-18 16:08:33 -04:00
|
|
|
return MP_OBJ_NEW_SMALL_INT(common_hal_pwmio_pwmout_get_duty_cycle(self));
|
2016-11-03 18:50:59 -04:00
|
|
|
}
|
2020-08-18 16:08:33 -04:00
|
|
|
MP_DEFINE_CONST_FUN_OBJ_1(pwmio_pwmout_get_duty_cycle_obj, pwmio_pwmout_obj_get_duty_cycle);
|
2016-11-03 18:50:59 -04:00
|
|
|
|
2020-08-18 16:08:33 -04:00
|
|
|
STATIC mp_obj_t pwmio_pwmout_obj_set_duty_cycle(mp_obj_t self_in, mp_obj_t duty_cycle) {
|
|
|
|
pwmio_pwmout_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
2019-06-12 04:00:59 -04:00
|
|
|
check_for_deinit(self);
|
2016-11-03 18:50:59 -04:00
|
|
|
mp_int_t duty = mp_obj_get_int(duty_cycle);
|
2017-01-26 21:05:46 -05:00
|
|
|
if (duty < 0 || duty > 0xffff) {
|
2018-07-31 19:53:54 -04:00
|
|
|
mp_raise_ValueError(translate("PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"));
|
2016-11-03 18:50:59 -04:00
|
|
|
}
|
2021-03-15 09:57:36 -04:00
|
|
|
common_hal_pwmio_pwmout_set_duty_cycle(self, duty);
|
|
|
|
return mp_const_none;
|
2016-11-03 18:50:59 -04:00
|
|
|
}
|
2020-08-18 16:08:33 -04:00
|
|
|
MP_DEFINE_CONST_FUN_OBJ_2(pwmio_pwmout_set_duty_cycle_obj, pwmio_pwmout_obj_set_duty_cycle);
|
2016-11-03 18:50:59 -04:00
|
|
|
|
2020-08-18 16:08:33 -04:00
|
|
|
const mp_obj_property_t pwmio_pwmout_duty_cycle_obj = {
|
2016-11-03 18:50:59 -04:00
|
|
|
.base.type = &mp_type_property,
|
2020-08-18 16:08:33 -04:00
|
|
|
.proxy = {(mp_obj_t)&pwmio_pwmout_get_duty_cycle_obj,
|
|
|
|
(mp_obj_t)&pwmio_pwmout_set_duty_cycle_obj,
|
2021-05-05 20:51:52 -04:00
|
|
|
MP_ROM_NONE},
|
2016-11-03 18:50:59 -04:00
|
|
|
};
|
|
|
|
|
2020-07-25 04:58:37 -04:00
|
|
|
//| frequency: int
|
2020-05-11 10:48:11 -04:00
|
|
|
//| """32 bit value that dictates the PWM frequency in Hertz (cycles per
|
2017-01-26 21:05:46 -05:00
|
|
|
//| second). Only writeable when constructed with ``variable_frequency=True``.
|
|
|
|
//|
|
2019-10-25 13:56:41 -04:00
|
|
|
//| Depending on how PWM is implemented on a specific board, the internal value
|
|
|
|
//| for the PWM's duty cycle may need to be recalculated when the frequency
|
|
|
|
//| changes. In these cases, the duty cycle is automatically recalculated
|
|
|
|
//| from the original duty cycle value. This should happen without any need
|
2020-05-11 10:48:11 -04:00
|
|
|
//| to manually re-set the duty cycle."""
|
2019-10-25 13:56:41 -04:00
|
|
|
//|
|
2020-08-18 16:08:33 -04:00
|
|
|
STATIC mp_obj_t pwmio_pwmout_obj_get_frequency(mp_obj_t self_in) {
|
|
|
|
pwmio_pwmout_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
2019-06-12 04:00:59 -04:00
|
|
|
check_for_deinit(self);
|
2020-08-18 16:08:33 -04:00
|
|
|
return MP_OBJ_NEW_SMALL_INT(common_hal_pwmio_pwmout_get_frequency(self));
|
2017-01-26 21:05:46 -05:00
|
|
|
}
|
2020-08-18 16:08:33 -04:00
|
|
|
MP_DEFINE_CONST_FUN_OBJ_1(pwmio_pwmout_get_frequency_obj, pwmio_pwmout_obj_get_frequency);
|
2017-01-26 21:05:46 -05:00
|
|
|
|
2020-08-18 16:08:33 -04:00
|
|
|
STATIC mp_obj_t pwmio_pwmout_obj_set_frequency(mp_obj_t self_in, mp_obj_t frequency) {
|
|
|
|
pwmio_pwmout_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
2019-06-12 04:00:59 -04:00
|
|
|
check_for_deinit(self);
|
2020-08-18 16:08:33 -04:00
|
|
|
if (!common_hal_pwmio_pwmout_get_variable_frequency(self)) {
|
2018-07-31 19:53:54 -04:00
|
|
|
mp_raise_AttributeError(translate(
|
2018-10-09 20:52:55 -04:00
|
|
|
"PWM frequency not writable when variable_frequency is False on "
|
2018-07-31 19:53:54 -04:00
|
|
|
"construction."));
|
2017-01-26 21:05:46 -05:00
|
|
|
}
|
2021-03-15 09:57:36 -04:00
|
|
|
common_hal_pwmio_pwmout_set_frequency(self, mp_obj_get_int(frequency));
|
|
|
|
return mp_const_none;
|
2017-01-26 21:05:46 -05:00
|
|
|
}
|
2020-08-18 16:08:33 -04:00
|
|
|
MP_DEFINE_CONST_FUN_OBJ_2(pwmio_pwmout_set_frequency_obj, pwmio_pwmout_obj_set_frequency);
|
2017-01-26 21:05:46 -05:00
|
|
|
|
2020-08-18 16:08:33 -04:00
|
|
|
const mp_obj_property_t pwmio_pwmout_frequency_obj = {
|
2017-01-26 21:05:46 -05:00
|
|
|
.base.type = &mp_type_property,
|
2020-08-18 16:08:33 -04:00
|
|
|
.proxy = {(mp_obj_t)&pwmio_pwmout_get_frequency_obj,
|
|
|
|
(mp_obj_t)&pwmio_pwmout_set_frequency_obj,
|
2021-05-05 20:51:52 -04:00
|
|
|
MP_ROM_NONE},
|
2017-01-26 21:05:46 -05:00
|
|
|
};
|
|
|
|
|
2020-08-18 16:08:33 -04:00
|
|
|
STATIC const mp_rom_map_elem_t pwmio_pwmout_locals_dict_table[] = {
|
2016-11-03 18:50:59 -04:00
|
|
|
// Methods
|
2020-08-18 16:08:33 -04:00
|
|
|
{ MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&pwmio_pwmout_deinit_obj) },
|
2017-02-19 10:11:33 -05:00
|
|
|
{ MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) },
|
2020-08-18 16:08:33 -04:00
|
|
|
{ MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&pwmio_pwmout___exit___obj) },
|
2016-11-03 18:50:59 -04:00
|
|
|
|
|
|
|
// Properties
|
2020-08-18 16:08:33 -04:00
|
|
|
{ MP_ROM_QSTR(MP_QSTR_duty_cycle), MP_ROM_PTR(&pwmio_pwmout_duty_cycle_obj) },
|
|
|
|
{ MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_PTR(&pwmio_pwmout_frequency_obj) },
|
2016-11-03 18:50:59 -04:00
|
|
|
// TODO(tannewt): Add enabled to determine whether the signal is output
|
|
|
|
// without giving up the resources. Useful for IR output.
|
|
|
|
};
|
2020-08-18 16:08:33 -04:00
|
|
|
STATIC MP_DEFINE_CONST_DICT(pwmio_pwmout_locals_dict, pwmio_pwmout_locals_dict_table);
|
2016-11-03 18:50:59 -04:00
|
|
|
|
2020-08-18 16:08:33 -04:00
|
|
|
const mp_obj_type_t pwmio_pwmout_type = {
|
2016-11-03 18:50:59 -04:00
|
|
|
{ &mp_type_type },
|
|
|
|
.name = MP_QSTR_PWMOut,
|
2020-08-18 16:08:33 -04:00
|
|
|
.make_new = pwmio_pwmout_make_new,
|
2021-03-15 09:57:36 -04:00
|
|
|
.locals_dict = (mp_obj_dict_t *)&pwmio_pwmout_locals_dict,
|
2016-11-03 18:50:59 -04:00
|
|
|
};
|