Browse Source

Add support for current/voltage measurement on Ghoul. (#19630)

pull/19167/head
Nick Brassel 1 year ago
committed by GitHub
parent
commit
baecc69da5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 6 deletions
  1. +2
    -2
      keyboards/tzarc/ghoul/rev1/rp2040/config.h
  2. +1
    -1
      keyboards/tzarc/ghoul/rev1/rp2040/halconf.h
  3. +2
    -2
      keyboards/tzarc/ghoul/rev1/rp2040/mcuconf.h
  4. +0
    -1
      keyboards/tzarc/ghoul/rev1/stm32/rules.mk
  5. +2
    -0
      keyboards/tzarc/ghoul/rules.mk

+ 2
- 2
keyboards/tzarc/ghoul/rev1/rp2040/config.h View File

@ -28,8 +28,8 @@
#define RGB_ENABLE_PIN GP6
// ADC Configuration
#define ADC_RESOLUTION ? ? ? // ADC_CFGR1_RES_12BIT // TBD when RP2040 has analog support
#define ADC_SATURATION ? ? ? // ((1 << 12) - 1) // TBD when RP2040 has analog support
#define ADC_RESOLUTION 12
#define ADC_SATURATION ((1 << 12) - 1)
#define ADC_CURRENT_PIN GP26
#define ADC_VOLTAGE_PIN GP27


+ 1
- 1
keyboards/tzarc/ghoul/rev1/rp2040/halconf.h View File

@ -2,7 +2,7 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
//#define HAL_USE_ADC TRUE
#define HAL_USE_ADC TRUE
#define HAL_USE_SPI TRUE
#include_next <halconf.h>

+ 2
- 2
keyboards/tzarc/ghoul/rev1/rp2040/mcuconf.h View File

@ -5,8 +5,8 @@
#include_next <mcuconf.h>
// Used for RGB
//#undef RP_ADC_USE_ADC1
//#define RP_ADC_USE_ADC1 TRUE
#undef RP_ADC_USE_ADC1
#define RP_ADC_USE_ADC1 TRUE
// Used for EEPROM
#undef RP_SPI_USE_SPI0


+ 0
- 1
keyboards/tzarc/ghoul/rev1/stm32/rules.mk View File

@ -1,2 +1 @@
WS2812_DRIVER = pwm
SRC += analog.c

+ 2
- 0
keyboards/tzarc/ghoul/rules.mk View File

@ -5,3 +5,5 @@ QUANTUM_PAINTER_DRIVERS = ssd1351_spi
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
DEFAULT_FOLDER = tzarc/ghoul/rev1/stm32
SRC += analog.c

Loading…
Cancel
Save