|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Nintendo Nunchuk joystick. More...
Files | |
| file | input_nunchuk.h |
| Header file for Nunchuk input driver synchronous reading. | |
Macros | |
| #define | INPUT_NUNCHUK_ACCEL_X 0 |
| Acceleration on the X axis reported by the Nunchuk. | |
| #define | INPUT_NUNCHUK_ACCEL_Y 1 |
| Acceleration on the Y axis reported by the Nunchuk. | |
| #define | INPUT_NUNCHUK_ACCEL_Z 2 |
| Acceleration on the Z axis reported by the Nunchuk. | |
Functions | |
| int | nunchuk_read (const struct device *dev) |
Starts the reading process of the current button states, joystick position and optionally the acceleration (if CONFIG_INPUT_NUNCHUK_ACCELERATION is enabled) from the Nunchuk. | |
Nintendo Nunchuk joystick.
| #define INPUT_NUNCHUK_ACCEL_X 0 |
#include <zephyr/input/input_nunchuk.h>
Acceleration on the X axis reported by the Nunchuk.
CONFIG_INPUT_NUNCHUK_ACCELERATION. | #define INPUT_NUNCHUK_ACCEL_Y 1 |
#include <zephyr/input/input_nunchuk.h>
Acceleration on the Y axis reported by the Nunchuk.
CONFIG_INPUT_NUNCHUK_ACCELERATION. | #define INPUT_NUNCHUK_ACCEL_Z 2 |
#include <zephyr/input/input_nunchuk.h>
Acceleration on the Z axis reported by the Nunchuk.
CONFIG_INPUT_NUNCHUK_ACCELERATION. | int nunchuk_read | ( | const struct device * | dev | ) |
#include <zephyr/input/input_nunchuk.h>
Starts the reading process of the current button states, joystick position and optionally the acceleration (if CONFIG_INPUT_NUNCHUK_ACCELERATION is enabled) from the Nunchuk.
This function does only function if the property 'polling-interval-ms' is set to 0 in the DTS definition for the Nunchuk input driver, so that background polling is disabled.
Note that the function exits immediately and the data is read from the Nunchuk in the background and reported via the standard input event interface.
| dev | Pointer to the Nunchuk device |
| SUCCESS | if the data read process could be started. |
| -errno | In case of any error. |