From be8257f0a784a07e7dd93ecafe96c1d7774383f7 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 6 Mar 2019 11:51:41 -0800 Subject: [Keyboard] handwired/trackpoint: refactor and readme cleanup (#5325) * handwired/trackpoint: refactor - layout macro KEYMAP renamed to LAYOUT - keymap now uses #include QMK_KEYBOARD_H * handwired/trackpoint: readme cleanup - fix wiring layout image URL - update readme structure * handwired/trackpoint: rename readme to lowercase * handwired/trackpoint: update header files to use #pragma once --- keyboards/handwired/trackpoint/README.md | 10 -- keyboards/handwired/trackpoint/config.h | 119 ++++++++++----------- .../handwired/trackpoint/keymaps/default/keymap.c | 4 +- keyboards/handwired/trackpoint/readme.md | 19 ++++ keyboards/handwired/trackpoint/trackpoint.h | 11 +- 5 files changed, 83 insertions(+), 80 deletions(-) delete mode 100644 keyboards/handwired/trackpoint/README.md create mode 100644 keyboards/handwired/trackpoint/readme.md (limited to 'keyboards/handwired/trackpoint') diff --git a/keyboards/handwired/trackpoint/README.md b/keyboards/handwired/trackpoint/README.md deleted file mode 100644 index bbfcaab0c..000000000 --- a/keyboards/handwired/trackpoint/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# IBM Trackpoint demonstration - -This is just a simple demo to show how to integrate IBM Trackpoint in QMK. - -Wiring used in the demonstration: -![Wiring example](http://imgur.com/8ghG2U8) - -Some documentation: -* [How to wire IBM Trackpoint](https://github.com/alonswartz/trackpoint) -* [QMK documentation](https://docs.qmk.fm/) diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h index 22ec75f76..cecb6a509 100644 --- a/keyboards/handwired/trackpoint/config.h +++ b/keyboards/handwired/trackpoint/config.h @@ -1,70 +1,67 @@ -#ifndef CONFIG_H - #define CONFIG_H +#pragma once - #include "config_common.h" +#include "config_common.h" - #define VENDOR_ID 0x1234 - #define PRODUCT_ID 0x5678 - #define DEVICE_VER 0x0001 - #define MANUFACTURER QMK - #define PRODUCT TRACKPOINT-DEMO - #define DESCRIPTION Simple demonstration for IBM Trackpoint integration +#define VENDOR_ID 0x1234 +#define PRODUCT_ID 0x5678 +#define DEVICE_VER 0x0001 +#define MANUFACTURER QMK +#define PRODUCT TRACKPOINT-DEMO +#define DESCRIPTION Simple demonstration for IBM Trackpoint integration - #define MATRIX_ROWS 1 - #define MATRIX_COLS 3 +#define MATRIX_ROWS 1 +#define MATRIX_COLS 3 - #ifdef PS2_USE_USART - #define PS2_CLOCK_PORT PORTD - #define PS2_CLOCK_PIN PIND - #define PS2_CLOCK_DDR DDRD - #define PS2_CLOCK_BIT 5 - #define PS2_DATA_PORT PORTD - #define PS2_DATA_PIN PIND - #define PS2_DATA_DDR DDRD - #define PS2_DATA_BIT 2 +#ifdef PS2_USE_USART + #define PS2_CLOCK_PORT PORTD + #define PS2_CLOCK_PIN PIND + #define PS2_CLOCK_DDR DDRD + #define PS2_CLOCK_BIT 5 + #define PS2_DATA_PORT PORTD + #define PS2_DATA_PIN PIND + #define PS2_DATA_DDR DDRD + #define PS2_DATA_BIT 2 - /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ - /* set DDR of CLOCK as input to be slave */ - #define PS2_USART_INIT() do { \ - PS2_CLOCK_DDR &= ~(1<