Merge pull request #4276 from bergdahl/patch-1

Update StateMachine.c
This commit is contained in:
Dan Halbert 2021-03-02 17:11:45 -05:00 committed by GitHub
commit 15615effc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -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
@ -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 ""
@ -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"

View File

@ -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,