nuclear@1: #ifndef COPPER_H_ nuclear@1: #define COPPER_H_ nuclear@1: nuclear@1: #include "inttypes.h" nuclear@1: nuclear@2: #define COPPER_MOVE(reg, data) (((uint32_t)(reg) << 16) | ((uint32_t)(data) & 0xffff)) nuclear@1: #define COPPER_WAIT(x, y) \ nuclear@1: (0x0001fffe | ((uint32_t)((x) + 0x81) << 16) | ((uint32_t)((y) + 0x2c) << 24)) nuclear@1: #define COPPER_WAIT_OVERSCAN(x, y) \ nuclear@1: (0x0001fffe | ((uint32_t)(x) << 16) | ((uint32_t)(y) << 24)) nuclear@1: #define COPPER_VWAIT(s) (0x0001ff00 | ((uint32_t)((s) + 0x2c) << 24)) nuclear@1: #define COPPER_VWAIT_OVERSCAN(s) \ nuclear@1: (0x0001ff00 | ((uint32_t)(s) << 24)) nuclear@1: #define COPPER_END 0xfffffffe nuclear@1: nuclear@2: extern uint32_t *copperlist, *copperlist_end; nuclear@1: nuclear@1: enum { nuclear@1: COPPER_SINGLE = 1, nuclear@1: COPPER_DOUBLE = 2 nuclear@1: }; nuclear@1: nuclear@1: int init_copper(int maxlist, int nlists); nuclear@1: void cleanup_copper(void); nuclear@1: nuclear@1: /* enables copper DMA */ nuclear@1: void enable_copper(void); nuclear@1: /* disables copper DMA */ nuclear@1: void disable_copper(void); nuclear@1: nuclear@1: void clear_copper(void); nuclear@1: void add_copper(uint32_t cmd); nuclear@1: void sort_copper(void); /* TODO */ nuclear@1: nuclear@1: void swap_copper(void); nuclear@1: nuclear@1: nuclear@1: #endif /* COPPER_H_ */