Skip to content

Commit

Permalink
[stm] implementation of audiopwmio
Browse files Browse the repository at this point in the history
Based on nrf PWMAudioOut by @jepler and stm PulseOut by @hierophect

Tested on a Meowbit
  • Loading branch information
tyomitch committed Mar 13, 2021
1 parent 550eab2 commit fc9b42a
Show file tree
Hide file tree
Showing 15 changed files with 466 additions and 11 deletions.
18 changes: 16 additions & 2 deletions locale/circuitpython.pot
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ msgstr ""
#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/raspberrypi/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c
#: py/objstrunicode.c
msgid "%q index out of range"
Expand Down Expand Up @@ -406,6 +407,10 @@ msgstr ""
msgid "AnalogOut not supported on given pin"
msgstr ""

#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c
msgid "Another PWMAudioOut is already active"
msgstr ""

#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
msgid "Another send is already active"
Expand Down Expand Up @@ -520,6 +525,7 @@ msgid "Buffer is too small"
msgstr ""

#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c
#, c-format
msgid "Buffer length %d too big. It must be less than %d"
msgstr ""
Expand Down Expand Up @@ -962,6 +968,7 @@ msgstr ""
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/raspberrypi/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c
#, c-format
msgid "Failed to allocate RX buffer of %d bytes"
Expand All @@ -975,6 +982,10 @@ msgstr ""
msgid "Failed to allocate wifi scan memory"
msgstr ""

#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c
msgid "Failed to buffer the sample"
msgstr ""

#: ports/nrf/common-hal/_bleio/Adapter.c
msgid "Failed to connect: internal error"
msgstr ""
Expand Down Expand Up @@ -1247,7 +1258,7 @@ msgstr ""
msgid "Invalid format chunk size"
msgstr ""

#: ports/esp32s2/common-hal/pwmio/PWMOut.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency"
msgstr ""

Expand Down Expand Up @@ -2291,7 +2302,7 @@ msgstr ""
msgid "Unsupported format"
msgstr ""

#: py/moduerrno.c
#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c
msgid "Unsupported operation"
msgstr ""

Expand Down Expand Up @@ -3699,6 +3710,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/cxd56/common-hal/pulseio/PulseIn.c
#: ports/nrf/common-hal/pulseio/PulseIn.c
#: ports/raspberrypi/common-hal/pulseio/PulseIn.c
#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c
#: shared-bindings/ps2io/Ps2.c
msgid "pop from empty %q"
Expand All @@ -3724,6 +3736,8 @@ msgstr ""
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h
#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h
#: ports/esp32s2/boards/franzininho_wifi_wroom/mpconfigboard.h
#: ports/esp32s2/boards/franzininho_wifi_wrover/mpconfigboard.h
#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
#: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h
Expand Down
2 changes: 2 additions & 0 deletions ports/stm/boards/espruino_pico/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ LD_FILE = boards/STM32F401xd_fs.ld
# lto for this port, and if other stuff hasn't been added in the
# meantime
CIRCUITPY_ULAB = 0
CIRCUITPY_AUDIOCORE = 0
CIRCUITPY_AUDIOPWMIO = 0
CIRCUITPY_BUSDEVICE = 0
CIRCUITPY_BITMAPTOOLS = 0
CIRCUITPY_FRAMEBUFFERIO = 0
Expand Down
4 changes: 4 additions & 0 deletions ports/stm/boards/espruino_wifi/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ MCU_PACKAGE = UFQFPN48

LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F411_fs.ld

# Too big for the flash
CIRCUITPY_AUDIOCORE = 0
CIRCUITPY_AUDIOPWMIO = 0
4 changes: 4 additions & 0 deletions ports/stm/boards/pyb_nano_v2/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ MCU_PACKAGE = UFQFPN48

LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F411_fs.ld

# Too big for the flash
CIRCUITPY_AUDIOCORE = 0
CIRCUITPY_AUDIOPWMIO = 0
4 changes: 4 additions & 0 deletions ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ MCU_PACKAGE = UFQFPN48

LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F411_fs.ld

# Too big for the flash
CIRCUITPY_AUDIOCORE = 0
CIRCUITPY_AUDIOPWMIO = 0
4 changes: 4 additions & 0 deletions ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ MCU_PACKAGE = LQFP100_f4

LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F411_fs.ld

# Too big for the flash
CIRCUITPY_AUDIOCORE = 0
CIRCUITPY_AUDIOPWMIO = 0
Loading

0 comments on commit fc9b42a

Please sign in to comment.