<ul>
<li>code :</li>
</ul>
<pre><code>
#include <stdio.h>
#include "periph/uart.h"


void uart_rx_cb(void *arg, uint8_t data) {
    int i = 0;
    if (arg == NULL) {
        i += 0;
    }
    //printf("uart data: %d", data);                                                                                                                                                                               
    data += 1;

    return; //TODO                                                                                                                                                                                                 
}


int main(void)
{
    puts("Hello World!");

    printf("You are running RIOT on a(n) %s board.\n", RIOT_BOARD);
    printf("This board features a(n) %s MCU.\n", RIOT_MCU);

    uart_t uart_id = 1;
    uint32_t baudrate = 115200;
    uint32_t key = 111;
    int ret = uart_init(uart_id, baudrate, uart_rx_cb, (void *)&key);
    if (ret != UART_OK) {
        printf("Init uart  %d , return error code %d", uart_id, ret);
    }
    else {
        printf("Init uart  %d", uart_id);
    }

    return 0;
}

</code></pre>
<ul>
<li>uart_init seems not return.  running log is :</li>
</ul>
<pre><code>/home/huaxing/oproj/riot/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyUSB0" -b "115200"
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2019-06-02 14:00:40,019 - INFO # Connect to serial port /dev/ttyUSB0
Welcome to pyterm!
Type '/exit' to exit.
2019-06-02 14:00:42,755 - INFO # main(): This is RIOT! (Version: 2019.04)
2019-06-02 14:00:42,756 - INFO # Hello World!
2019-06-02 14:00:42,760 - INFO # You are running RIOT on a(n) stm32f407vet6 board.
2019-06-02 14:00:42,764 - INFO # This board features a(n) stm32f407 MCU.

</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/issues/11613?email_source=notifications&email_token=ABE7WYGEPXQPNTOY2SKMPBLPYNPD3A5CNFSM4HSB6PH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXEDSKA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYBVEM22Q2FC2DLSOOTPYNPD3ANCNFSM4HSB6PHQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABE7WYGGGQVEM72GEAZDCODPYNPD3A5CNFSM4HSB6PH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXEDSKA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/issues/11613?email_source=notifications\u0026email_token=ABE7WYGEPXQPNTOY2SKMPBLPYNPD3A5CNFSM4HSB6PH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXEDSKA",
"url": "https://github.com/RIOT-OS/RIOT/issues/11613?email_source=notifications\u0026email_token=ABE7WYGEPXQPNTOY2SKMPBLPYNPD3A5CNFSM4HSB6PH2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GXEDSKA",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>