Skip to content

changed type of receiver_buffer_size to uint16_t #1984

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

Merged
merged 2 commits into from Jul 8, 2019
Merged

changed type of receiver_buffer_size to uint16_t #1984

merged 2 commits into from Jul 8, 2019

Conversation

ghost
Copy link

@ghost ghost commented Jul 3, 2019

Change type of receiver_buffer_size to uint16_t to permit buffers >255 bytes long.

@jepler
Copy link

jepler commented Jul 5, 2019

Thanks for your pull request, @iot49.

The "travis" checks have failed because there are multiple different implementations of the function "common_hal_busio_uart_construct" in circuitpython; generally, one for each different microcontroller family. I believe that you only changed one of them.

ports/esp8266/common-hal/busio/UART.c:void common_hal_busio_uart_construct(busio_uart_obj_t *self,
ports/nrf/common-hal/busio/UART.c:void common_hal_busio_uart_construct (busio_uart_obj_t *self,

You'll need to change them all (you can do it by adding more commits to this pull request). While doing so, you should look whether a uint16_t value is handled properly . For instance, I reviewed the atmel-samd one, and it appears to be OK because it assigns the receiver_buffer_size to a field of type uint32. If some other implementation assigns to a field of type uint8_t then there would be further changes required to fix that, or else larger buffers would still not be possible on that platform.

@ghost
Copy link
Author

ghost commented Jul 5, 2019

@jepler thanks for the feedback. I made the changes, let's see what Travis thinks.

Note: As you say, the samd port assigns to a uint32_t. The esp8266 port ignores the parameter altogether. But I did not verify these changes on hardware (except nrf).

@tannewt tannewt requested a review from jepler July 5, 2019 20:14
Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good to me (and travis-ci) now.

@tannewt
Copy link
Member

tannewt commented Jul 8, 2019

@jepler feel free to merge after approve.

@tannewt tannewt merged commit 380f1d6 into adafruit:master Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants