no-OS
mbed_ain_aout.h
Go to the documentation of this file.
1 /***************************************************************************//*
2 * @file mbed_ain_aout.h
3 * @brief Header containing extra types required for
4 * analog in/output functionality
5 ******************************************************************************
6 * Copyright (c) 2021-22 Analog Devices, Inc.
7 * All rights reserved.
8 *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions are met:
11  * - Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * - Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in
15  * the documentation and/or other materials provided with the
16  * distribution.
17  * - Neither the name of Analog Devices, Inc. nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  * - The use of this software may or may not infringe the patent rights
21  * of one or more patent holders. This license does not release you
22  * from the requirement that you obtain separate licenses from these
23  * patent holders to use this software.
24  * - Use of the software either in source or binary form, must be run
25  * on or directly connected to an Analog Devices Inc. component.
26  *
27  * THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR
28  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT,
29  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30  * IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT,
31  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32  * LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR
33  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
34  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
35  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 *******************************************************************************/
38 
39 #ifndef MBED_AIN_AOUT_H
40 #define MBED_AIN_AOUT_H
41 
42 // Platform support needs to be C-compatible to work with other drivers
43 #ifdef __cplusplus
44 extern "C"
45 {
46 #endif
47 
48 /*****************************************************************************/
49 /***************************** Include Files *********************************/
50 /*****************************************************************************/
51 
52 #include "stdio.h"
53 #include "stdint.h"
54 
55 /*****************************************************************************/
56 /********************** Macros and Constants Definition **********************/
57 /*****************************************************************************/
58 
59 /******************************************************************************/
60 /********************** Variables and User defined data types *****************/
61 /******************************************************************************/
67  /* Analog input pin number */
68  int32_t number;
69 };
70 
75 struct mbed_ain_desc {
76  /* Analog input pin number */
77  int32_t number;
78  /* Analog Input instance (mbed::AnalogIn) */
79  void *ain_obj;
80 };
81 
87  /* Analog output pin number */
88  int32_t number;
89 };
90 
96  /* Analog output pin number */
97  int32_t number;
98  /* Analog Output instance (mbed::AnalogOut) */
99  void *aout_obj;
100 };
101 
102 /******************************************************************************/
103 /*****************************Function Declarations****************************/
104 /******************************************************************************/
105 
106 #ifdef __cplusplus // Closing extern c
107 }
108 #endif
109 
110 #endif /* MBED_AIN_AOUT_H */
mbed_ain_desc::ain_obj
void * ain_obj
Definition: mbed_ain_aout.h:79
mbed_aout_desc::aout_obj
void * aout_obj
Definition: mbed_ain_aout.h:99
mbed_aout_desc
Definition: mbed_ain_aout.h:95
mbed_ain_desc
Definition: mbed_ain_aout.h:75
mbed_aout_desc::number
int32_t number
Definition: mbed_ain_aout.h:97
mbed_aout_init_param::number
int32_t number
Definition: mbed_ain_aout.h:88
mbed_ain_init_param::number
int32_t number
Definition: mbed_ain_aout.h:68
mbed_ain_init_param
Definition: mbed_ain_aout.h:66
mbed_aout_init_param
Definition: mbed_ain_aout.h:86
mbed_ain_desc::number
int32_t number
Definition: mbed_ain_aout.h:77