2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
5 Desc: m68k-amiga hardware registers
12 #include <exec/types.h>
20 /** Screen/Serial Debug **/
22 #define SERPER_BASE_PAL 3546895
23 #define SERPER_BASE_NTSC 3579545
25 #define SERPER_BAUD(base, x) ((((base + (x)/2))/(x)-1) & 0x7fff) /* Baud rate */
27 #define SERDATR_OVRUN (1 << 15) /* Overrun */
28 #define SERDATR_RBF (1 << 14) /* Rx Buffer Full */
29 #define SERDATR_TBE (1 << 13) /* Tx Buffer Empty */
30 #define SERDATR_TSRE (1 << 12) /* Tx Shift Empty */
31 #define SERDATR_RXD (1 << 11) /* Rx Pin */
32 #define SERDATR_STP9 (1 << 9) /* Stop bit (if 9 data) */
33 #define SERDATR_STP8 (1 << 8) /* Stop bit (if 8 data) */
34 #define SERDATR_DB9_of(x) ((x) & 0x1ff) /* 9-bit data */
35 #define SERDATR_DB8_of(x) ((x) & 0xff) /* 8-bit data */
37 #define ADKCON_SETCLR (1 << 15)
38 #define ADKCON_UARTBRK (1 << 11) /* Force break */
40 #define SERDAT_STP9 (1 << 9)
41 #define SERDAT_STP8 (1 << 8)
42 #define SERDAT_DB9(x) ((x) & 0x1ff)
43 #define SERDAT_DB8(x) ((x) & 0xff)
49 static inline void reg_w(ULONG reg
, UWORD val
)
51 volatile UWORD
*r
= (void *)(0xdff000 + reg
);
56 static inline UWORD
reg_r(ULONG reg
)
58 volatile UWORD
*r
= (void *)(0xdff000 + reg
);
63 #endif /* AMIGA_HWREG_H */