hal_module_create.cpp
)
-target_link_libraries(${PROJECT_NAME} ${plugin_pkgs_LDFLAGS} "-lrt -ldl -pthread")
+target_link_libraries(${PROJECT_NAME} ${plugin_pkgs_LDFLAGS})
install(TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}/sensor)
bool sensor_hal_base::is_sensorhub_controlled(const string &key)
{
- string key_node = string("/sys/class/sensors/ssp_sensor/") + key;
+ string key_node = string("/sys/class/sensors/ssp_sensor/") + key;
if (access(key_node.c_str(), F_OK) == 0)
return true;
*/
#ifndef EVIOCSCLOCKID
-#define EVIOCSCLOCKID _IOW('E', 0xa0, int) /* Set clockid to be used for timestamps */
+/* Set clockid to be used for timestamps */
+#define EVIOCSCLOCKID _IOW('E', 0xa0, int)
#endif
-
typedef struct {
int method;
std::string data_node_path;
std::string prefix;
} input_method_info;
-#define DEFAULT_WAIT_TIME 0
-
class sensor_hal_base : public sensor_hal
{
public:
sensor_hal_base();
virtual ~sensor_hal_base();
- bool init(void *data = NULL);
- long set_command(unsigned int cmd, long val);
- bool set_wakeup(int wakeup);
- int send_sensorhub_data(const char *data, int data_len);
-
protected:
bool set_enable_node(const std::string &node_path, bool sensorhub_controlled, bool enable, int enable_bit = 0);