amiga_boottest

view src/copper.h @ 4:995d42b33974

serial output
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 23 Feb 2018 13:29:37 +0200
parents 48093e4bd99a
children
line source
1 #ifndef COPPER_H_
2 #define COPPER_H_
4 #include "inttypes.h"
6 #define COPPER_MOVE(reg, data) (((uint32_t)(reg) << 16) | ((uint32_t)(data) & 0xffff))
7 #define COPPER_WAIT(x, y) \
8 (0x0001fffe | ((uint32_t)((x) + 0x81) << 16) | ((uint32_t)((y) + 0x2c) << 24))
9 #define COPPER_WAIT_OVERSCAN(x, y) \
10 (0x0001fffe | ((uint32_t)(x) << 16) | ((uint32_t)(y) << 24))
11 #define COPPER_VWAIT(s) (0x0001ff00 | ((uint32_t)((s) + 0x2c) << 24))
12 #define COPPER_VWAIT_OVERSCAN(s) \
13 (0x0001ff00 | ((uint32_t)(s) << 24))
14 #define COPPER_OVERFLOW 0xffdffffe
15 #define COPPER_END 0xfffffffe
17 extern uint32_t *copperlist, *copperlist_end;
19 enum {
20 COPPER_SINGLE = 1,
21 COPPER_DOUBLE = 2
22 };
24 int init_copper(int maxlist, int nlists);
25 void cleanup_copper(void);
27 /* enables copper DMA */
28 void enable_copper(void);
29 /* disables copper DMA */
30 void disable_copper(void);
32 void clear_copper(void);
33 void add_copper(uint32_t cmd);
34 void sort_copper(void); /* TODO */
36 void swap_copper(void);
39 #endif /* COPPER_H_ */