Commit 8f89e42
committed
Enhance DEBUG_UART feature (used by printf)
If the debug UART is not initialized by a Serial instance, init it at 9600 (8N1) by default.
Else use the config done by the Serial instance.
Those values could be redefined in the variant.h
DEBUG_UART could be redefined to print on another instance than 'Serial'
#define DEBUG_UART ((USART_TypeDef *) U(S)ARTX) // ex: USART3
DEBUG_UART baudrate, default: 9600 if not defined
#define DEBUG_UART_BAUDRATE 115200
DEBUG_UART Tx pin name, default: the first one found in PinMap_UART_TX for DEBUG_UART
#define DEBUG_PINNAME_TX PX_n // PinName used for TX
Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>1 parent 9258d83 commit 8f89e42
2 files changed
+54
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| |||
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
| 93 | + | |
| 94 | + | |
86 | 95 | | |
87 | 96 | | |
88 | 97 | | |
| |||
402 | 411 | | |
403 | 412 | | |
404 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
405 | 439 | | |
406 | 440 | | |
407 | | - | |
408 | 441 | | |
409 | 442 | | |
410 | 443 | | |
411 | 444 | | |
412 | 445 | | |
413 | 446 | | |
414 | 447 | | |
415 | | - | |
416 | 448 | | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
417 | 454 | | |
418 | 455 | | |
419 | | - | |
| 456 | + | |
420 | 457 | | |
421 | 458 | | |
422 | 459 | | |
423 | 460 | | |
424 | 461 | | |
425 | 462 | | |
426 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
427 | 471 | | |
428 | 472 | | |
429 | 473 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
112 | 116 | | |
113 | 117 | | |
114 | 118 | | |
| |||
0 commit comments