mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-08-06 17:03:17 +00:00
Replace use of numeric literals with appropriate enums
This commit is contained in:
+1
-1
@@ -82,7 +82,7 @@
|
||||
- The broadcast bit is `1` (floating, no effort) for normal communication
|
||||
- For acknowledge bits, the receiver extends the logical '0' of the sync
|
||||
period to the length of a normal bit `0`. Hence, a NAK (bit `1`) is
|
||||
equivalent to no response.
|
||||
literally the absence of an ACK.
|
||||
|
||||
No acknowledge bits are sent for broadcast frames.
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ typedef enum {
|
||||
} commands;
|
||||
|
||||
typedef enum {
|
||||
dev_LAN = 0x00,
|
||||
dev_COMM_CTRL = 0x01,
|
||||
dev_COMM_v1 = 0x11,
|
||||
dev_COMM_v2 = 0x12,
|
||||
|
||||
+7
-7
@@ -142,8 +142,8 @@ int main() {
|
||||
case 'b':
|
||||
case 'B': // Beep
|
||||
data_tmp[0] = 0x00;
|
||||
data_tmp[1] = 0x63;
|
||||
data_tmp[2] = 0x29;
|
||||
data_tmp[1] = dev_CD_CHANGER;
|
||||
data_tmp[2] = dev_BEEP_SPEAKERS;
|
||||
data_tmp[3] = 0x60;
|
||||
data_tmp[4] = 0x01;
|
||||
msg.length = 5;
|
||||
@@ -155,10 +155,10 @@ int main() {
|
||||
case 'p':
|
||||
CD_Mode = stPlay;
|
||||
data_tmp[0] = 0x00;
|
||||
data_tmp[1] = 0x01;
|
||||
data_tmp[2] = 0x11;
|
||||
data_tmp[3] = 0x50;
|
||||
data_tmp[4] = 0x63;
|
||||
data_tmp[1] = dev_COMM_CTRL;
|
||||
data_tmp[2] = dev_COMM_v1;
|
||||
data_tmp[3] = Insertion;
|
||||
data_tmp[4] = dev_CD_CHANGER;
|
||||
msg.length = 5;
|
||||
msg.broadcast = UNICAST;
|
||||
msg.controller_addr = DEVICE_ADDR;
|
||||
@@ -226,7 +226,7 @@ int main() {
|
||||
}
|
||||
}
|
||||
} // switch (readkey)
|
||||
} // if (RS232_RxCharEnd)
|
||||
} // if (RS232_RxCharEnd)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user