Exemple #1
0
void uart_poweron(uart_t uart)
{
    assert(uart < UART_NUMOF);
#ifdef STM32_PM_STOP
    if (isr_ctx[uart].rx_cb) {
        pm_block(STM32_PM_STOP);
    }
#endif
    periph_clk_en(uart_config[uart].bus, uart_config[uart].rcc_mask);
}
Exemple #2
0
int i2c_acquire(i2c_t dev)
{
    assert(dev < I2C_NUMOF);

    mutex_lock(&locks[dev]);

#ifdef STM32_PM_STOP
    /* block STOP mode */
    pm_block(STM32_PM_STOP);
#endif

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

    return 0;
}
Exemple #3
0
void rq_block(struct request *rq)
{
	pm_block(rq->proc, BR_WAIT_FS);
	rq->blocked = 1;
}