updates clueboard configuration

clueboard_arm
Jack Humbert 7 years ago committed by skullY
parent 5d398b8f5b
commit 95d73bff77

@ -252,7 +252,7 @@
* requirements.
* @note Requires @p CH_CFG_USE_MESSAGES.
*/
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
#define CH_CFG_USE_MESSAGES_PRIORITY TRUE
/**
* @brief Mailboxes APIs.
@ -328,7 +328,7 @@
*
* @note The default is @p FALSE.
*/
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
/**
* @brief Debug option, parameters checks.
@ -337,7 +337,7 @@
*
* @note The default is @p FALSE.
*/
#define CH_DBG_ENABLE_CHECKS TRUE
#define CH_DBG_ENABLE_CHECKS FALSE
/**
* @brief Debug option, consistency checks.
@ -347,7 +347,7 @@
*
* @note The default is @p FALSE.
*/
#define CH_DBG_ENABLE_ASSERTS TRUE
#define CH_DBG_ENABLE_ASSERTS FALSE
/**
* @brief Debug option, trace buffer.
@ -355,7 +355,7 @@
*
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
*/
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_ALL
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
/**
* @brief Trace buffer entries.
@ -384,7 +384,7 @@
*
* @note The default is @p FALSE.
*/
#define CH_DBG_FILL_THREADS TRUE
#define CH_DBG_FILL_THREADS FALSE
/**
* @brief Debug option, threads profiling.

@ -28,7 +28,7 @@
#define USBSTR_MANUFACTURER 'C', '\x00', 'l', '\x00', 'u', '\x00', 'e', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00'
#define PRODUCT "Clueboard60"
#define USBSTR_PRODUCT 'C', '\x00', 'l', '\x00', 'u', '\x00', 'e', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', '6', '\x00', '0', '\x00'
#define DESCRIPTION Clueboard 60% PCB
#define DESCRIPTION Clueboard 60 PCB
/* key matrix size */
#define MATRIX_ROWS 5
@ -134,6 +134,6 @@
*
* STM32F042x6
*/
#define STM32_REMAP_PINS
// #define STM32_REMAP_PINS
#endif

@ -24,6 +24,22 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS];
static bool debouncing = false;
static uint16_t debouncing_time = 0;
__attribute__ ((weak))
void matrix_init_user(void) {}
__attribute__ ((weak))
void matrix_scan_user(void) {}
__attribute__ ((weak))
void matrix_init_kb(void) {
matrix_init_user();
}
__attribute__ ((weak))
void matrix_scan_kb(void) {
matrix_scan_user();
}
void matrix_init(void) {
printf("matrix init\n");
@ -57,8 +73,10 @@ void matrix_init(void) {
memset(matrix_debouncing, 0, MATRIX_ROWS);
/* Setup capslock */
palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL);
palClearPad(GPIOB, 7);
// palSetPadMode(GPIOB, 7, PAL_MODE_OUTPUT_PUSHPULL);
// palClearPad(GPIOB, 7);
matrix_init_quantum();
}
uint8_t matrix_scan(void) {
@ -82,18 +100,18 @@ uint8_t matrix_scan(void) {
palReadPad(GPIOA, 2) << 0 |
palReadPad(GPIOA, 3) << 1 |
palReadPad(GPIOA, 6) << 2 |
palReadPad(GPIOA, 14) << 3 |
palReadPad(GPIOA, 15) << 4 |
palReadPad(GPIOB, 14) << 3 |
palReadPad(GPIOB, 15) << 4 |
palReadPad(GPIOA, 8) << 5 |
palReadPad(GPIOA, 9) << 6 |
palReadPad(GPIOA, 7) << 7 |
palReadPad(GPIOA, 3) << 8 |
palReadPad(GPIOA, 4) << 9 |
palReadPad(GPIOA, 14) << 10 |
palReadPad(GPIOA, 15) << 11 |
palReadPad(GPIOA, 13) << 12 |
palReadPad(GPIOA, 5) << 13 |
palReadPad(GPIOA, 6) << 14
palReadPad(GPIOB, 3) << 8 |
palReadPad(GPIOB, 4) << 9 |
palReadPad(GPIOC, 14) << 10 |
palReadPad(GPIOC, 15) << 11 |
palReadPad(GPIOC, 13) << 12 |
palReadPad(GPIOB, 5) << 13 |
palReadPad(GPIOB, 6) << 14
);
// unstrobe row { PB0, PB1, PB2, PA15, PA10 }
@ -117,6 +135,9 @@ uint8_t matrix_scan(void) {
}
debouncing = false;
}
matrix_scan_quantum();
return 1;
}

@ -66,6 +66,10 @@
#define STM32_USB_CLOCK_REQUIRED TRUE
#define STM32_USBPRE STM32_USBPRE_DIV1P5
#undef STM32_HSE_BYPASS
// #error "oh no"
// #endif
/*
* ADC driver system settings.
*/

@ -14,13 +14,13 @@ MCU_SERIES = STM32F3xx
MCU_LDSCRIPT = STM32F303xC
# Startup code to use
# - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/
# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/
MCU_STARTUP = stm32f3xx
# Board: it should exist either in <chibios>/os/hal/boards/
# or <this_dir>/boards
BOARD = GENERIC_STM32_F303XC
#BOARD = ST_STM32F3_DISCOVERY
# BOARD = ST_STM32F3_DISCOVERY
# Cortex version
MCU = cortex-m4
@ -31,7 +31,7 @@ ARMV = 7
# Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
#OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000
# OPT_DEFS = -DCORTEX_VTOR_INIT=0x08005000
OPT_DEFS =
# Options to pass to dfu-util when flashing
@ -40,11 +40,13 @@ DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration
MOUSEKEY_ENABLE ?= yes # Mouse keys
EXTRAKEY_ENABLE ?= yes # Audio control and System control
CONSOLE_ENABLE ?= yes # Console for debug
COMMAND_ENABLE ?= yes # Commands for debug and configuration
#SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover
CUSTOM_MATRIX ?= yes # Custom matrix file
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
#CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = yes # Commands for debug and configuration
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
CUSTOM_MATRIX = yes # Custom matrix file
# SERIAL_LINK_ENABLE = yes
Loading…
Cancel
Save