示例#1
0
文件: SPI.cpp 项目: sg-/mbed-drivers
void SPI::abort_transfer()
{
    spi_abort_asynch(&_spi);
#if TRANSACTION_QUEUE_SIZE_SPI
    dequeue_transaction();
#endif
}
示例#2
0
文件: spi_api.c 项目: jorisa/mbed
static void spi_err_irq(IRQn_Type irq_num, uint32_t index)
{
    spi_t *obj = spi_data[index].async_obj;
    spi_abort_asynch(obj);
    spi_data[index].event = SPI_EVENT_ERROR;
    if (spi_data[index].wanted_events & SPI_EVENT_ERROR) {
        ((void (*)())spi_data[index].async_callback)();
    }
}