34 #include <glog/logging.h>
41 #include <linux/gpio.h>
42 #include <sys/ioctl.h>
47 : m_charDevName{charDeviceName}, m_lineHandle{-1},
48 m_gpioNumber(gpioNumber) {}
56 LOG(
ERROR) <<
"Failed to open gpio!";
60 struct gpiohandle_request request;
62 request.flags = openType;
64 ret = ioctl(fd, GPIO_GET_LINEHANDLE_IOCTL, &request);
91 struct gpiohandle_data
data;
95 LOG(
ERROR) <<
"The Gpio object is not initialized!";
110 struct gpiohandle_data
data;
114 LOG(
ERROR) <<
"The Gpio object is not initialized!";