コード例 #1
0
ファイル: uart.c プロジェクト: LucaZulberti/RIOT
void uart_cleanup(void) {
    native_async_read_cleanup();

    for (uart_t uart = 0; uart < UART_NUMOF; uart++) {
        if (uart_config[uart].rx_cb != NULL) {
            real_close(tty_fds[uart]);
        }
    }
}
コード例 #2
0
void netdev2_tap_cleanup(netdev2_tap_t *dev)
{
    /* Do we have a device */
    if (!dev) {
        return;
    }

    /* cleanup signal handling */
    native_async_read_cleanup();

    /* close the tap device */
    real_close(dev->tap_fd);
}