Zephyr Project API 4.2.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
13#ifndef ZEPHYR_INCLUDE_INPUT_ANALOG_AXIS_H_
14#define ZEPHYR_INCLUDE_INPUT_ANALOG_AXIS_H_
15
16#include <stdint.h>
17#include <zephyr/device.h>
18
40
48typedef void (*analog_axis_raw_data_t)(const struct device *dev,
49 int channel, int16_t raw_val);
50
62
69int analog_axis_num_axes(const struct device *dev);
70
82int analog_axis_calibration_get(const struct device *dev,
83 int channel,
84 struct analog_axis_calibration *cal);
85
97int analog_axis_calibration_set(const struct device *dev,
98 int channel,
99 struct analog_axis_calibration *cal);
100
103#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:48
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:32
int16_t in_min
Input value that corresponds to the minimum output value.
Definition input_analog_axis.h:34
int16_t in_max
Input value that corresponds to the maximum output value.
Definition input_analog_axis.h:36
uint16_t in_deadzone
Input value center deadzone.
Definition input_analog_axis.h:38
Runtime device structure (in ROM) per driver instance.
Definition device.h:510