summaryrefslogtreecommitdiffhomepage
path: root/source/cmds.h
diff options
context:
space:
mode:
Diffstat (limited to 'source/cmds.h')
-rw-r--r--source/cmds.h100
1 files changed, 100 insertions, 0 deletions
diff --git a/source/cmds.h b/source/cmds.h
new file mode 100644
index 0000000..f03f8e4
--- /dev/null
+++ b/source/cmds.h
@@ -0,0 +1,100 @@
+/*
+ * cmds.h
+ *
+ * Copyright (C) 2018, 2019 Mind Chasers Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ *
+ */
+
+#ifndef CMDS_H_
+#define CMDS_H_
+
+#include "stdint.h"
+
+// PCS Bit Map
+#define RX_CDR_LOL_0 0x01
+#define RX_CDR_LOL_1 0x02
+#define RX_CDR_LOL_2 0x04
+#define PLL_LOL_0 0x08
+#define PLL_LOL_1 0x10
+
+// Link Status Bit Map
+#define PORT_UP_0 0x1
+#define PORT_UP_1 0x2
+
+// SCI Address Definitions
+
+#define SCI_SEL_CH0 0x00
+#define SCI_SEL_CH1 0x40
+#define SCI_SEL_AUX 0xC0
+
+struct x_config {
+ char cmd;
+ uint8_t ch3;
+ uint8_t ch2;
+ uint8_t ch1;
+ uint8_t ch0;
+ char term;
+};
+
+struct c_config {
+ char cmd;
+ uint8_t ch3;
+ uint8_t ch2;
+ uint8_t ch1;
+ uint8_t ch0;
+ char term;
+};
+
+struct u_config {
+ char cmd;
+ uint8_t dcu1;
+ uint8_t dcu0;
+ char term;
+};
+
+struct gen0_config {
+ char cmd;
+ char term;
+};
+
+struct gen1_config {
+ char cmd;
+ uint8_t b0;
+ char term;
+};
+
+extern struct gen0_config i_init;
+extern struct gen0_config pcs_s;
+extern struct gen0_config link_s;
+
+extern struct gen1_config m0;
+extern struct gen1_config m1;
+
+extern struct gen0_config test_tx_pkt;
+
+extern struct x_config x_reset;
+extern struct x_config x_init0;
+extern struct x_config x_init1;
+
+extern struct u_config u_reset;
+extern struct u_config u_init;
+
+extern struct c_config c_reset;
+extern struct c_config c_init0;
+extern struct c_config c_init1;
+extern struct c_config c_init_pcsr;
+
+#endif /* CMDS_H_ */



X-ray Engineering Services