gpio.h
Go to the documentation of this file.
1 /*
2  * BSD 3-Clause License
3  *
4  * Copyright (c) 2019, Analog Devices, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright notice, this
11  * list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright notice,
14  * this list of conditions and the following disclaimer in the documentation
15  * and/or other materials provided with the distribution.
16  *
17  * 3. Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived from
19  * this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 #ifndef GPIO_H
33 #define GPIO_H
34 
35 #include <string>
36 
37 namespace aditof {
38 
39 enum api_Values {
67 };
68 
70 
71 class Gpio {
72  public:
73  Gpio(const std::string &charDeviceName, int gpioNumber);
74  int openForRead();
75  int openForWrite();
76  int close();
77  int writeValue(int value);
78  int readValue(int &value);
79 
80  private:
81  int open(int openType);
82 
83  private:
87 };
88 
89 } // namespace aditof
90 
91 #endif /* GPIO_H */
aditof::GET_MODE_DETAILS
@ GET_MODE_DETAILS
Definition: gpio.h:46
aditof::STOP
@ STOP
Definition: gpio.h:44
aditof::SET_CONTROL
@ SET_CONTROL
Definition: gpio.h:51
aditof::ADSD3500_WRITE_PAYLOAD
@ ADSD3500_WRITE_PAYLOAD
Definition: gpio.h:59
aditof::ADSD3500_WRITE_PAYLOAD_CMD
@ ADSD3500_WRITE_PAYLOAD_CMD
Definition: gpio.h:58
aditof::GET_INI_ARRAY
@ GET_INI_ARRAY
Definition: gpio.h:66
aditof::GET_FRAME
@ GET_FRAME
Definition: gpio.h:49
aditof::Gpio::m_lineHandle
int m_lineHandle
Definition: gpio.h:85
aditof::Gpio::openForRead
int openForRead()
Definition: gpio.cpp:77
string
GLsizei const GLchar *const * string
Definition: glcorearb.h:3083
aditof::SET_SENSOR_CONFIGURATION
@ SET_SENSOR_CONFIGURATION
Definition: gpio.h:65
aditof::ADSD3500_WRITE_CMD
@ ADSD3500_WRITE_CMD
Definition: gpio.h:55
aditof::Gpio::m_charDevName
std::string m_charDevName
Definition: gpio.h:84
aditof::GET_INTERRUPTS
@ GET_INTERRUPTS
Definition: gpio.h:61
aditof::GET_CONTROL
@ GET_CONTROL
Definition: gpio.h:52
aditof::Gpio::m_gpioNumber
int m_gpioNumber
Definition: gpio.h:86
aditof::INIT_TARGET_DEPTH_COMPUTE
@ INIT_TARGET_DEPTH_COMPUTE
Definition: gpio.h:53
aditof::Gpio::open
int open(int openType)
Definition: gpio.cpp:50
aditof::ADSD3500_READ_PAYLOAD_CMD
@ ADSD3500_READ_PAYLOAD_CMD
Definition: gpio.h:56
aditof::Gpio::close
int close()
Definition: gpio.cpp:79
aditof
Namespace aditof.
Definition: adsd_errs.h:40
aditof::ADSD3500_READ_CMD
@ ADSD3500_READ_CMD
Definition: gpio.h:54
aditof::Gpio::readValue
int readValue(int &value)
Definition: gpio.cpp:90
aditof::ADSD3500_READ_PAYLOAD
@ ADSD3500_READ_PAYLOAD
Definition: gpio.h:57
aditof::Gpio
Definition: gpio.h:71
aditof::api_Values
api_Values
Definition: gpio.h:39
aditof::GET_AVAILABLE_MODES
@ GET_AVAILABLE_MODES
Definition: gpio.h:45
aditof::PROTOCOL_EXAMPLE
@ PROTOCOL_EXAMPLE
Definition: gpio.h:69
aditof::FIND_SENSORS
@ FIND_SENSORS
Definition: gpio.h:41
aditof::HANG_UP
@ HANG_UP
Definition: gpio.h:62
aditof::Gpio::openForWrite
int openForWrite()
Definition: gpio.cpp:75
aditof::API_NOT_DEFINED
@ API_NOT_DEFINED
Definition: gpio.h:40
aditof::SET_DEPTH_COMPUTE_PARAM
@ SET_DEPTH_COMPUTE_PARAM
Definition: gpio.h:64
aditof::GET_AVAILABLE_CONTROLS
@ GET_AVAILABLE_CONTROLS
Definition: gpio.h:50
aditof::PROTOCOL_COUNT
@ PROTOCOL_COUNT
Definition: gpio.h:69
aditof::Gpio::writeValue
int writeValue(int value)
Definition: gpio.cpp:109
aditof::Gpio::Gpio
Gpio(const std::string &charDeviceName, int gpioNumber)
Definition: gpio.cpp:46
value
GLsizei const GLfloat * value
Definition: glcorearb.h:3093
aditof::SET_MODE
@ SET_MODE
Definition: gpio.h:47
aditof::protocols
protocols
Definition: gpio.h:69
aditof::GET_DEPTH_COMPUTE_PARAM
@ GET_DEPTH_COMPUTE_PARAM
Definition: gpio.h:63
aditof::ADSD3500_GET_STATUS
@ ADSD3500_GET_STATUS
Definition: gpio.h:60
aditof::OPEN
@ OPEN
Definition: gpio.h:42
aditof::START
@ START
Definition: gpio.h:43
aditof::SET_MODE_BY_INDEX
@ SET_MODE_BY_INDEX
Definition: gpio.h:48


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:53