Skip to content

Commit 64c736f

Browse files
authored
Merge pull request #10976 from ChrisNourse/feature/add_audioio_to_stm32
ports/stm: add audioio.AudioOut for STM32F405/F407
2 parents 03b092b + 9e2d48a commit 64c736f

13 files changed

Lines changed: 2074 additions & 3 deletions

File tree

locale/circuitpython.pot

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ msgid "%q indices must be integers, not %s"
140140
msgstr ""
141141

142142
#: ports/analog/common-hal/busio/SPI.c ports/analog/common-hal/busio/UART.c
143+
#: ports/stm/common-hal/audioio/AudioOut.c
143144
#: shared-bindings/digitalio/DigitalInOutProtocol.c
144145
#: shared-module/busdisplay/BusDisplay.c
145146
msgid "%q init failed"
@@ -889,10 +890,12 @@ msgid "Critical ROS failure during soft reboot, reset required: %d"
889890
msgstr ""
890891

891892
#: ports/stm/common-hal/analogio/AnalogOut.c
893+
#: ports/stm/common-hal/audioio/AudioOut.c
892894
msgid "DAC Channel Init Error"
893895
msgstr ""
894896

895897
#: ports/stm/common-hal/analogio/AnalogOut.c
898+
#: ports/stm/common-hal/audioio/AudioOut.c
896899
msgid "DAC Device Init Error"
897900
msgstr ""
898901

@@ -1541,6 +1544,7 @@ msgstr ""
15411544

15421545
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
15431546
#: ports/stm/common-hal/analogio/AnalogOut.c
1547+
#: ports/stm/common-hal/audioio/AudioOut.c
15441548
msgid "No DAC on chip"
15451549
msgstr ""
15461550

@@ -4049,7 +4053,7 @@ msgstr ""
40494053
msgid "output array must be contiguous"
40504054
msgstr ""
40514055

4052-
#: py/objint_mpz.c
4056+
#: py/objint_longlong.c py/objint_mpz.c
40534057
msgid "overflow converting long int to machine word"
40544058
msgstr ""
40554059

ports/stm/common-hal/analogio/AnalogOut.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,9 @@ typedef struct {
2828
} analogio_analogout_obj_t;
2929

3030
void analogout_reset(void);
31+
32+
// Shared DAC peripheral handle (defined in AnalogOut.c).
33+
// AudioOut reuses this handle for DMA-triggered DAC operation on channel 1.
34+
#if HAS_DAC
35+
extern DAC_HandleTypeDef handle;
36+
#endif

0 commit comments

Comments
 (0)