diff options
| author | robert-hh <robert@hammelrath.com> | 2023-06-07 17:56:58 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-07-20 17:33:54 +1000 |
| commit | 9fea0e98b1910c17578341eb75694e5b12922392 (patch) | |
| tree | 4669f7f8e1c38bb4b6a09b9eed85810eca15541f /ports/esp8266/modesp.c | |
| parent | 29e9573de7200cc64654a77c2c20a57f89d11082 (diff) | |
esp8266/machine_pin: Accept an integer argument to mp_obj_get_pin_obj.
Allowing the machine.pwm() and esp.apa102() module to accept Pin(x) integer
parameters. Not so much of a gain, just consistent with other ports.
Signed-off-by: robert-hh <robert@hammelrath.com>
Diffstat (limited to 'ports/esp8266/modesp.c')
| -rw-r--r-- | ports/esp8266/modesp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ports/esp8266/modesp.c b/ports/esp8266/modesp.c index 878d9392a..95595faeb 100644 --- a/ports/esp8266/modesp.c +++ b/ports/esp8266/modesp.c @@ -201,8 +201,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_0(esp_check_fw_obj, esp_check_fw); STATIC mp_obj_t esp_apa102_write_(mp_obj_t clockPin, mp_obj_t dataPin, mp_obj_t buf) { mp_buffer_info_t bufinfo; mp_get_buffer_raise(buf, &bufinfo, MP_BUFFER_READ); - esp_apa102_write(mp_obj_get_pin_obj(clockPin)->phys_port, - mp_obj_get_pin_obj(dataPin)->phys_port, + esp_apa102_write(mp_obj_get_pin(clockPin), + mp_obj_get_pin(dataPin), (uint8_t *)bufinfo.buf, bufinfo.len); return mp_const_none; } |
