Browse Source

Rename FLUXOP_NOFLUX -> FLUXOP_SPACE

Keir Fraser 4 years ago
parent
commit
0f78a93f66
3 changed files with 7 additions and 7 deletions
  1. 1 1
      inc/cdc_acm_protocol.h
  2. 3 3
      scripts/greaseweazle/usb.py
  3. 3 3
      src/floppy.c

+ 1 - 1
inc/cdc_acm_protocol.h

@@ -99,7 +99,7 @@
  * Flux stream opcodes. Preceded by 0xFF byte.
  */
 #define FLUXOP_INDEX      1
-#define FLUXOP_NOFLUX     2
+#define FLUXOP_SPACE      2
 
 
 /*

+ 3 - 3
scripts/greaseweazle/usb.py

@@ -112,7 +112,7 @@ class BusType:
 ## Flux read stream opcodes, preceded by 0xFF byte
 class FluxOp:
     Index           = 1
-    NoFlux          = 2
+    Space           = 2
 
 
 ## CmdError: Encapsulates a command acknowledgement.
@@ -279,7 +279,7 @@ class Unit:
                         val = _read_28bit()
                         index.append(ticks_since_index + ticks + val)
                         ticks_since_index = -val
-                    elif opcode == FluxOp.NoFlux:
+                    elif opcode == FluxOp.Space:
                         ticks += _read_28bit()
                     else:
                         raise error.Fatal("Bad opcode in flux stream (%d)"
@@ -321,7 +321,7 @@ class Unit:
                     dat.append(1 + (val-250) % 255)
                 else:
                     dat.append(255)
-                    dat.append(FluxOp.NoFlux)
+                    dat.append(FluxOp.Space)
                     _write_28bit(val - 249);
                     dat.append(249)
         dat.append(0) # End of Stream

+ 3 - 3
src/floppy.c

@@ -365,7 +365,7 @@ static void rdata_encode_flux(void)
             } else {
                 /* 1525-(2^28-1): Seven bytes. */
                 u_buf[U_MASK(u_prod++)] = 0xff;
-                u_buf[U_MASK(u_prod++)] = FLUXOP_NOFLUX;
+                u_buf[U_MASK(u_prod++)] = FLUXOP_SPACE;
                 _write_28bit(ticks - 249);
                 u_buf[U_MASK(u_prod++)] = 249;
             }
@@ -380,7 +380,7 @@ static void rdata_encode_flux(void)
     if (unlikely(curr > sample_us(400))) {
         ticks = sample_us(200);
         u_buf[U_MASK(u_prod++)] = 0xff;
-        u_buf[U_MASK(u_prod++)] = FLUXOP_NOFLUX;
+        u_buf[U_MASK(u_prod++)] = FLUXOP_SPACE;
         _write_28bit(ticks);
         prev += ticks;
     }
@@ -545,7 +545,7 @@ static unsigned int _wdata_decode_flux(timcnt_t *tbuf, unsigned int nr)
             /* 255: Six bytes */
             if ((uint32_t)(u_prod - u_cons) < 6)
                 goto out;
-            u_cons += 2; /* skip 255, FLUXOP_NOFLUX */
+            u_cons += 2; /* skip 255, FLUXOP_SPACE */
             ticks += _read_28bit();
             continue;
         }