Hint added.
[AROS.git] / workbench / hidds / sm502 / hardware.h
blob194eb78a3448d61600c3a9879499fc4417c844f4
1 #ifndef HARDWARE_H
2 #define HARDWARE_H
4 #include <exec/types.h>
5 #include <oop/oop.h>
7 struct SM502_HWData
9 APTR mmio;
10 APTR framebuffer;
11 ULONG fbsize;
12 ULONG width;
13 ULONG height;
14 ULONG disp_width;
15 ULONG disp_height;
16 ULONG xoffset;
17 ULONG yoffset;
18 ULONG depth;
19 ULONG bytesperpixel;
20 ULONG bitsperpixel;
21 ULONG redmask;
22 ULONG greenmask;
23 ULONG bluemask;
24 ULONG redshift;
25 ULONG greenshift;
26 ULONG blueshift;
27 ULONG bytesperline;
28 BOOL owned;
29 UWORD palettewidth;
30 /* Used by PCI scanning routine */
31 OOP_AttrBase pciDeviceAttrBase;
34 static inline ULONG smread(struct SM502_HWData *hw, ULONG reg)
36 return (ULONG)AROS_LE2LONG(*(volatile LONG *)(hw->mmio + reg));
39 static inline VOID smwrite(struct SM502_HWData *hw, ULONG reg, ULONG val)
41 *(volatile LONG *)(hw->mmio + reg) = AROS_LONG2LE((LONG)val);
44 #undef HiddPCIDeviceAttrBase
45 #define HiddPCIDeviceAttrBase sd->pciDeviceAttrBase
47 struct SM502Gfx_staticdata;
48 struct BitmapData;
50 BOOL initSM502GfxHW(struct SM502_HWData *);
51 void DACLoad(struct SM502Gfx_staticdata *, UBYTE *, unsigned char, int);
52 void ClearBuffer(struct SM502_HWData *data);
53 void sm502DoRefreshArea(struct SM502_HWData *hwdata, struct BitmapData *data,
54 LONG x1, LONG y1, LONG x2, LONG y2);
56 #endif