don't allocate DMA buffer as long-lived

This commit is contained in:
Dan Halbert 2019-02-13 19:49:57 -05:00
parent e92d90ce9c
commit ab4194f752
1 changed files with 1 additions and 2 deletions

View File

@ -286,8 +286,7 @@ size_t common_hal_busio_uart_write (busio_uart_obj_t *self, const uint8_t *data,
uint8_t * tx_buf = (uint8_t*) data;
if ( !nrfx_is_in_ram(data) ) {
// TODO: If this is not too big, we could allocate it on the stack.
// Do a long-lived alloc so buffer won't move.
tx_buf = (uint8_t *) gc_alloc(len, false, true);
tx_buf = (uint8_t *) gc_alloc(len, false, false);
memcpy(tx_buf, data, len);
}