move pcnt handler

This commit is contained in:
microDev 2020-11-04 21:20:24 +05:30
parent 4438050f79
commit fe6bfde590
No known key found for this signature in database
GPG Key ID: 2C0867BE60967730
4 changed files with 10 additions and 10 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-11-01 11:11+0530\n"
"POT-Creation-Date: 2020-11-04 21:18+0530\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -296,6 +296,10 @@ msgstr ""
msgid "All I2C peripherals are in use"
msgstr ""
#: ports/esp32s2/peripherals/pcnt_handler.c
msgid "All PCNT units in use"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
@ -1272,10 +1276,6 @@ msgstr ""
msgid "No MOSI Pin"
msgstr ""
#: ports/esp32s2/pcnt_handler.c
msgid "No PCNT unit free"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c

View File

@ -173,7 +173,6 @@ SRC_C += \
background.c \
fatfs_port.c \
mphalport.c \
pcnt_handler.c \
bindings/espidf/__init__.c \
boards/$(BOARD)/board.c \
boards/$(BOARD)/pins.c \
@ -189,6 +188,7 @@ SRC_C += \
lib/utils/pyexec.c \
lib/utils/stdout_helpers.c \
lib/utils/sys_stdio_mphal.c \
peripherals/pcnt_handler.c \
peripherals/pins.c \
peripherals/rmt.c \
supervisor/shared/memory.c

View File

@ -42,7 +42,7 @@ void pcnt_handler_init(pcnt_config_t* pcnt_config) {
pcnt_state[i] = PCNT_UNIT_ACTIVE;
break;
} else if (i == 3) {
mp_raise_RuntimeError(translate("No PCNT unit free"));
mp_raise_RuntimeError(translate("All PCNT units in use"));
}
}

View File

@ -24,12 +24,12 @@
* THE SOFTWARE.
*/
#ifndef MICROPY_INCLUDED_ESP32S2_PCNT_HANDLER_H
#define MICROPY_INCLUDED_ESP32S2_PCNT_HANDLER_H
#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PCNT_HANDLER_H
#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PCNT_HANDLER_H
#include "driver/pcnt.h"
extern void pcnt_handler_init(pcnt_config_t* pcnt_config);
extern void pcnt_handler_deinit(pcnt_unit_t* unit);
#endif // MICROPY_INCLUDED_ESP32S2_PCNT_HANDLER_H
#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PCNT_HANDLER_H