https://github.com/j123b567/scpi-parser
Dependents: scpi_sx127x scpi_sx127x_firstTest MLX90418_I2C_master
inc/scpi/ieee488.h@1:b497f235115a, 2015-08-07 (annotated)
- Committer:
- dudmuck
- Date:
- Fri Aug 07 21:54:11 2015 +0000
- Revision:
- 1:b497f235115a
- Parent:
- 0:aad43948c45c
update from github commit 6e5e3e0e3fc450eaf53feee059824ad85c4f270d
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dudmuck | 0:aad43948c45c | 1 | /*- |
dudmuck | 0:aad43948c45c | 2 | * Copyright (c) 2012-2013 Jan Breuer, |
dudmuck | 0:aad43948c45c | 3 | * |
dudmuck | 0:aad43948c45c | 4 | * All Rights Reserved |
dudmuck | 0:aad43948c45c | 5 | * |
dudmuck | 0:aad43948c45c | 6 | * Redistribution and use in source and binary forms, with or without |
dudmuck | 0:aad43948c45c | 7 | * modification, are permitted provided that the following conditions are |
dudmuck | 0:aad43948c45c | 8 | * met: |
dudmuck | 0:aad43948c45c | 9 | * 1. Redistributions of source code must retain the above copyright notice, |
dudmuck | 0:aad43948c45c | 10 | * this list of conditions and the following disclaimer. |
dudmuck | 0:aad43948c45c | 11 | * 2. Redistributions in binary form must reproduce the above copyright |
dudmuck | 0:aad43948c45c | 12 | * notice, this list of conditions and the following disclaimer in the |
dudmuck | 0:aad43948c45c | 13 | * documentation and/or other materials provided with the distribution. |
dudmuck | 0:aad43948c45c | 14 | * |
dudmuck | 0:aad43948c45c | 15 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR |
dudmuck | 0:aad43948c45c | 16 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
dudmuck | 0:aad43948c45c | 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
dudmuck | 0:aad43948c45c | 18 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE |
dudmuck | 0:aad43948c45c | 19 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
dudmuck | 0:aad43948c45c | 20 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
dudmuck | 0:aad43948c45c | 21 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |
dudmuck | 0:aad43948c45c | 22 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
dudmuck | 0:aad43948c45c | 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |
dudmuck | 0:aad43948c45c | 24 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
dudmuck | 0:aad43948c45c | 25 | * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
dudmuck | 0:aad43948c45c | 26 | */ |
dudmuck | 0:aad43948c45c | 27 | |
dudmuck | 0:aad43948c45c | 28 | /** |
dudmuck | 0:aad43948c45c | 29 | * @file scpi_ieee488.h |
dudmuck | 0:aad43948c45c | 30 | * @date Thu Nov 15 10:58:45 UTC 2012 |
dudmuck | 0:aad43948c45c | 31 | * |
dudmuck | 0:aad43948c45c | 32 | * @brief Implementation of IEEE488.2 commands and state model |
dudmuck | 0:aad43948c45c | 33 | * |
dudmuck | 0:aad43948c45c | 34 | * |
dudmuck | 0:aad43948c45c | 35 | */ |
dudmuck | 0:aad43948c45c | 36 | |
dudmuck | 0:aad43948c45c | 37 | #ifndef SCPI_IEEE488_H |
dudmuck | 0:aad43948c45c | 38 | #define SCPI_IEEE488_H |
dudmuck | 0:aad43948c45c | 39 | |
dudmuck | 0:aad43948c45c | 40 | #include "scpi/types.h" |
dudmuck | 0:aad43948c45c | 41 | |
dudmuck | 0:aad43948c45c | 42 | #ifdef __cplusplus |
dudmuck | 0:aad43948c45c | 43 | extern "C" { |
dudmuck | 0:aad43948c45c | 44 | #endif |
dudmuck | 0:aad43948c45c | 45 | |
dudmuck | 0:aad43948c45c | 46 | scpi_result_t SCPI_CoreCls(scpi_t * context); |
dudmuck | 0:aad43948c45c | 47 | scpi_result_t SCPI_CoreEse(scpi_t * context); |
dudmuck | 0:aad43948c45c | 48 | scpi_result_t SCPI_CoreEseQ(scpi_t * context); |
dudmuck | 0:aad43948c45c | 49 | scpi_result_t SCPI_CoreEsrQ(scpi_t * context); |
dudmuck | 0:aad43948c45c | 50 | scpi_result_t SCPI_CoreIdnQ(scpi_t * context); |
dudmuck | 0:aad43948c45c | 51 | scpi_result_t SCPI_CoreOpc(scpi_t * context); |
dudmuck | 0:aad43948c45c | 52 | scpi_result_t SCPI_CoreOpcQ(scpi_t * context); |
dudmuck | 0:aad43948c45c | 53 | scpi_result_t SCPI_CoreRst(scpi_t * context); |
dudmuck | 0:aad43948c45c | 54 | scpi_result_t SCPI_CoreSre(scpi_t * context); |
dudmuck | 0:aad43948c45c | 55 | scpi_result_t SCPI_CoreSreQ(scpi_t * context); |
dudmuck | 0:aad43948c45c | 56 | scpi_result_t SCPI_CoreStbQ(scpi_t * context); |
dudmuck | 0:aad43948c45c | 57 | scpi_result_t SCPI_CoreTstQ(scpi_t * context); |
dudmuck | 0:aad43948c45c | 58 | scpi_result_t SCPI_CoreWai(scpi_t * context); |
dudmuck | 0:aad43948c45c | 59 | |
dudmuck | 0:aad43948c45c | 60 | |
dudmuck | 0:aad43948c45c | 61 | #define STB_R01 0x01 /* Not used */ |
dudmuck | 0:aad43948c45c | 62 | #define STB_PRO 0x02 /* Protection Event Flag */ |
dudmuck | 0:aad43948c45c | 63 | #define STB_QMA 0x04 /* Error/Event queue message available */ |
dudmuck | 0:aad43948c45c | 64 | #define STB_QES 0x08 /* Questionable status */ |
dudmuck | 0:aad43948c45c | 65 | #define STB_MAV 0x10 /* Message Available */ |
dudmuck | 0:aad43948c45c | 66 | #define STB_ESR 0x20 /* Standard Event Status Register */ |
dudmuck | 0:aad43948c45c | 67 | #define STB_SRQ 0x40 /* Service Request */ |
dudmuck | 0:aad43948c45c | 68 | #define STB_OPS 0x80 /* Operation Status Flag */ |
dudmuck | 0:aad43948c45c | 69 | |
dudmuck | 0:aad43948c45c | 70 | |
dudmuck | 0:aad43948c45c | 71 | #define ESR_OPC 0x01 /* Operation complete */ |
dudmuck | 0:aad43948c45c | 72 | #define ESR_REQ 0x02 /* Request Control */ |
dudmuck | 0:aad43948c45c | 73 | #define ESR_QER 0x04 /* Query Error */ |
dudmuck | 0:aad43948c45c | 74 | #define ESR_DER 0x08 /* Device Dependent Error */ |
dudmuck | 0:aad43948c45c | 75 | #define ESR_EER 0x10 /* Execution Error (e.g. range error) */ |
dudmuck | 0:aad43948c45c | 76 | #define ESR_CER 0x20 /* Command error (e.g. syntax error) */ |
dudmuck | 0:aad43948c45c | 77 | #define ESR_URQ 0x40 /* User Request */ |
dudmuck | 0:aad43948c45c | 78 | #define ESR_PON 0x80 /* Power On */ |
dudmuck | 0:aad43948c45c | 79 | |
dudmuck | 0:aad43948c45c | 80 | |
dudmuck | 0:aad43948c45c | 81 | scpi_reg_val_t SCPI_RegGet(scpi_t * context, scpi_reg_name_t name); |
dudmuck | 0:aad43948c45c | 82 | void SCPI_RegSet(scpi_t * context, scpi_reg_name_t name, scpi_reg_val_t val); |
dudmuck | 0:aad43948c45c | 83 | void SCPI_RegSetBits(scpi_t * context, scpi_reg_name_t name, scpi_reg_val_t bits); |
dudmuck | 0:aad43948c45c | 84 | void SCPI_RegClearBits(scpi_t * context, scpi_reg_name_t name, scpi_reg_val_t bits); |
dudmuck | 1:b497f235115a | 85 | |
dudmuck | 0:aad43948c45c | 86 | void SCPI_EventClear(scpi_t * context); |
dudmuck | 0:aad43948c45c | 87 | |
dudmuck | 0:aad43948c45c | 88 | #ifdef __cplusplus |
dudmuck | 0:aad43948c45c | 89 | } |
dudmuck | 0:aad43948c45c | 90 | #endif |
dudmuck | 0:aad43948c45c | 91 | |
dudmuck | 0:aad43948c45c | 92 | #endif /* SCPI_IEEE488_H */ |
dudmuck | 0:aad43948c45c | 93 |