[MERGE] Add UART based SpaceMouse Module support (22519)
This commit is contained in:
parent
54e78ad86f
commit
26ff67ff78
5 changed files with 222 additions and 1 deletions
20
drivers/sensors/spacemouse_module.h
Normal file
20
drivers/sensors/spacemouse_module.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Copyright 2023 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct {
|
||||
int16_t x;
|
||||
int16_t y;
|
||||
int16_t z;
|
||||
int16_t twist;
|
||||
int16_t tilt_x;
|
||||
int16_t tilt_y;
|
||||
} spacemouse_data_t;
|
||||
|
||||
bool spacemouse_send_command(uint8_t cmd);
|
||||
bool spacemouse_init(void);
|
||||
spacemouse_data_t spacemouse_get_data(void);
|
Loading…
Add table
Add a link
Reference in a new issue