mirror of
https://github.com/halleysfifthinc/AVCLAN-Mockingboard.git
synced 2026-08-07 01:13:18 +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
|
- The broadcast bit is `1` (floating, no effort) for normal communication
|
||||||
- For acknowledge bits, the receiver extends the logical '0' of the sync
|
- 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
|
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.
|
No acknowledge bits are sent for broadcast frames.
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ typedef enum {
|
|||||||
} commands;
|
} commands;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
dev_LAN = 0x00,
|
||||||
dev_COMM_CTRL = 0x01,
|
dev_COMM_CTRL = 0x01,
|
||||||
dev_COMM_v1 = 0x11,
|
dev_COMM_v1 = 0x11,
|
||||||
dev_COMM_v2 = 0x12,
|
dev_COMM_v2 = 0x12,
|
||||||
|
|||||||
+6
-6
@@ -142,8 +142,8 @@ int main() {
|
|||||||
case 'b':
|
case 'b':
|
||||||
case 'B': // Beep
|
case 'B': // Beep
|
||||||
data_tmp[0] = 0x00;
|
data_tmp[0] = 0x00;
|
||||||
data_tmp[1] = 0x63;
|
data_tmp[1] = dev_CD_CHANGER;
|
||||||
data_tmp[2] = 0x29;
|
data_tmp[2] = dev_BEEP_SPEAKERS;
|
||||||
data_tmp[3] = 0x60;
|
data_tmp[3] = 0x60;
|
||||||
data_tmp[4] = 0x01;
|
data_tmp[4] = 0x01;
|
||||||
msg.length = 5;
|
msg.length = 5;
|
||||||
@@ -155,10 +155,10 @@ int main() {
|
|||||||
case 'p':
|
case 'p':
|
||||||
CD_Mode = stPlay;
|
CD_Mode = stPlay;
|
||||||
data_tmp[0] = 0x00;
|
data_tmp[0] = 0x00;
|
||||||
data_tmp[1] = 0x01;
|
data_tmp[1] = dev_COMM_CTRL;
|
||||||
data_tmp[2] = 0x11;
|
data_tmp[2] = dev_COMM_v1;
|
||||||
data_tmp[3] = 0x50;
|
data_tmp[3] = Insertion;
|
||||||
data_tmp[4] = 0x63;
|
data_tmp[4] = dev_CD_CHANGER;
|
||||||
msg.length = 5;
|
msg.length = 5;
|
||||||
msg.broadcast = UNICAST;
|
msg.broadcast = UNICAST;
|
||||||
msg.controller_addr = DEVICE_ADDR;
|
msg.controller_addr = DEVICE_ADDR;
|
||||||
|
|||||||
Reference in New Issue
Block a user