17 SlaChipSelect0 = 0x00,
18 SlaChipSelect1 = 0x40,
19 SlaChipSelect2 = 0x80,
35 #define SLA_PORT_D0 (0x01)
36 #define SLA_PORT_D1 (0x02)
37 #define SLA_PORT_D2 (0x04)
38 #define SLA_PORT_D3 (0x08)
39 #define SLA_PORT_D4 (0x10)
40 #define SLA_PORT_D5 (0x20)
41 #define SLA_PORT_D6 (0x40)
42 #define SLA_PORT_D7 (0x80)
48 #define SLA_BIT_CO7 (SLA_PORT_D7)
49 #define SLA_BIT_CO6 (SLA_PORT_D6)
50 #define SLA_BIT_CO5 (SLA_PORT_D5)
51 #define SLA_BIT_CO4 (SLA_PORT_D4)
52 #define SLA_BIT_CO3 (SLA_PORT_D3)
53 #define SLA_BIT_CO2 (SLA_PORT_D2)
54 #define SLA_BIT_CO1 (SLA_PORT_D1)
55 #define SLA_BIT_CO0 (SLA_PORT_D0)
62 #define SLA_BIT_ID1 ( SLA_BIT_CO7 )
63 #define SLA_BIT_ID0 ( SLA_BIT_CO6 )
64 #define SLA_BIT_RS ( SLA_BIT_CO5 )
65 #define SLA_BIT_RW ( SLA_BIT_CO4 )
66 #define SLA_BIT_DF1 ( SLA_BIT_CO3 )
67 #define SLA_BIT_DF0 ( SLA_BIT_CO2 )
68 #define SLA_BIT_CM1 ( SLA_BIT_CO1 )
69 #define SLA_BIT_CM0 ( SLA_BIT_CO0 )
71 #define SLA_BIT_LO(x) ( 0 )
72 #define SLA_BIT_HI(x) ( x )
79 #define SLA_REG_IDENT0 (SLA_BIT_LO( SLA_BIT_ID1 ) | SLA_BIT_LO( SLA_BIT_ID0 ))
80 #define SLA_REG_IDENT1 (SLA_BIT_LO( SLA_BIT_ID1 ) | SLA_BIT_HI( SLA_BIT_ID0 ))
81 #define SLA_REG_IDENT2 (SLA_BIT_HI( SLA_BIT_ID1 ) | SLA_BIT_LO( SLA_BIT_ID0 ))
82 #define SLA_REG_IDENT3 (SLA_BIT_HI( SLA_BIT_ID1 ) | SLA_BIT_HI( SLA_BIT_ID0 ))
85 #define SLA_REG_DATA SLA_BIT_LO( SLA_BIT_RS )
86 #define SLA_REG_DIR SLA_BIT_HI( SLA_BIT_RS )
88 #define SLA_REG_READ SLA_BIT_LO( SLA_BIT_RW )
89 #define SLA_REG_WRITE SLA_BIT_HI( SLA_BIT_RW )
92 #define SLA_REG_DF_ALL (SLA_BIT_LO( SLA_BIT_DF1 ) | SLA_BIT_LO( SLA_BIT_DF0 ))
93 #define SLA_REG_DF_CLR (SLA_BIT_HI( SLA_BIT_DF1 ) | SLA_BIT_LO( SLA_BIT_DF0 ))
94 #define SLA_REG_DF_SET (SLA_BIT_HI( SLA_BIT_DF1 ) | SLA_BIT_HI( SLA_BIT_DF0 ))
97 #define SLA_REG_CM_1NM (SLA_BIT_LO( SLA_BIT_CM1 ) | SLA_BIT_LO( SLA_BIT_CM0 ))
98 #define SLA_REG_CM_AM (SLA_BIT_LO( SLA_BIT_CM1 ) | SLA_BIT_HI( SLA_BIT_CM0 ))
99 #define SLA_REG_CM_ANM (SLA_BIT_HI( SLA_BIT_CM1 ) | SLA_BIT_LO( SLA_BIT_CM0 ))
100 #define SLA_REG_CM_1M (SLA_BIT_HI( SLA_BIT_CM1 ) | SLA_BIT_HI( SLA_BIT_CM0 ))
104 #define SLA_CMD( id, rs, rw, df, cm ) ( (id) | (rs) | (rw) | (df) | (cm) )
113 #define SLA_CMD_DATA_READ( id, cm ) SLA_CMD( id, SLA_REG_READ, SLA_REG_DATA, SLA_REG_DF_ALL, cm )
114 #define SLA_CMD_DATA_WRITE( id, cm ) SLA_CMD( id, SLA_REG_WRITE, SLA_REG_DATA, SLA_REG_DF_ALL, cm )
115 #define SLA_CMD_DIR_READ( id, cm ) SLA_CMD( id, SLA_REG_READ, SLA_REG_DIR, SLA_REG_DF_ALL, cm )
116 #define SLA_CMD_DIR_WRITE( id, cm ) SLA_CMD( id, SLA_REG_WRITE, SLA_REG_DIR, SLA_REG_DF_ALL, cm )
122 #define SLA_DIR_INPUT(x) (0)
123 #define SLA_DIR_OUTPUT(x) (x)
125 #define SLA_DIR_D0_OUTPUT (SLA_DIR_OUTPUT(SLA_PORT_D0))
126 #define SLA_DIR_D1_OUTPUT (SLA_DIR_OUTPUT(SLA_PORT_D1))
127 #define SLA_DIR_D2_OUTPUT (SLA_DIR_OUTPUT(SLA_PORT_D2))
128 #define SLA_DIR_D3_OUTPUT (SLA_DIR_OUTPUT(SLA_PORT_D3))
129 #define SLA_DIR_D4_OUTPUT (SLA_DIR_OUTPUT(SLA_PORT_D4))
130 #define SLA_DIR_D5_OUTPUT (SLA_DIR_OUTPUT(SLA_PORT_D5))
131 #define SLA_DIR_D6_OUTPUT (SLA_DIR_OUTPUT(SLA_PORT_D6))
132 #define SLA_DIR_D7_OUTPUT (SLA_DIR_OUTPUT(SLA_PORT_D7))
134 #define SLA_DIR_D0_INPUT (SLA_DIR_INPUT(SLA_PORT_D0))
135 #define SLA_DIR_D1_INPUT (SLA_DIR_INPUT(SLA_PORT_D1))
136 #define SLA_DIR_D2_INPUT (SLA_DIR_INPUT(SLA_PORT_D2))
137 #define SLA_DIR_D3_INPUT (SLA_DIR_INPUT(SLA_PORT_D3))
138 #define SLA_DIR_D4_INPUT (SLA_DIR_INPUT(SLA_PORT_D4))
139 #define SLA_DIR_D5_INPUT (SLA_DIR_INPUT(SLA_PORT_D5))
140 #define SLA_DIR_D6_INPUT (SLA_DIR_INPUT(SLA_PORT_D6))
141 #define SLA_DIR_D7_INPUT (SLA_DIR_INPUT(SLA_PORT_D7))
158 static unsigned short moduleToDevice(
unsigned char module);
168 void setData(
unsigned char data);
176 SlaChipIdEnum chipSelect,
177 unsigned char dataDirection);
Definition: sla_ssm.h:162
Definition: sla_ssm.h:172
Definition: sla_ssm.h:152