diff options
| author | Nick Brassel | 2021-08-29 00:20:25 +0200 |
|---|---|---|
| committer | Nick Brassel | 2021-08-29 00:20:25 +0200 |
| commit | f061ca497464fe85284906fb163a33eaee7a91ef (patch) | |
| tree | 33ef1bfb529aed382e8526c607c4e18717f92571 /quantum/digitizer.h | |
| parent | ff65185dec6f97be1eb49f17cea526a0d0bbf3d6 (diff) | |
| parent | 4bad375d7c09d949a9dcdd4feba147c9c7a67ec6 (diff) | |
Breaking changes develop merge to master, 2021Q3 edition. (#14196)
Diffstat (limited to 'quantum/digitizer.h')
| -rw-r--r-- | quantum/digitizer.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/quantum/digitizer.h b/quantum/digitizer.h new file mode 100644 index 0000000000..cef551567e --- /dev/null +++ b/quantum/digitizer.h @@ -0,0 +1,41 @@ +/* Copyright 2021 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#include "quantum.h" + +#include <stdint.h> + +enum digitizer_status { DZ_INITIALIZED = 1, DZ_UPDATED = 2 }; + +typedef struct { + int8_t tipswitch; + int8_t inrange; + uint8_t id; + float x; + float y; + uint8_t status : 2; +} digitizer_t; + +extern digitizer_t digitizer; + +digitizer_t digitizer_get_report(void); + +void digitizer_set_report(digitizer_t newDigitizerReport); + +void digitizer_task(void); + +void host_digitizer_send(digitizer_t *digitizer); |