1 | /*
|
---|
2 | =============================================================================
|
---|
3 | fpu.h -- FPU definitions
|
---|
4 | Version 4 -- 1987-11-05 -- D.N. Lynx Crowe
|
---|
5 | =============================================================================
|
---|
6 | */
|
---|
7 |
|
---|
8 | #pragma once
|
---|
9 |
|
---|
10 | /* preprocessor functions */
|
---|
11 |
|
---|
12 | #define FPUVAL(x) ((x) << 5)
|
---|
13 |
|
---|
14 | /* FPU data areas (word offsets) */
|
---|
15 |
|
---|
16 | #define FPU_OWST 0x00000000L /* waveshape tables */
|
---|
17 | #define FPU_OFNC 0x00002000L /* functions */
|
---|
18 | #define FPU_OINT 0x00002000L /* interrupt read address */
|
---|
19 | #define FPU_OICL 0x00003000L /* interrupt clear address */
|
---|
20 | #define FPU_OCFG 0x00002FF0L /* configuration words */
|
---|
21 | #define FPU_OSYN 0x00002FFFL /* sync word */
|
---|
22 |
|
---|
23 | /* FPU time limits */
|
---|
24 |
|
---|
25 | #define FPU_MAXT 0xFFF0 /* FPU maximum time (65520 ms) */
|
---|
26 | #define FPU_MINT 0x800F /* FPU minimum time (1 ms) */
|
---|
27 |
|
---|
28 | /* FPU value limits */
|
---|
29 |
|
---|
30 | #define VALMAX (1000 << 5)
|
---|
31 | #define VALMIN (-1000 << 5)
|
---|
32 |
|
---|
33 | /* FPU data types */
|
---|
34 |
|
---|
35 | #define FPU_TCTL 0 /* control */
|
---|
36 | #define FPU_TNV0 1 /* new value[0] -- '10' in new value select */
|
---|
37 | #define FPU_TCV1 4 /* voltage 1 */
|
---|
38 | #define FPU_TSF1 5 /* scale factor 1 */
|
---|
39 | #define FPU_TCV2 6 /* voltage 2 */
|
---|
40 | #define FPU_TSF2 7 /* scale factor 2 */
|
---|
41 | #define FPU_TCV3 8 /* voltage 3 */
|
---|
42 | #define FPU_TSF3 9 /* scale factor 3 */
|
---|
43 | #define FPU_TMNT 10 /* time mantissa */
|
---|
44 | #define FPU_TEXP 11 /* time exponent */
|
---|
45 | #define FPU_TNV1 14 /* new value[1] -- '01' in new value select */
|
---|