Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update StateMachine.c #4276

Merged
merged 4 commits into from
Mar 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions locale/circuitpython.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1086,7 +1086,7 @@ msgid "IV must be %d bytes long"
msgstr ""

#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "In buffer elements must be 4 bytes long or less"
msgid "In-buffer elements must be <= 4 bytes long"
msgstr ""

#: py/persistentcode.c
Expand Down Expand Up @@ -1687,10 +1687,6 @@ msgstr ""
msgid "Operation timed out"
msgstr ""

#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out buffer elements must be 4 bytes long or less"
msgstr ""

#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
msgid "Out of memory"
msgstr ""
Expand All @@ -1699,6 +1695,10 @@ msgstr ""
msgid "Out of sockets"
msgstr ""

#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
msgid "Out-buffer elements must be <= 4 bytes long"
msgstr ""

#: shared-bindings/bitops/__init__.c
#, c-format
msgid "Output buffer must be at least %d bytes"
Expand Down
4 changes: 2 additions & 2 deletions ports/raspberrypi/bindings/rp2pio/StateMachine.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,12 +468,12 @@ STATIC mp_obj_t rp2pio_statemachine_write_readinto(size_t n_args, const mp_obj_t

int in_stride_in_bytes = mp_binary_get_size('@', buf_in_info.typecode, NULL);
if (in_stride_in_bytes > 4) {
mp_raise_ValueError(translate("In buffer elements must be 4 bytes long or less"));
mp_raise_ValueError(translate("In-buffer elements must be <= 4 bytes long"));
}

int out_stride_in_bytes = mp_binary_get_size('@', buf_out_info.typecode, NULL);
if (out_stride_in_bytes > 4) {
mp_raise_ValueError(translate("Out buffer elements must be 4 bytes long or less"));
mp_raise_ValueError(translate("Out-buffer elements must be <= 4 bytes long"));
}

bool ok = common_hal_rp2pio_statemachine_write_readinto(self,
Expand Down