qmk-keychron-q3-colemak-dh/keyboards/vinhcatba/uncertainty/config.h
vinhcatba e1630edef4
[Keyboard] vinhcatba/uncertainty (#21142)
* vinh: test fw for uncertainty (deprecated)

* v0.1: update base firmware with 2 layers, use bongo cat animation for oled

* v0.1: change directory

* v0.1: cleanup

* v0.2: update layers

* v0.3: add VIA support

* v0.3: add VIA support (continue)

* vinh: test fw for uncertainty (deprecated)

* v0.1: update base firmware with 2 layers, use bongo cat animation for oled

* v0.1: change directory

* v0.1: cleanup

* v0.2: update layers

* v0.3: add VIA support

* v0.3: add VIA support (continue)

* v0.3: change keyboard name, remove eeprom config save in VIA keymap

* cleanup for PR

* update readme

* vinh: test fw for uncertainty (deprecated)

* v0.1: update base firmware with 2 layers, use bongo cat animation for oled

* v0.1: change directory

* v0.1: cleanup

* v0.2: update layers

* v0.3: add VIA support

* v0.3: add VIA support (continue)

* vinh: test fw for uncertainty (deprecated)

* v0.1: update base firmware with 2 layers, use bongo cat animation for oled

* v0.1: change directory

* v0.1: cleanup

* v0.3: change keyboard name, remove eeprom config save in VIA keymap

* cleanup for PR

* update readme

* add license to header files, update ws2812 driver and DI_PIN to info.json

* resovle PR suggestion for config.h, halconf.h, mcuconf.h

* update info.json regarding PR comment

* update bongo.h regarding PR comment

* add oled mode toggle

* update readme.md, rules.mk regarding PR comment

* add submodule update

* move oled handle to keyboard level

* Update keyboards/vinhcatba/uncertainty/uncertainty.c

forgot user-level proces_record

* now using bongo as source file

* Apply suggestions from code review

remove default value codes

* move WPM_ENABLE and ENCODER_MAP_ENABLE to keymap level

* Apply suggestions from code review

* Apply suggestions from code review

* Update keyboards/vinhcatba/uncertainty/config.h
2023-10-08 23:35:51 -07:00

31 lines
1.0 KiB
C

// Copyright 2023 Vinh Le (@vinhcatba)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
/* WS2812 driver config specifically for STM32F401 */
// DI pin = PB1, which is AF02, TIM3_CH4 (table 9 in datasheet)
#define RGBLIGHT_LED_MAP { 2, 3, 4, 5, 6, 0, 1, 7, 8, 9, 10, 11, 12, 13} // index 5 = CAPS; index 6 = NUM
#define WS2812_PWM_DRIVER PWMD3 // TIM3
#define WS2812_PWM_CHANNEL 4 // CH4
#define WS2812_PWM_PAL_MODE 2 // AF2
#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA1 Stream 2 for TIM3_UP (table 28 in reference manual)
#define WS2812_DMA_CHANNEL 5 // DMA Channel 5 for TIM3_UP (table 28 in reference manual)
#define I2C1_CLOCK_SPEED 400000
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_16_9
/* eeprom i2c driver config */
#define EXTERNAL_EEPROM_I2C_BASE_ADDRESS 0b10100000
#define EXTERNAL_EEPROM_BYTE_COUNT 4096
#define EXTERNAL_EEPROM_PAGE_SIZE 32
#define EXTERNAL_EEPROM_WRITE_TIME 10
//#define EEPROM_I2C_24LC32
/* OLED config */
#define OLED_UPDATE_INTERVAL 100
#define OLED_BRIGHTNESS 200