From 932061c92277c46278b2b4027e1fdb873e1bc19b Mon Sep 17 00:00:00 2001
From: Jan Breuer <jan.breuer@jaybee.cz>
Date: 周二, 04 12月 2012 18:28:17 +0800
Subject: [PATCH] Update README - file structure

---
 scpi/scpi_types.h |   28 +++++++++++++++++++++++++---
 1 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/scpi/scpi_types.h b/scpi/scpi_types.h
index fb880e2..939fa85 100644
--- a/scpi/scpi_types.h
+++ b/scpi/scpi_types.h
@@ -63,7 +63,7 @@
     typedef enum _scpi_result_t scpi_result_t;
     typedef struct _scpi_param_list_t scpi_param_list_t;
     typedef struct _scpi_command_t scpi_command_t;
-    typedef scpi_result_t (*scpi_command_callback_t)(scpi_t *);
+    typedef scpi_result_t(*scpi_command_callback_t)(scpi_t *);
 
     /* scpi error queue */
     typedef void * scpi_error_queue_t;
@@ -75,7 +75,10 @@
     typedef struct _scpi_special_number_def_t scpi_special_number_def_t;
     typedef struct _scpi_number_t scpi_number_t;
 
-
+    /* IEEE 488.2 registers */
+    typedef enum _scpi_reg_name_t scpi_reg_name_t;
+    typedef uint16_t scpi_reg_val_t;
+    
     struct _scpi_param_list_t {
         const scpi_command_t * cmd;
         const char * parameters;
@@ -100,7 +103,8 @@
         scpi_error_callback_t error;
         scpi_write_t write;
         scpi_command_callback_t reset;
-        scpi_command_callback_t test;        
+        scpi_command_callback_t test;
+        scpi_command_callback_t srq;
     };
 
     struct _scpi_t {
@@ -112,6 +116,9 @@
         int_fast16_t input_count;
         bool_t cmd_error;
         scpi_error_queue_t error_queue;
+        scpi_reg_val_t * registers;
+        const scpi_unit_def_t * units;
+        const scpi_special_number_def_t * special_numbers;
     };
 
     enum _scpi_unit_t {
@@ -164,6 +171,21 @@
     };
 
 
+    enum _scpi_reg_name_t {
+        SCPI_REG_STB = 0, // Status Byte
+        SCPI_REG_SRE, // Service Request Enable Register
+        SCPI_REG_ESR, // Standard Event Status Register (ESR, SESR)
+        SCPI_REG_ESE, // Event Status Enable Register
+        SCPI_REG_OPER, // OPERation Status Register
+        SCPI_REG_OPERE, // OPERation Status Enable Register
+        SCPI_REG_QUES, // QUEStionable status register
+        SCPI_REG_QUESE, // QUEStionable status Enable Register
+
+        /* last definition - number of registers */
+        SCPI_REG_COUNT,
+    };
+
+
 #ifdef	__cplusplus
 }
 #endif

--
Gitblit v1.9.1