diff --git a/locale/ID.po b/locale/ID.po index 8e74df8c07..cb9fdfee44 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-29 14:52-0500\n" +"POT-Creation-Date: 2020-03-02 11:20-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1179,6 +1179,10 @@ msgstr "" msgid "PulseIn not yet supported" msgstr "" +#: ports/stm32f4/common-hal/pulseio/PulseOut.c +msgid "PulseOut not supported on this chip" +msgstr "" + #: ports/stm32f4/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 45e7957874..4272080d9b 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-29 14:52-0500\n" +"POT-Creation-Date: 2020-03-02 11:20-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1165,6 +1165,10 @@ msgstr "" msgid "PulseIn not yet supported" msgstr "" +#: ports/stm32f4/common-hal/pulseio/PulseOut.c +msgid "PulseOut not supported on this chip" +msgstr "" + #: ports/stm32f4/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 9456e83e53..1e8a61dd7a 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-29 14:52-0500\n" +"POT-Creation-Date: 2020-03-02 11:20-0500\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: Pascal Deneaux\n" "Language-Team: Sebastian Plamauer, Pascal Deneaux\n" @@ -1182,6 +1182,10 @@ msgstr "Pull wird nicht verwendet, wenn die Richtung output ist." msgid "PulseIn not yet supported" msgstr "" +#: ports/stm32f4/common-hal/pulseio/PulseOut.c +msgid "PulseOut not supported on this chip" +msgstr "" + #: ports/stm32f4/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" diff --git a/locale/en_US.po b/locale/en_US.po index b02fc66da9..2f9677594c 100644 --- a/locale/en_US.po +++ b/locale/en_US.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-29 14:52-0500\n" +"POT-Creation-Date: 2020-03-02 11:20-0500\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: \n" @@ -1165,6 +1165,10 @@ msgstr "" msgid "PulseIn not yet supported" msgstr "" +#: ports/stm32f4/common-hal/pulseio/PulseOut.c +msgid "PulseOut not supported on this chip" +msgstr "" + #: ports/stm32f4/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" diff --git a/locale/en_x_pirate.po b/locale/en_x_pirate.po index 1c38c4f5cf..78cda4fbcc 100644 --- a/locale/en_x_pirate.po +++ b/locale/en_x_pirate.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-29 14:52-0500\n" +"POT-Creation-Date: 2020-03-02 11:20-0500\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n" "Last-Translator: \n" "Language-Team: @sommersoft, @MrCertainly\n" @@ -1169,6 +1169,10 @@ msgstr "" msgid "PulseIn not yet supported" msgstr "" +#: ports/stm32f4/common-hal/pulseio/PulseOut.c +msgid "PulseOut not supported on this chip" +msgstr "" + #: ports/stm32f4/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" diff --git a/locale/es.po b/locale/es.po index 305f829990..aecdea9e0b 100644 --- a/locale/es.po +++ b/locale/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-29 14:52-0500\n" +"POT-Creation-Date: 2020-03-02 11:20-0500\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n" "Last-Translator: \n" "Language-Team: \n" @@ -1181,6 +1181,10 @@ msgstr "Pull no se usa cuando la dirección es output." msgid "PulseIn not yet supported" msgstr "" +#: ports/stm32f4/common-hal/pulseio/PulseOut.c +msgid "PulseOut not supported on this chip" +msgstr "" + #: ports/stm32f4/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" diff --git a/locale/fil.po b/locale/fil.po index 6781538974..be9930d42d 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-29 14:52-0500\n" +"POT-Creation-Date: 2020-03-02 11:20-0500\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -1187,6 +1187,10 @@ msgstr "Pull hindi ginagamit kapag ang direksyon ay output." msgid "PulseIn not yet supported" msgstr "" +#: ports/stm32f4/common-hal/pulseio/PulseOut.c +msgid "PulseOut not supported on this chip" +msgstr "" + #: ports/stm32f4/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index e2c924113b..b5e41dacb7 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-29 14:52-0500\n" +"POT-Creation-Date: 2020-03-02 11:20-0500\n" "PO-Revision-Date: 2019-04-14 20:05+0100\n" "Last-Translator: Pierrick Couturier \n" "Language-Team: fr\n" @@ -1200,6 +1200,10 @@ msgstr "Le tirage 'pull' n'est pas utilisé quand la direction est 'output'." msgid "PulseIn not yet supported" msgstr "" +#: ports/stm32f4/common-hal/pulseio/PulseOut.c +msgid "PulseOut not supported on this chip" +msgstr "" + #: ports/stm32f4/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index bf48daffdf..79f35e1032 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-29 14:52-0500\n" +"POT-Creation-Date: 2020-03-02 11:20-0500\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -1196,6 +1196,10 @@ msgstr "" msgid "PulseIn not yet supported" msgstr "" +#: ports/stm32f4/common-hal/pulseio/PulseOut.c +msgid "PulseOut not supported on this chip" +msgstr "" + #: ports/stm32f4/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index 37436f58f9..b7c2185db2 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-29 14:52-0500\n" +"POT-Creation-Date: 2020-03-02 11:20-0500\n" "PO-Revision-Date: 2019-05-06 14:22-0700\n" "Last-Translator: \n" "Language-Team: LANGUAGE \n" @@ -1169,6 +1169,10 @@ msgstr "" msgid "PulseIn not yet supported" msgstr "" +#: ports/stm32f4/common-hal/pulseio/PulseOut.c +msgid "PulseOut not supported on this chip" +msgstr "" + #: ports/stm32f4/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" diff --git a/locale/pl.po b/locale/pl.po index 132b09b237..dbe9653c84 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-29 14:52-0500\n" +"POT-Creation-Date: 2020-03-02 11:20-0500\n" "PO-Revision-Date: 2019-03-19 18:37-0700\n" "Last-Translator: Radomir Dopieralski \n" "Language-Team: pl\n" @@ -1170,6 +1170,10 @@ msgstr "Podciągnięcie nieużywane w trybie wyjścia." msgid "PulseIn not yet supported" msgstr "" +#: ports/stm32f4/common-hal/pulseio/PulseOut.c +msgid "PulseOut not supported on this chip" +msgstr "" + #: ports/stm32f4/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 01f1624b8d..e9adb9daeb 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-29 14:52-0500\n" +"POT-Creation-Date: 2020-03-02 11:20-0500\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n" "Last-Translator: \n" "Language-Team: \n" @@ -1181,6 +1181,10 @@ msgstr "" msgid "PulseIn not yet supported" msgstr "" +#: ports/stm32f4/common-hal/pulseio/PulseOut.c +msgid "PulseOut not supported on this chip" +msgstr "" + #: ports/stm32f4/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index b094fa274b..a4cdf3fc82 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-29 14:52-0500\n" +"POT-Creation-Date: 2020-03-02 11:20-0500\n" "PO-Revision-Date: 2019-04-13 10:10-0700\n" "Last-Translator: hexthat\n" "Language-Team: Chinese Hanyu Pinyin\n" @@ -1184,6 +1184,10 @@ msgstr "Fāngxiàng shūchū shí Pull méiyǒu shǐyòng." msgid "PulseIn not yet supported" msgstr "Shàng bù zhīchí PulseIn" +#: ports/stm32f4/common-hal/pulseio/PulseOut.c +msgid "PulseOut not supported on this chip" +msgstr "" + #: ports/stm32f4/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "RNG qǔxiāo chūshǐhuà cuòwù" diff --git a/ports/stm32f4/common-hal/pulseio/PulseOut.c b/ports/stm32f4/common-hal/pulseio/PulseOut.c index 033e1c7fe1..d82525ea16 100644 --- a/ports/stm32f4/common-hal/pulseio/PulseOut.c +++ b/ports/stm32f4/common-hal/pulseio/PulseOut.c @@ -105,12 +105,17 @@ STATIC void pulseout_event_handler(void) { } void pulseout_reset() { + #if HAS_BASIC_TIM __HAL_RCC_TIM7_CLK_DISABLE(); refcount = 0; + #endif } void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t* self, const pulseio_pwmout_obj_t* carrier) { +#if !(HAS_BASIC_TIM) + mp_raise_NotImplementedError(translate("PulseOut not supported on this chip")); +#else // Add to active PulseOuts refcount++; @@ -145,6 +150,7 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t* self, self->pwmout = (pulseio_pwmout_obj_t*)carrier; turn_off(self); +#endif } bool common_hal_pulseio_pulseout_deinited(pulseio_pulseout_obj_t* self) { @@ -160,7 +166,9 @@ void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t* self) { refcount--; if (refcount == 0) { + #if HAS_BASIC_TIM __HAL_RCC_TIM7_CLK_DISABLE(); + #endif } } diff --git a/ports/stm32f4/peripherals/stm32f4/periph.h b/ports/stm32f4/peripherals/stm32f4/periph.h index 969a8e79b7..d311afe4a1 100644 --- a/ports/stm32f4/peripherals/stm32f4/periph.h +++ b/ports/stm32f4/peripherals/stm32f4/periph.h @@ -138,23 +138,26 @@ typedef struct { .pin = tim_pin, \ } -//Starter Lines +//Access Lines #ifdef STM32F401xE #define HAS_DAC 0 #define HAS_TRNG 0 +#define HAS_BASIC_TIM 0 #include "stm32f401xe/periph.h" #endif #ifdef STM32F411xE #define HAS_DAC 0 #define HAS_TRNG 0 +#define HAS_BASIC_TIM 0 #include "stm32f411xe/periph.h" #endif #ifdef STM32F412Zx #define HAS_DAC 0 #define HAS_TRNG 1 +#define HAS_BASIC_TIM 1 #include "stm32f412zx/periph.h" #endif @@ -163,12 +166,14 @@ typedef struct { #ifdef STM32F405xx #define HAS_DAC 1 #define HAS_TRNG 1 +#define HAS_BASIC_TIM 1 #include "stm32f405xx/periph.h" #endif #ifdef STM32F407xx #define HAS_DAC 1 #define HAS_TRNG 1 +#define HAS_BASIC_TIM 1 #include "stm32f407xx/periph.h" #endif