Update formatting

anne_pro
Michiel Visser 2019-06-22 15:08:57 +02:00
parent a14c96f9ff
commit 29f5300b8a
3 changed files with 30 additions and 68 deletions

View File

@ -73,26 +73,26 @@ static UARTConfig uart_cfg = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!record->event.pressed) { if (!record->event.pressed) {
// Send 'next theme' command to lighting controller /* Send 'next theme' command to lighting controller */
uartStartSend(&UARTD3, 4, "\x09\x04\x05\x01\x00\x00"); uartStartSend(&UARTD3, 4, "\x09\x04\x05\x01\x00\x00");
} }
return true; return true;
} }
void matrix_init_kb(void) { void matrix_init_kb(void) {
// Turn on lighting controller /* Turn on lighting controller */
setPinOutput(C15); setPinOutput(C15);
writePinLow(C15); writePinLow(C15);
chThdSleepMilliseconds(100); chThdSleepMilliseconds(100);
writePinHigh(C15); writePinHigh(C15);
chThdSleepMilliseconds(100); chThdSleepMilliseconds(100);
// Initialize the lighting UART /* Initialize the lighting UART */
uartStart(&UARTD3, &uart_cfg); uartStart(&UARTD3, &uart_cfg);
palSetPadMode(GPIOB, 10, PAL_MODE_ALTERNATE(7)); palSetPadMode(GPIOB, 10, PAL_MODE_ALTERNATE(7));
palSetPadMode(GPIOB, 11, PAL_MODE_ALTERNATE(7)); palSetPadMode(GPIOB, 11, PAL_MODE_ALTERNATE(7));
// Send 'set theme' command to lighting controller /* Send 'set theme' command to lighting controller */
uartStartSend(&UARTD3, 4, "\x09\x02\x01\x01"); uartStartSend(&UARTD3, 4, "\x09\x02\x01\x01");
matrix_init_user(); matrix_init_user();

View File

@ -17,7 +17,7 @@
#pragma once #pragma once
#include "quantum.h" #include "quantum.h"
/* The fully-featured LAYOUT_all() that has every single key available in the matrix. /* The fully-featured LAYOUT() that has every single key available in the matrix.
*/ */
#define LAYOUT(\ #define LAYOUT(\
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \

View File

@ -37,11 +37,6 @@
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 6 #define DEBOUNCE 6
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
//#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
//#define LOCKING_RESYNC_ENABLE
/* /*
* Force NKRO * Force NKRO
* *
@ -80,36 +75,3 @@
//#define NO_ACTION_ONESHOT //#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO //#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION //#define NO_ACTION_FUNCTION
/*
* MIDI options
*/
/* Prevent use of disabled MIDI features in the keymap */
//#define MIDI_ENABLE_STRICT 1
/* enable basic MIDI features:
- MIDI notes can be sent when in Music mode is on
*/
//#define MIDI_BASIC
/* enable advanced MIDI features:
- MIDI notes can be added to the keymap
- Octave shift and transpose
- Virtual sustain, portamento, and modulation wheel
- etc.
*/
//#define MIDI_ADVANCED
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
//#define MIDI_TONE_KEYCODE_OCTAVES 1
// #define WS2812_LED_N 2
// #define RGBLED_NUM WS2812_LED_N
// #define WS2812_TIM_N 2
// #define WS2812_TIM_CH 2
// #define PORT_WS2812 GPIOA
// #define PIN_WS2812 1
// #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection)
//#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP
//#define WS2812_EXTERNAL_PULLUP