Skip to content

Commit 1518226

Browse files
committed
qspibus: fix begin_transaction() consistency and regenerate .pot
- Align begin_transaction() with bus_free() by delegating to it, so transfer_in_progress and has_pending_command are checked before entering a transaction. This prevents silently discarding a staged write_command() or starting a transaction during active DMA. - Regenerate locale/circuitpython.pot to remove stale "Data buffer is null" entry left over from the previous round of error message reuse.
1 parent 48aaf51 commit 1518226

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

locale/circuitpython.pot

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,6 @@ msgid "Buffer too short by %d bytes"
711711
msgstr ""
712712

713713
#: ports/cxd56/common-hal/camera/Camera.c
714-
#: ports/espressif/common-hal/qspibus/QSPIBus.c
715714
#: shared-bindings/busdisplay/BusDisplay.c
716715
#: shared-bindings/framebufferio/FramebufferDisplay.c
717716
#: shared-bindings/struct/__init__.c shared-module/struct/__init__.c
@@ -874,8 +873,7 @@ msgstr ""
874873
msgid "Coordinate arrays types have different sizes"
875874
msgstr ""
876875

877-
#: shared-module/usb/core/Device.c
878-
#: ports/espressif/common-hal/qspibus/QSPIBus.c
876+
#: ports/espressif/common-hal/qspibus/QSPIBus.c shared-module/usb/core/Device.c
879877
msgid "Could not allocate DMA capable buffer"
880878
msgstr ""
881879

@@ -917,10 +915,6 @@ msgstr ""
917915
msgid "Data 0 pin must be byte aligned"
918916
msgstr ""
919917

920-
#: ports/espressif/common-hal/qspibus/QSPIBus.c
921-
msgid "Data buffer is null"
922-
msgstr ""
923-
924918
#: shared-module/jpegio/JpegDecoder.c
925919
msgid "Data format error (may be broken data)"
926920
msgstr ""
@@ -1536,7 +1530,7 @@ msgstr ""
15361530
#: ports/stm/common-hal/busio/UART.c shared-bindings/fourwire/FourWire.c
15371531
#: shared-bindings/i2cdisplaybus/I2CDisplayBus.c
15381532
#: shared-bindings/paralleldisplaybus/ParallelBus.c
1539-
#: shared-module/bitbangio/SPI.c
1533+
#: shared-bindings/qspibus/QSPIBus.c shared-module/bitbangio/SPI.c
15401534
msgid "No %q pin"
15411535
msgstr ""
15421536

ports/espressif/common-hal/qspibus/QSPIBus.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -506,12 +506,10 @@ bool common_hal_qspibus_qspibus_bus_free(mp_obj_t obj) {
506506

507507
bool common_hal_qspibus_qspibus_begin_transaction(mp_obj_t obj) {
508508
qspibus_qspibus_obj_t *self = MP_OBJ_TO_PTR(obj);
509-
if (!self->bus_initialized || self->in_transaction) {
509+
if (!common_hal_qspibus_qspibus_bus_free(obj)) {
510510
return false;
511511
}
512512
self->in_transaction = true;
513-
self->has_pending_command = false;
514-
self->pending_command = 0;
515513
return true;
516514
}
517515

0 commit comments

Comments
 (0)