diff options
Diffstat (limited to '02-usart/src/main.c')
-rw-r--r-- | 02-usart/src/main.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/02-usart/src/main.c b/02-usart/src/main.c index d26dce4..b050d3e 100644 --- a/02-usart/src/main.c +++ b/02-usart/src/main.c @@ -81,9 +81,18 @@ int main() for (;;); } - const char* thing = "HELLO DMA!\r\n"; - regset(USART2.ic_r, usart_tccf, 1); - dma_mem2p_initiate_transfer(dma_chan, thing, strlen(thing)); + // const char* thing = "Good Thing This Works!"; + + char* str = halloc(128); + strcpy(str, "Hello, Heap!"); + + usart_printf(&USART2, "DATA_SEGMENT_START %p\n", &DATA_SEGMENT_START); + usart_printf(&USART2, "DATA_SEGMENT_STOP: %p\n", &DATA_SEGMENT_STOP); + usart_printf(&USART2, "str at: %p\n", str); + usart_printf(&USART2, "str: %s\n", str); + // usart_printf(&USART2, "%s\n", thing); + // regset(USART2.ic_r, usart_tccf, 1); + // dma_mem2p_initiate_transfer(dma_chan, thing, strlen(thing)); __IO gpio_port_t* port_b = enable_gpio(GPIO_PORT_B); gpio_output_pin_t pin3 = set_gpio_pin_output(port_b, PIN_3); |