You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

210 lines
5.7 KiB

adding Hadron v3 keyboard, QWIIC devices support, haptic feedback support (#4462) * add initial support for hadron ver3 * add initial support for hadron ver3 * pull qwiic support for micro_led to be modified for use in hadron's 64x24 ssd1306 oled display * initial work on OLED using qwiic driver * early work to get 128x32 oled working by redefining qwiic micro oled parameters. Currently working, but would affect qwiic's micro oled functionality * moved oled defines to config.h and added ifndef to micro_oled driver * WORKING :D - note, still work in progress to get the start location correct on the 128x32 display. * added equation to automatically calculate display offset based on screen width * adding time-out timer to oled display * changed read lock staus via read_led_state * lock indications fixes * Added scroll lock indication to oled * add support for DRV2605 haptic driver * Improve readabiity of DRV2605 driver. -added typedef for waveform library -added unions for registers * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Fixes for PR * PR fixes * fix old persistent layer function to use new set_single_persistent_default_layer * fix issues with changing makefile defines that broken per-key haptic pulse * Comment fixes * Add definable parameter and auto-calibration based on motor choice
5 years ago
adding Hadron v3 keyboard, QWIIC devices support, haptic feedback support (#4462) * add initial support for hadron ver3 * add initial support for hadron ver3 * pull qwiic support for micro_led to be modified for use in hadron's 64x24 ssd1306 oled display * initial work on OLED using qwiic driver * early work to get 128x32 oled working by redefining qwiic micro oled parameters. Currently working, but would affect qwiic's micro oled functionality * moved oled defines to config.h and added ifndef to micro_oled driver * WORKING :D - note, still work in progress to get the start location correct on the 128x32 display. * added equation to automatically calculate display offset based on screen width * adding time-out timer to oled display * changed read lock staus via read_led_state * lock indications fixes * Added scroll lock indication to oled * add support for DRV2605 haptic driver * Improve readabiity of DRV2605 driver. -added typedef for waveform library -added unions for registers * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Fixes for PR * PR fixes * fix old persistent layer function to use new set_single_persistent_default_layer * fix issues with changing makefile defines that broken per-key haptic pulse * Comment fixes * Add definable parameter and auto-calibration based on motor choice
5 years ago
adding Hadron v3 keyboard, QWIIC devices support, haptic feedback support (#4462) * add initial support for hadron ver3 * add initial support for hadron ver3 * pull qwiic support for micro_led to be modified for use in hadron's 64x24 ssd1306 oled display * initial work on OLED using qwiic driver * early work to get 128x32 oled working by redefining qwiic micro oled parameters. Currently working, but would affect qwiic's micro oled functionality * moved oled defines to config.h and added ifndef to micro_oled driver * WORKING :D - note, still work in progress to get the start location correct on the 128x32 display. * added equation to automatically calculate display offset based on screen width * adding time-out timer to oled display * changed read lock staus via read_led_state * lock indications fixes * Added scroll lock indication to oled * add support for DRV2605 haptic driver * Improve readabiity of DRV2605 driver. -added typedef for waveform library -added unions for registers * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Fixes for PR * PR fixes * fix old persistent layer function to use new set_single_persistent_default_layer * fix issues with changing makefile defines that broken per-key haptic pulse * Comment fixes * Add definable parameter and auto-calibration based on motor choice
5 years ago
adding Hadron v3 keyboard, QWIIC devices support, haptic feedback support (#4462) * add initial support for hadron ver3 * add initial support for hadron ver3 * pull qwiic support for micro_led to be modified for use in hadron's 64x24 ssd1306 oled display * initial work on OLED using qwiic driver * early work to get 128x32 oled working by redefining qwiic micro oled parameters. Currently working, but would affect qwiic's micro oled functionality * moved oled defines to config.h and added ifndef to micro_oled driver * WORKING :D - note, still work in progress to get the start location correct on the 128x32 display. * added equation to automatically calculate display offset based on screen width * adding time-out timer to oled display * changed read lock staus via read_led_state * lock indications fixes * Added scroll lock indication to oled * add support for DRV2605 haptic driver * Improve readabiity of DRV2605 driver. -added typedef for waveform library -added unions for registers * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Fixes for PR * PR fixes * fix old persistent layer function to use new set_single_persistent_default_layer * fix issues with changing makefile defines that broken per-key haptic pulse * Comment fixes * Add definable parameter and auto-calibration based on motor choice
5 years ago
adding Hadron v3 keyboard, QWIIC devices support, haptic feedback support (#4462) * add initial support for hadron ver3 * add initial support for hadron ver3 * pull qwiic support for micro_led to be modified for use in hadron's 64x24 ssd1306 oled display * initial work on OLED using qwiic driver * early work to get 128x32 oled working by redefining qwiic micro oled parameters. Currently working, but would affect qwiic's micro oled functionality * moved oled defines to config.h and added ifndef to micro_oled driver * WORKING :D - note, still work in progress to get the start location correct on the 128x32 display. * added equation to automatically calculate display offset based on screen width * adding time-out timer to oled display * changed read lock staus via read_led_state * lock indications fixes * Added scroll lock indication to oled * add support for DRV2605 haptic driver * Improve readabiity of DRV2605 driver. -added typedef for waveform library -added unions for registers * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Fixes for PR * PR fixes * fix old persistent layer function to use new set_single_persistent_default_layer * fix issues with changing makefile defines that broken per-key haptic pulse * Comment fixes * Add definable parameter and auto-calibration based on motor choice
5 years ago
adding Hadron v3 keyboard, QWIIC devices support, haptic feedback support (#4462) * add initial support for hadron ver3 * add initial support for hadron ver3 * pull qwiic support for micro_led to be modified for use in hadron's 64x24 ssd1306 oled display * initial work on OLED using qwiic driver * early work to get 128x32 oled working by redefining qwiic micro oled parameters. Currently working, but would affect qwiic's micro oled functionality * moved oled defines to config.h and added ifndef to micro_oled driver * WORKING :D - note, still work in progress to get the start location correct on the 128x32 display. * added equation to automatically calculate display offset based on screen width * adding time-out timer to oled display * changed read lock staus via read_led_state * lock indications fixes * Added scroll lock indication to oled * add support for DRV2605 haptic driver * Improve readabiity of DRV2605 driver. -added typedef for waveform library -added unions for registers * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Fixes for PR * PR fixes * fix old persistent layer function to use new set_single_persistent_default_layer * fix issues with changing makefile defines that broken per-key haptic pulse * Comment fixes * Add definable parameter and auto-calibration based on motor choice
5 years ago
adding Hadron v3 keyboard, QWIIC devices support, haptic feedback support (#4462) * add initial support for hadron ver3 * add initial support for hadron ver3 * pull qwiic support for micro_led to be modified for use in hadron's 64x24 ssd1306 oled display * initial work on OLED using qwiic driver * early work to get 128x32 oled working by redefining qwiic micro oled parameters. Currently working, but would affect qwiic's micro oled functionality * moved oled defines to config.h and added ifndef to micro_oled driver * WORKING :D - note, still work in progress to get the start location correct on the 128x32 display. * added equation to automatically calculate display offset based on screen width * adding time-out timer to oled display * changed read lock staus via read_led_state * lock indications fixes * Added scroll lock indication to oled * add support for DRV2605 haptic driver * Improve readabiity of DRV2605 driver. -added typedef for waveform library -added unions for registers * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Fixes for PR * PR fixes * fix old persistent layer function to use new set_single_persistent_default_layer * fix issues with changing makefile defines that broken per-key haptic pulse * Comment fixes * Add definable parameter and auto-calibration based on motor choice
5 years ago
adding Hadron v3 keyboard, QWIIC devices support, haptic feedback support (#4462) * add initial support for hadron ver3 * add initial support for hadron ver3 * pull qwiic support for micro_led to be modified for use in hadron's 64x24 ssd1306 oled display * initial work on OLED using qwiic driver * early work to get 128x32 oled working by redefining qwiic micro oled parameters. Currently working, but would affect qwiic's micro oled functionality * moved oled defines to config.h and added ifndef to micro_oled driver * WORKING :D - note, still work in progress to get the start location correct on the 128x32 display. * added equation to automatically calculate display offset based on screen width * adding time-out timer to oled display * changed read lock staus via read_led_state * lock indications fixes * Added scroll lock indication to oled * add support for DRV2605 haptic driver * Improve readabiity of DRV2605 driver. -added typedef for waveform library -added unions for registers * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Update keyboards/hadron/ver2/keymaps/default/config.h Co-Authored-By: ishtob <ishtob@gmail.com> * Fixes for PR * PR fixes * fix old persistent layer function to use new set_single_persistent_default_layer * fix issues with changing makefile defines that broken per-key haptic pulse * Comment fixes * Add definable parameter and auto-calibration based on motor choice
5 years ago
  1. /*
  2. * Copyright 2018 Jack Humbert <jack.humb@gmail.com>
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 2 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #ifndef REV3_CONFIG_H
  18. #define REV3_CONFIG_H
  19. /* USB Device descriptor parameter */
  20. #define DEVICE_VER 0x0003
  21. #undef MATRIX_ROWS
  22. #undef MATRIX_COLS
  23. /* key matrix size */
  24. #define MATRIX_ROWS 5
  25. #define MATRIX_COLS 15
  26. /*
  27. * Keyboard Matrix Assignments
  28. *
  29. * Change this to how you wired your keyboard
  30. * COLS: AVR pins used for columns, left to right
  31. * ROWS: AVR pins used for rows, top to bottom
  32. * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
  33. * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
  34. *
  35. */
  36. #undef MATRIX_ROW_PINS
  37. #undef MATRIX_COL_PINS
  38. #define MATRIX_ROW_PINS { C15, C14, A10, A9, A8 }
  39. #define MATRIX_COL_PINS { B8, B2, B10, A0, A1, A2, B0, A3, B1, A6, A7, B12, C13, B11, B9 }
  40. #define UNUSED_PINS
  41. #define NUMBER_OF_ENCODERS 1
  42. #define ENCODERS_PAD_A { B13 }
  43. #define ENCODERS_PAD_B { B14 }
  44. //Audio
  45. #undef AUDIO_VOICES
  46. #undef C6_AUDIO
  47. #ifdef AUDIO_ENABLE
  48. #define STARTUP_SONG SONG(PLANCK_SOUND)
  49. // #define STARTUP_SONG SONG(NO_SOUND)
  50. #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
  51. SONG(COLEMAK_SOUND), \
  52. SONG(DVORAK_SOUND) \
  53. }
  54. #define AUDIO_CLICKY
  55. /* to enable clicky on startup */
  56. //#define AUDIO_CLICKY_ON
  57. #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
  58. #endif
  59. //configure qwiic micro_oled driver for the 128x32 oled
  60. #ifdef QWIIC_MICRO_OLED_ENABLE
  61. #undef I2C_ADDRESS_SA0_1
  62. #define I2C_ADDRESS_SA0_1 0b0111100
  63. #define LCDWIDTH 128
  64. #define LCDHEIGHT 32
  65. #define micro_oled_rotate_180
  66. #endif
  67. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
  68. // #define DEBOUNCE 6
  69. /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
  70. //#define LOCKING_SUPPORT_ENABLE
  71. /* Locking resynchronize hack */
  72. //#define LOCKING_RESYNC_ENABLE
  73. /*
  74. * Force NKRO
  75. *
  76. * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
  77. * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
  78. * makefile for this to work.)
  79. *
  80. * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
  81. * until the next keyboard reset.
  82. *
  83. * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
  84. * fully operational during normal computer usage.
  85. *
  86. * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
  87. * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
  88. * bootmagic, NKRO mode will always be enabled until it is toggled again during a
  89. * power-up.
  90. *
  91. */
  92. //#define FORCE_NKRO
  93. /*
  94. * Feature disable options
  95. * These options are also useful to firmware size reduction.
  96. */
  97. /* disable debug print */
  98. //#define NO_DEBUG
  99. /* disable print */
  100. //#define NO_PRINT
  101. /* disable action features */
  102. //#define NO_ACTION_LAYER
  103. //#define NO_ACTION_TAPPING
  104. //#define NO_ACTION_ONESHOT
  105. //#define NO_ACTION_MACRO
  106. //#define NO_ACTION_FUNCTION
  107. /*
  108. * MIDI options
  109. */
  110. /* Prevent use of disabled MIDI features in the keymap */
  111. //#define MIDI_ENABLE_STRICT 1
  112. /* enable basic MIDI features:
  113. - MIDI notes can be sent when in Music mode is on
  114. */
  115. #define MIDI_BASIC
  116. /* enable advanced MIDI features:
  117. - MIDI notes can be added to the keymap
  118. - Octave shift and transpose
  119. - Virtual sustain, portamento, and modulation wheel
  120. - etc.
  121. */
  122. //#define MIDI_ADVANCED
  123. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
  124. //#define MIDI_TONE_KEYCODE_OCTAVES 2
  125. /* Haptic Driver initialization settings
  126. * Feedback Control Settings */
  127. #define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
  128. #define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
  129. #define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
  130. /* default 3V ERM vibration motor voltage and library*/
  131. #if FB_ERM_LRA == 0
  132. #define RATED_VOLTAGE 3
  133. #define V_RMS 2.3
  134. #define V_PEAK 3.30
  135. /* Library Selection */
  136. #define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
  137. /* default 2V LRA voltage and library */
  138. #elif FB_ERM_LRA == 1
  139. #define RATED_VOLTAGE 2
  140. #define V_RMS 2.0
  141. #define V_PEAK 2.85
  142. #define F_LRA 200
  143. /* Library Selection */
  144. #define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
  145. #endif
  146. /* Control 1 register settings */
  147. #define DRIVE_TIME 25
  148. #define AC_COUPLE 0
  149. #define STARTUP_BOOST 1
  150. /* Control 2 Settings */
  151. #define BIDIR_INPUT 1
  152. #define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
  153. #define SAMPLE_TIME 3
  154. #define BLANKING_TIME 1
  155. #define IDISS_TIME 1
  156. /* Control 3 settings */
  157. #define NG_THRESH 2
  158. #define ERM_OPEN_LOOP 1
  159. #define SUPPLY_COMP_DIS 0
  160. #define DATA_FORMAT_RTO 0
  161. #define LRA_DRIVE_MODE 0
  162. #define N_PWM_ANALOG 0
  163. #define LRA_OPEN_LOOP 0
  164. /* Control 4 settings */
  165. #define ZC_DET_TIME 0
  166. #define AUTO_CAL_TIME 3
  167. #define RGBLIGHT_ANIMATIONS
  168. #define RGBLED_NUM 10
  169. #define RGB_DI_PIN B5
  170. #define DRIVER_LED_TOTAL RGBLED_NUM
  171. // #define RGB_MATRIX_KEYPRESSES
  172. #define SOLENOID_PIN A14
  173. #endif