diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-02-13 19:49:57 -0500 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2019-02-13 19:49:57 -0500 |
| commit | ab4194f7528dd7df242abc087c6af0c05875cb49 (patch) | |
| tree | 48010ef64320340d7f8d169aecd94af8fe32c5c2 | |
| parent | e92d90ce9cd93454d2c4301a18d49b980e32c65e (diff) | |
don't allocate DMA buffer as long-lived
| -rw-r--r-- | ports/nrf/common-hal/busio/UART.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ports/nrf/common-hal/busio/UART.c b/ports/nrf/common-hal/busio/UART.c index 62a4fedc0..593914afc 100644 --- a/ports/nrf/common-hal/busio/UART.c +++ b/ports/nrf/common-hal/busio/UART.c @@ -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); } |
