Sylvain Munaut | 26bc465 | 2020-09-14 10:19:49 +0200 | [diff] [blame] | 1 | /* |
2 | * dma.h | ||||
3 | * | ||||
4 | * Copyright (C) 2019-2020 Sylvain Munaut <tnt@246tNt.com> | ||||
5 | * SPDX-License-Identifier: GPL-3.0-or-later | ||||
6 | */ | ||||
7 | |||||
8 | #pragma once | ||||
9 | |||||
10 | #include <stdbool.h> | ||||
11 | |||||
12 | typedef void (*dma_cb)(void *); | ||||
13 | |||||
14 | /* Direction | ||||
15 | * 0 is E1 to USB | ||||
16 | * 1 is USB to E1 | ||||
17 | */ | ||||
18 | |||||
19 | bool dma_ready(void); | ||||
20 | void dma_exec(unsigned addr_e1, unsigned addr_usb, unsigned len, bool dir, | ||||
21 | dma_cb cb_fn, void *cb_data); | ||||
22 | |||||
23 | bool dma_poll(void); |