Add macros for adding device-specific registers
| | |
| | | #define SCPI_LINE_ENDING LINE_ENDING_CRLF |
| | | #endif |
| | | |
| | | #ifndef USE_CUSTOM_REGISTERS |
| | | #define USE_CUSTOM_REGISTERS 0 |
| | | #endif |
| | | |
| | | /** |
| | | * Detect, if it has limited resources or it is running on a full blown operating system. |
| | | * All values can be overiden by scpi_user_config.h |
| | |
| | | SCPI_REG_QUESE, /* QUEStionable status Enable Register */ |
| | | SCPI_REG_QUESC, /* QUEStionable status Condition Register */ |
| | | |
| | | /* Add device specific registers here*/ |
| | | #if USE_CUSTOM_REGISTERS |
| | | #ifndef USER_REGISTERS |
| | | #error "No user registers defined" |
| | | #else |
| | | USER_REGISTERS |
| | | #endif |
| | | #endif |
| | | |
| | | /* number of registers */ |
| | | SCPI_REG_COUNT, |
| | |
| | | SCPI_REG_GROUP_OPER, |
| | | SCPI_REG_GROUP_QUES, |
| | | |
| | | /* Add device specific register groups here*/ |
| | | #if USE_CUSTOM_REGISTERS |
| | | #ifndef USER_REGISTER_GROUPS |
| | | #error "No user register groups defined" |
| | | #else |
| | | USER_REGISTER_GROUPS |
| | | #endif |
| | | #endif |
| | | |
| | | /* last definition - number of register groups */ |
| | | SCPI_REG_GROUP_COUNT |
| | |
| | | { SCPI_REG_CLASS_EVEN, SCPI_REG_GROUP_QUES }, |
| | | { SCPI_REG_CLASS_ENAB, SCPI_REG_GROUP_QUES }, |
| | | { SCPI_REG_CLASS_COND, SCPI_REG_GROUP_QUES }, |
| | | /* Add device specific register details here*/ |
| | | |
| | | #if USE_CUSTOM_REGISTERS |
| | | #ifndef USER_REGISTER_DETAILS |
| | | #error "No user register details defined" |
| | | #else |
| | | USER_REGISTER_DETAILS |
| | | #endif |
| | | #endif |
| | | |
| | | }; |
| | | |
| | | static const scpi_reg_group_info_t scpi_reg_group_details[SCPI_REG_GROUP_COUNT] = { |
| | |
| | | SCPI_REG_STB, |
| | | STB_QES |
| | | }, //SCPI_REG_GROUP_QUES |
| | | /* Add device specific register group details here*/ |
| | | |
| | | #if USE_CUSTOM_REGISTERS |
| | | #ifndef USER_REGISTER_GROUP_DETAILS |
| | | #error "No user register group details defined" |
| | | #else |
| | | USER_REGISTER_GROUP_DETAILS |
| | | #endif |
| | | #endif |
| | | |
| | | }; |
| | | |
| | | /** |