Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
scpi-def.h@0:be95bfb06686, 2022-01-17 (annotated)
- Committer:
- wuliqunyy
- Date:
- Mon Jan 17 13:20:09 2022 +0000
- Revision:
- 0:be95bfb06686
a working non_flat + adc_didt for ehp regulation version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wuliqunyy | 0:be95bfb06686 | 1 | /*- |
wuliqunyy | 0:be95bfb06686 | 2 | * BSD 2-Clause License |
wuliqunyy | 0:be95bfb06686 | 3 | * |
wuliqunyy | 0:be95bfb06686 | 4 | * Copyright (c) 2012-2018, Jan Breuer |
wuliqunyy | 0:be95bfb06686 | 5 | * All rights reserved. |
wuliqunyy | 0:be95bfb06686 | 6 | * |
wuliqunyy | 0:be95bfb06686 | 7 | * Redistribution and use in source and binary forms, with or without |
wuliqunyy | 0:be95bfb06686 | 8 | * modification, are permitted provided that the following conditions are met: |
wuliqunyy | 0:be95bfb06686 | 9 | * |
wuliqunyy | 0:be95bfb06686 | 10 | * * Redistributions of source code must retain the above copyright notice, this |
wuliqunyy | 0:be95bfb06686 | 11 | * list of conditions and the following disclaimer. |
wuliqunyy | 0:be95bfb06686 | 12 | * |
wuliqunyy | 0:be95bfb06686 | 13 | * * Redistributions in binary form must reproduce the above copyright notice, |
wuliqunyy | 0:be95bfb06686 | 14 | * this list of conditions and the following disclaimer in the documentation |
wuliqunyy | 0:be95bfb06686 | 15 | * and/or other materials provided with the distribution. |
wuliqunyy | 0:be95bfb06686 | 16 | * |
wuliqunyy | 0:be95bfb06686 | 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
wuliqunyy | 0:be95bfb06686 | 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
wuliqunyy | 0:be95bfb06686 | 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
wuliqunyy | 0:be95bfb06686 | 20 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
wuliqunyy | 0:be95bfb06686 | 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
wuliqunyy | 0:be95bfb06686 | 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
wuliqunyy | 0:be95bfb06686 | 23 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
wuliqunyy | 0:be95bfb06686 | 24 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
wuliqunyy | 0:be95bfb06686 | 25 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
wuliqunyy | 0:be95bfb06686 | 26 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
wuliqunyy | 0:be95bfb06686 | 27 | */ |
wuliqunyy | 0:be95bfb06686 | 28 | |
wuliqunyy | 0:be95bfb06686 | 29 | #ifndef __SCPI_DEF_H_ |
wuliqunyy | 0:be95bfb06686 | 30 | #define __SCPI_DEF_H_ |
wuliqunyy | 0:be95bfb06686 | 31 | |
wuliqunyy | 0:be95bfb06686 | 32 | #include "scpi/scpi.h" |
wuliqunyy | 0:be95bfb06686 | 33 | |
wuliqunyy | 0:be95bfb06686 | 34 | #define SCPI_INPUT_BUFFER_LENGTH 256 |
wuliqunyy | 0:be95bfb06686 | 35 | #define SCPI_ERROR_QUEUE_SIZE 17 |
wuliqunyy | 0:be95bfb06686 | 36 | //#define SCPI_IDN1 "MANUFACTURE" |
wuliqunyy | 0:be95bfb06686 | 37 | //#define SCPI_IDN2 "INSTR2013" |
wuliqunyy | 0:be95bfb06686 | 38 | //#define SCPI_IDN3 NULL |
wuliqunyy | 0:be95bfb06686 | 39 | //#define SCPI_IDN4 "01-02" |
wuliqunyy | 0:be95bfb06686 | 40 | |
wuliqunyy | 0:be95bfb06686 | 41 | //extern const scpi_command_t scpi_commands[]; |
wuliqunyy | 0:be95bfb06686 | 42 | //extern scpi_interface_t scpi_interface; |
wuliqunyy | 0:be95bfb06686 | 43 | //extern char scpi_input_buffer[]; |
wuliqunyy | 0:be95bfb06686 | 44 | extern scpi_t scpi_context; |
wuliqunyy | 0:be95bfb06686 | 45 | |
wuliqunyy | 0:be95bfb06686 | 46 | size_t SCPI_Write(scpi_t * context, const char * data, size_t len); |
wuliqunyy | 0:be95bfb06686 | 47 | int SCPI_Error(scpi_t * context, int_fast16_t err); |
wuliqunyy | 0:be95bfb06686 | 48 | scpi_result_t SCPI_Control(scpi_t * context, scpi_ctrl_name_t ctrl, scpi_reg_val_t val); |
wuliqunyy | 0:be95bfb06686 | 49 | scpi_result_t SCPI_Reset(scpi_t * context); |
wuliqunyy | 0:be95bfb06686 | 50 | scpi_result_t SCPI_Test(scpi_t * context); |
wuliqunyy | 0:be95bfb06686 | 51 | scpi_result_t SCPI_Flush(scpi_t * context); |
wuliqunyy | 0:be95bfb06686 | 52 | void configure_scpi(void); |
wuliqunyy | 0:be95bfb06686 | 53 | |
wuliqunyy | 0:be95bfb06686 | 54 | extern const scpi_command_t scpi_commands[]; |
wuliqunyy | 0:be95bfb06686 | 55 | extern scpi_interface_t scpi_interface; |
wuliqunyy | 0:be95bfb06686 | 56 | extern char scpi_input_buffer[]; |
wuliqunyy | 0:be95bfb06686 | 57 | extern scpi_error_t scpi_error_queue_data[]; |
wuliqunyy | 0:be95bfb06686 | 58 | extern scpi_t scpi_context; |
wuliqunyy | 0:be95bfb06686 | 59 | |
wuliqunyy | 0:be95bfb06686 | 60 | |
wuliqunyy | 0:be95bfb06686 | 61 | scpi_result_t SCPI_SystemCommTcpipControlQ(scpi_t * context); |
wuliqunyy | 0:be95bfb06686 | 62 | |
wuliqunyy | 0:be95bfb06686 | 63 | #endif /* __SCPI_DEF_H_ */ |
wuliqunyy | 0:be95bfb06686 | 64 |