-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
input: pat912x: add a bunch of settings
Add devicetree based settings for resolution, axis inversion and sleep mode enable. Keep the resolution setting in its own function so it can be called by the application again in runtime if needed. Signed-off-by: Fabio Baltieri <[email protected]>
- Loading branch information
1 parent
0abba58
commit c2163cf
Showing
4 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright 2024 Google LLC | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#ifndef ZEPHYR_INCLUDE_INPUT_PAT912X_H_ | ||
#define ZEPHYR_INCLUDE_INPUT_PAT912X_H_ | ||
|
||
/** | ||
* @brief Set resolution on a pat912x device | ||
* | ||
* @param dev pat912x device. | ||
* @param res_x_cpi CPI resolution for the X axis, 0 to 1275, -1 to keep the | ||
* current value. | ||
* @param res_y_cpi CPI resolution for the Y axis, 0 to 1275, -1 to keep the | ||
* current value. | ||
*/ | ||
int pat912x_set_resolution(const struct device *dev, | ||
int16_t res_x_cpi, int16_t res_y_cpi); | ||
|
||
#endif /* ZEPHYR_INCLUDE_INPUT_PAT912X_H_ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters