[MicroMod] Add SPI config and update enabled

This commit is contained in:
Drashna Jael're 2024-06-05 16:54:15 -07:00
parent 977a327718
commit cafea5016d
No known key found for this signature in database
GPG Key ID: DBA1FD3A860D1B11
3 changed files with 27 additions and 8 deletions

View File

@ -26,3 +26,16 @@
#define ENCODERS_PAD_A { C0 }
#define ENCODERS_PAD_B { C1 }
#define SPI_DRIVER SPID1
#define SPI_SCK_PIN A5
#define SPI_MOSI_PIN A7
#define SPI_MISO_PIN A6
/* OLED SPI Pins */
#define OLED_DC_PIN C0
#define OLED_RST_PIN C1
#define OLED_CS_PIN C4
/* Divisor for OLED */
#define OLED_SPI_DIVISOR 4

View File

@ -16,15 +16,9 @@
#pragma once
#define HAL_USE_ADC TRUE
#define HAL_USE_I2C TRUE
#define HAL_USE_PWM TRUE
#define HAL_USE_SPI TRUE
#ifdef AUDIO_DRIVER_DAC
#define HAL_USE_GPT TRUE
#define HAL_USE_DAC TRUE
#endif
#include_next <halconf.h>

View File

@ -18,21 +18,32 @@
#include_next <mcuconf.h>
#if HAL_USE_ADC==TRUE
#undef STM32_ADC_USE_ADC1
#define STM32_ADC_USE_ADC1 TRUE
#endif
#if HAL_USE_I2C==TRUE
#undef STM32_I2C_USE_I2C2
#define STM32_I2C_USE_I2C2 TRUE
#endif
#if HAL_USE_SPI==TRUE
#undef STM32_SPI_USE_SPI1
#define STM32_SPI_USE_SPI1 TRUE
#endif
#ifdef WS2812_PWM
#undef STM32_PWM_USE_TIM3
#define STM32_PWM_USE_TIM3 TRUE
#endif
#ifdef AUDIO_DRIVER_PWM
#undef STM32_PWM_USE_TIM8
#define STM32_PWM_USE_TIM8 TRUE
#endif
#ifdef AUDIO_DRIVER_DAC
#undef STM32_DAC_USE_DAC1_CH1
#define STM32_DAC_USE_DAC1_CH1 TRUE
#undef STM32_DAC_USE_DAC1_CH2
@ -40,3 +51,4 @@
#undef STM32_GPT_USE_TIM6
#define STM32_GPT_USE_TIM6 TRUE
#endif