Zephyr API Documentation  3.6.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
input_analog_axis.h
Go to the documentation of this file.
1/*
2 * Copyright 2023 Google LLC
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_INPUT_ANALOG_AXIS_H_
8#define ZEPHYR_INCLUDE_INPUT_ANALOG_AXIS_H_
9
10#include <stdint.h>
11#include <zephyr/device.h>
12
34};
35
43typedef void (*analog_axis_raw_data_t)(const struct device *dev,
44 int channel, int16_t raw_val);
45
57
63int analog_axis_num_axes(const struct device *dev);
64
76int analog_axis_calibration_get(const struct device *dev,
77 int channel,
78 struct analog_axis_calibration *cal);
79
91int analog_axis_calibration_set(const struct device *dev,
92 int channel,
93 struct analog_axis_calibration *cal);
94
97#endif /* ZEPHYR_INCLUDE_INPUT_ANALOG_AXIS_H_ */
void(* analog_axis_raw_data_t)(const struct device *dev, int channel, int16_t raw_val)
Analog axis raw data callback.
Definition: input_analog_axis.h:43
void analog_axis_set_raw_data_cb(const struct device *dev, analog_axis_raw_data_t cb)
Set a raw data callback.
int analog_axis_num_axes(const struct device *dev)
Get the number of defined axes.
int analog_axis_calibration_set(const struct device *dev, int channel, struct analog_axis_calibration *cal)
Set the axis calibration data.
int analog_axis_calibration_get(const struct device *dev, int channel, struct analog_axis_calibration *cal)
Get the axis calibration data.
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
__INT16_TYPE__ int16_t
Definition: stdint.h:73
Analog axis calibration data structure.
Definition: input_analog_axis.h:27
int16_t in_min
Input value that corresponds to the minimum output value.
Definition: input_analog_axis.h:29
int16_t in_max
Input value that corresponds to the maximum output value.
Definition: input_analog_axis.h:31
uint16_t in_deadzone
Input value center deadzone.
Definition: input_analog_axis.h:33
Runtime device structure (in ROM) per driver instance.
Definition: device.h:399