Пример #1
0
Файл: uart.c Проект: A-Paul/RIOT
void uart_poweroff(uart_t uart)
{
    assert(uart < UART_NUMOF);

    periph_clk_dis(uart_config[uart].bus, uart_config[uart].rcc_mask);
#ifdef STM32_PM_STOP
    if (isr_ctx[uart].rx_cb) {
        pm_unblock(STM32_PM_STOP);
    }
#endif
}
Пример #2
0
void rq_finish(struct request *rq)
{
	if (rq->proc) {
		if (rq->blocked)
			pm_unblock(rq->proc);

		sc_late_result(rq->proc, (dword)rq->result);
	}
	else if (rq->func) {
		rq->func(rq->file, rq->result, rq->buffer, rq->buflen);
	}
	kfree(rq);
}
Пример #3
0
int i2c_release(i2c_t dev)
{
    assert(dev < I2C_NUMOF);

    periph_clk_dis(i2c_config[dev].bus, i2c_config[dev].rcc_mask);

#ifdef STM32_PM_STOP
    /* unblock STOP mode */
    pm_unblock(STM32_PM_STOP);
#endif

    mutex_unlock(&locks[dev]);
    return 0;
}