Update StateMachine.c

Changed woring to use max instead
This commit is contained in:
Jonny Bergdahl 2021-02-27 00:07:30 +01:00 committed by GitHub
parent 888a0c5f08
commit f7eac46c78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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 max 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 max 4 bytes long"));
}
bool ok = common_hal_rp2pio_statemachine_write_readinto(self,