From 51d83cf2f2d34ab4d95bfd9d1b8604126ff7d423 Mon Sep 17 00:00:00 2001
From: wierenga <sdos@astron.nl>
Date: Fri, 17 Nov 2006 11:47:04 +0000
Subject: [PATCH] BugID: 972

Overload two unused bits for administration purposes TDBoardStatus.

Relevant comment in code:
//
// The unkown and invalid bits have no meaning in the TD status byte.
// They are overloaded here to indicate whether the value stored has
// been read from hardware and whether the RSP board has control over
// the TD board:
//
// unknown: (0 = value has been read from hardware, 1 = value has not been read)
// invalid: (0 = RSP board is controlling a TD board, 1 = RSP board is not controlling a TD board)
//
---
 MAC/APL/PIC/RSP_Protocol/src/EPA_Protocol.prot | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/MAC/APL/PIC/RSP_Protocol/src/EPA_Protocol.prot b/MAC/APL/PIC/RSP_Protocol/src/EPA_Protocol.prot
index ab4664eb61b..289711f405e 100644
--- a/MAC/APL/PIC/RSP_Protocol/src/EPA_Protocol.prot
+++ b/MAC/APL/PIC/RSP_Protocol/src/EPA_Protocol.prot
@@ -210,13 +210,22 @@ prelude = << PRELUDE_END
     uint16 ffi   :13;
   };
 
+  //
+  // The unkown and invalid bits have no meaning in the TD status byte.
+  // They are overloaded here to indicate whether the value stored has
+  // been read from hardware and whether the RSP board has control over
+  // the TD board:
+  //
+  // unknown: (0 = value has been read from hardware, 1 = value has not been read)
+  // invalid: (0 = RSP board is controlling a TD board, 1 = RSP board is not controlling a TD board)
+  //
   typedef struct TDBoardStatus
   {
     uint8 input_10MHz:1;  // 1 = SMA, 0 = Infiniband
     uint8 output_clock:1; // 1 = 200MHz, 0 = 160MHz
     uint8 pps_input:1;   // 1 = Infiniband, 0 = SMA
-    uint8 ffi1:1;  // bit 0x08
-    uint8 invalid:1; // are the bits in this structure valid?
+    uint8 unknown:1;  // 1 if status not yet read
+    uint8 invalid:1;  // 1 if board is not controlling TD board
     uint8 ffi3:1;  // bit 0x20
     uint8 pll_160MHz_locked:1; // 1 = locked, 0 = NOT locked
     uint8 pll_200MHz_locked:1; // 1 = locked, 0 = NOT locked
-- 
GitLab