microbit_scpi_pass_fail
Fork of microbit-hello-world by
scpi-def.h@1:aa0af9cf4f28, 2018-11-06 (annotated)
- Committer:
- jancumps
- Date:
- Tue Nov 06 20:58:04 2018 +0000
- Revision:
- 1:aa0af9cf4f28
Function complete first version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jancumps | 1:aa0af9cf4f28 | 1 | /*- |
jancumps | 1:aa0af9cf4f28 | 2 | * BSD 2-Clause License |
jancumps | 1:aa0af9cf4f28 | 3 | * |
jancumps | 1:aa0af9cf4f28 | 4 | * Copyright (c) 2012-2018, Jan Breuer |
jancumps | 1:aa0af9cf4f28 | 5 | * All rights reserved. |
jancumps | 1:aa0af9cf4f28 | 6 | * |
jancumps | 1:aa0af9cf4f28 | 7 | * Redistribution and use in source and binary forms, with or without |
jancumps | 1:aa0af9cf4f28 | 8 | * modification, are permitted provided that the following conditions are met: |
jancumps | 1:aa0af9cf4f28 | 9 | * |
jancumps | 1:aa0af9cf4f28 | 10 | * * Redistributions of source code must retain the above copyright notice, this |
jancumps | 1:aa0af9cf4f28 | 11 | * list of conditions and the following disclaimer. |
jancumps | 1:aa0af9cf4f28 | 12 | * |
jancumps | 1:aa0af9cf4f28 | 13 | * * Redistributions in binary form must reproduce the above copyright notice, |
jancumps | 1:aa0af9cf4f28 | 14 | * this list of conditions and the following disclaimer in the documentation |
jancumps | 1:aa0af9cf4f28 | 15 | * and/or other materials provided with the distribution. |
jancumps | 1:aa0af9cf4f28 | 16 | * |
jancumps | 1:aa0af9cf4f28 | 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
jancumps | 1:aa0af9cf4f28 | 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
jancumps | 1:aa0af9cf4f28 | 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
jancumps | 1:aa0af9cf4f28 | 20 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
jancumps | 1:aa0af9cf4f28 | 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
jancumps | 1:aa0af9cf4f28 | 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
jancumps | 1:aa0af9cf4f28 | 23 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
jancumps | 1:aa0af9cf4f28 | 24 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
jancumps | 1:aa0af9cf4f28 | 25 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
jancumps | 1:aa0af9cf4f28 | 26 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
jancumps | 1:aa0af9cf4f28 | 27 | */ |
jancumps | 1:aa0af9cf4f28 | 28 | |
jancumps | 1:aa0af9cf4f28 | 29 | #ifndef __SCPI_DEF_H_ |
jancumps | 1:aa0af9cf4f28 | 30 | #define __SCPI_DEF_H_ |
jancumps | 1:aa0af9cf4f28 | 31 | |
jancumps | 1:aa0af9cf4f28 | 32 | #include "scpi/scpi.h" |
jancumps | 1:aa0af9cf4f28 | 33 | |
jancumps | 1:aa0af9cf4f28 | 34 | #define SCPI_INPUT_BUFFER_LENGTH 256 |
jancumps | 1:aa0af9cf4f28 | 35 | #define SCPI_ERROR_QUEUE_SIZE 17 |
jancumps | 1:aa0af9cf4f28 | 36 | #define SCPI_IDN1 "MICRO_BIT" |
jancumps | 1:aa0af9cf4f28 | 37 | #define SCPI_IDN2 "PASS_FAIL" |
jancumps | 1:aa0af9cf4f28 | 38 | #define SCPI_IDN3 NULL |
jancumps | 1:aa0af9cf4f28 | 39 | #define SCPI_IDN4 "01-01" |
jancumps | 1:aa0af9cf4f28 | 40 | |
jancumps | 1:aa0af9cf4f28 | 41 | extern const scpi_command_t scpi_commands[]; |
jancumps | 1:aa0af9cf4f28 | 42 | extern scpi_interface_t scpi_interface; |
jancumps | 1:aa0af9cf4f28 | 43 | extern char scpi_input_buffer[]; |
jancumps | 1:aa0af9cf4f28 | 44 | extern scpi_error_t scpi_error_queue_data[]; |
jancumps | 1:aa0af9cf4f28 | 45 | extern scpi_t scpi_context; |
jancumps | 1:aa0af9cf4f28 | 46 | |
jancumps | 1:aa0af9cf4f28 | 47 | size_t SCPI_Write(scpi_t * context, const char * data, size_t len); |
jancumps | 1:aa0af9cf4f28 | 48 | int SCPI_Error(scpi_t * context, int_fast16_t err); |
jancumps | 1:aa0af9cf4f28 | 49 | scpi_result_t SCPI_Control(scpi_t * context, scpi_ctrl_name_t ctrl, scpi_reg_val_t val); |
jancumps | 1:aa0af9cf4f28 | 50 | scpi_result_t SCPI_Reset(scpi_t * context); |
jancumps | 1:aa0af9cf4f28 | 51 | scpi_result_t SCPI_Flush(scpi_t * context); |
jancumps | 1:aa0af9cf4f28 | 52 | |
jancumps | 1:aa0af9cf4f28 | 53 | |
jancumps | 1:aa0af9cf4f28 | 54 | scpi_result_t SCPI_SystemCommTcpipControlQ(scpi_t * context); |
jancumps | 1:aa0af9cf4f28 | 55 | |
jancumps | 1:aa0af9cf4f28 | 56 | #endif /* __SCPI_DEF_H_ */ |
jancumps | 1:aa0af9cf4f28 | 57 |