Debian Codegraph @

thirdparty/analogdevicesinc/no-OS/device_commands/AD5686/Command.h

raw symbols SCIP
1 /***************************************************************************//**
2 * @file Command.h
3 * @brief Header file of the commands driver.
4 * @author Istvan Csomortani ([email protected])
5 *
6 ********************************************************************************
7 * Copyright 2013(c) Analog Devices, Inc.
8 *
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions are met:
13 * - Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * - Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in
17 * the documentation and/or other materials provided with the
18 * distribution.
19 * - Neither the name of Analog Devices, Inc. nor the names of its
20 * contributors may be used to endorse or promote products derived
21 * from this software without specific prior written permission.
22 * - The use of this software may or may not infringe the patent rights
23 * of one or more patent holders. This license does not release you
24 * from the requirement that you obtain separate licenses from these
25 * patent holders to use this software.
26 * - Use of the software either in source or binary form, must be run
27 * on or directly connected to an Analog Devices Inc. component.
28 *
29 * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
30 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
31 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
32 * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
33 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
34 * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
35 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
36 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
37 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 *
40 *******************************************************************************/
41 #ifndef __COMMAND_H__
42 #define __COMMAND_H__
43
44 /******************************************************************************/
45 /********************** Macros and Constants Definitions **********************/
46 /******************************************************************************/
47 #define NULL ((void *)0)
48 #define SUCCESS 0
49 #define ERROR -1
50
51 /******************************************************************************/
52 /*************************** Types Declarations *******************************/
53 /******************************************************************************/
54 typedef void (*cmdFunction)(double* param, char paramNo);
55
56 struct cmd_info {
57 char* name;
58 char* description;
59 char* acceptedValue;
60 char* example;
61 };
62 /******************************************************************************/
63 /************************ Functions Declarations ******************************/
64 /******************************************************************************/
65
66 /* Initializes the device. */
67 char DoDeviceInit(void);
68
69 /* Set the current device type */
70 void DoDeviceLock(void);
71
72 /* Displays all available commands. */
73 void GetHelp(double* param, char paramNo);
74
75 /* Loads selected DAC input register with a given value. */
76 void SetLoad(double* param, char paramNo);
77
78 /* Update selected DAC input register with a given value. */
79 void SetUpdate(double* param, char paramNo);
80
81 /* Loads and updates the selected DAC with a given value. */
82 void SetLoadAndUpdate(double* param, char paramNo);
83
84 /* Reads from the selected DAC register. */
85 void GetReadback(double* param, char paramNo);
86
87 /* Set up the Power Mode register */
88 void SetPowerMode(double* param, char paramNo);
89
90 /* Display the value of the Power Mode register*/
91 void GetPowerMode(double* param, char paramNo);
92
93 /* Sets the LDAC Mask register. */
94 void SetLdacMask(double* param, char paramNo);
95
96 /* Display the LDAC Mask register. */
97 void GetLdacMask(double* param, char paramNo);
98
99 /* Activate a software reset */
100 void SoftReset(double* param, char paramNo);
101
102 /* Activate a software reset */
103 void HardReset(double* param, char paramNo);
104
105 /* Sets the output value of LDAC pin. */
106 void SetLdacPin(double* param, char paramNo);
107
108 /* Displays the value of LDAC pin. */
109 void GetLdacPin(double* param, char paramNo);
110
111 /* Set up the Internal Reference register. */
112 void SetInternalReference(double* param, char paramNo);
113
114 /* Display the Internal Reference register. */
115 void GetInternalReference(double* param, char paramNo);
116
117 #endif // __COMMAND_H__