]>
wirehaze git hosting - stm32f411ceu6.git/blob - kentry.c
33b829549499e656dba32db722bab7e972c3f08b
3 static const char *text
[] = {
7 "maybe i should give you a name.\r\n",
8 "but that's a slippery slope.\r\n",
9 "you're only in my head.\r\n",
10 "we have to remember that.\r\n",
12 "it's actually happening, i'm talking to an imaginary person.\r\n\n"
18 unsigned int line
, off
;
20 /* Test UART and LED ---------------------------------------------------- */
24 for (line
= 0; line
< sizeof text
/ sizeof *text
; ++line
)
26 /* Print current line */
28 while (text
[line
][off
])
30 /* TXE: Transmit data register empty */
31 while (!(*USART1_SR
& (1u << 7))); /* 0: Data is not transferred
32 to the shift register */
34 /* DR[8:0]: Data value */
35 *USART1_DR
= text
[line
][off
++];
38 /* TC: Transmission complete */
39 while (!(*USART1_SR
& (1u << 6))); /* 0: Transmission is not
43 *GPIOC_ODR
^= (1u << 13);