Revision 2685de93

View differences:

core/src/aos_debug.c
51 51
 * @brief   Actively waits for the serial driver to be empty.
52 52
 */
53 53
static inline void _serialWaitForEmpty(SerialDriver* sdp) {
54
  while (!((sdp->usart->SR) & USART_SR_TC)) {
54
  while (sdPutWouldBlock(sdp)) {
55 55
    continue;
56 56
  }
57 57
  return;
......
68 68
{
69 69
  unsigned int i = 0;
70 70
  while (str[i] != '\0') {
71
    sdp->usart->DR = str[i];
71
    sdPut(sdp, str[i]);
72 72
    _serialWaitForEmpty(sdp);
73 73
    ++i;
74 74
  }

Also available in: Unified diff