nrf: Add second UARTE to busio.UART. Init uarts on startup.#1541
Merged
Conversation
tannewt
requested changes
Feb 13, 2019
Member
tannewt
left a comment
There was a problem hiding this comment.
One comment about the allocation. Everything else looks great. Thanks!
| if ( !nrfx_is_in_ram(data) ) { | ||
| tx_buf = (uint8_t *) gc_alloc(len, false, false); | ||
| // TODO: If this is not too big, we could allocate it on the stack. | ||
| // Do a long-lived alloc so buffer won't move. |
Member
There was a problem hiding this comment.
This shouldn't be long-lived because it is freed below. That will leave a hole in the long-lived area. It won't move because no other python bytecode is run while it's alive.
Collaborator
Author
There was a problem hiding this comment.
OK, I was worried that MICROPY_VM_HOOK_LOOP might end up doing something. But it looks like even the displayio stuff will not trigger anything. (Just checking.)
Collaborator
Author
|
Updated to not use long-lived. Travis is happy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes remaining tasks in #1039.