blob: 17937501079d9e29d34a0103e7191fa99fbe7c0a [file] [log] [blame]
Sylvain Munaut26bc4652020-09-14 10:19:49 +02001/*
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
12typedef void (*dma_cb)(void *);
13
14/* Direction
15 * 0 is E1 to USB
16 * 1 is USB to E1
17 */
18
19bool dma_ready(void);
20void dma_exec(unsigned addr_e1, unsigned addr_usb, unsigned len, bool dir,
21 dma_cb cb_fn, void *cb_data);
22
23bool dma_poll(void);