MCPcopy Create free account
hub / github.com/Santroller/Santroller / process_dma

Function process_dma

lib/peripherals/i2c.cpp:18–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16 uint8_t *rbuf,
17 size_t rbuf_len);
18inline void process_dma(i2c_dma_t *i2c_dma)
19{
20 if (i2c_dma->running)
21 {
22 i2c_dma->running = false;
23 cancel_alarm(i2c_dma->timeout_alarm_id);
24 if (i2c_dma->abort_detected || !i2c_dma->stop_detected)
25 {
26 dma_channel_abort(i2c_dma->tx_chan);
27 if (i2c_dma->reading)
28 {
29 dma_channel_abort(i2c_dma->rx_chan);
30 }
31 }
32 }
33 if (i2c_dma->dmaInterface[i2c_dma->currentDevAddr])
34 {
35 i2c_dma->dmaInterface[i2c_dma->currentDevAddr]->processData(i2c_dma->currentDevAddr, i2c_dma->running, i2c_dma->timeout, i2c_dma->abort_detected, i2c_dma->stop_detected);
36 }
37 i2c_dma->timeout = false;
38 i2c_dma->abort_detected = false;
39 i2c_dma->stop_detected = false;
40 i2c_dma->processing = false;
41}
42
43static i2c_dma_t i2c_dma_list[2] = {0};
44static void i2c_dma_irq_handler(i2c_dma_t *i2c_dma)

Callers 2

i2c_dma_irq_handlerFunction · 0.85
timeout_handlerFunction · 0.85

Calls 1

processDataMethod · 0.45

Tested by

no test coverage detected