From 1b1f3ec68ee1e7abe436a46bcfedf30f21330aef Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Fri, 22 Oct 2021 00:49:38 +0100 Subject: Split out arm_atsam shift register logic (#14848) --- keyboards/massdrop/alt/config.h | 18 +++++++----------- keyboards/massdrop/ctrl/config.h | 18 +++++++----------- 2 files changed, 14 insertions(+), 22 deletions(-) (limited to 'keyboards/massdrop') diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index d28094c492..085e1aebba 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h @@ -50,22 +50,18 @@ along with this program. If not, see . /* This Shift Register expands available hardware output lines to control additional peripherals */ /* It uses four lines from the MCU to provide 16 output lines */ /* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */ -#define SR_EXP_RCLK_PORT PB -#define SR_EXP_RCLK_PIN 14 +#define SR_EXP_RCLK_PIN B14 /* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */ -#define SR_EXP_OE_N_PORT PB -#define SR_EXP_OE_N_PIN 15 +#define SR_EXP_OE_PIN B15 /* SERCOM port to use for Shift Register SPI */ /* DATAOUT and SCLK must be configured to use hardware pins of this port */ -#define SR_EXP_SERCOM SERCOM2 +#define SPI_SERCOM SERCOM2 /* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */ -#define SR_EXP_DATAOUT_PORT PA -#define SR_EXP_DATAOUT_PIN 12 -#define SR_EXP_DATAOUT_MUX 2 +#define SPI_DATAOUT_PIN A12 +#define SPI_DATAOUT_MUX 2 /* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */ -#define SR_EXP_SCLK_PORT PA -#define SR_EXP_SCLK_PIN 13 -#define SR_EXP_SCLK_MUX 2 +#define SPI_SCLK_PIN A13 +#define SPI_SCLK_MUX 2 /* Debug LED (Small LED Located near MCU) */ #define DEBUG_LED_ENABLE 1 diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h index 3dbd9b8877..aefb900448 100644 --- a/keyboards/massdrop/ctrl/config.h +++ b/keyboards/massdrop/ctrl/config.h @@ -49,22 +49,18 @@ along with this program. If not, see . /* This Shift Register expands available hardware output lines to control additional peripherals */ /* It uses four lines from the MCU to provide 16 output lines */ /* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */ -#define SR_EXP_RCLK_PORT PB -#define SR_EXP_RCLK_PIN 14 +#define SR_EXP_RCLK_PIN B14 /* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */ -#define SR_EXP_OE_N_PORT PB -#define SR_EXP_OE_N_PIN 15 +#define SR_EXP_OE_PIN B15 /* SERCOM port to use for Shift Register SPI */ /* DATAOUT and SCLK must be configured to use hardware pins of this port */ -#define SR_EXP_SERCOM SERCOM2 +#define SPI_SERCOM SERCOM2 /* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */ -#define SR_EXP_DATAOUT_PORT PA -#define SR_EXP_DATAOUT_PIN 12 -#define SR_EXP_DATAOUT_MUX 2 +#define SPI_DATAOUT_PIN A12 +#define SPI_DATAOUT_MUX 2 /* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */ -#define SR_EXP_SCLK_PORT PA -#define SR_EXP_SCLK_PIN 13 -#define SR_EXP_SCLK_MUX 2 +#define SPI_SCLK_PIN A13 +#define SPI_SCLK_MUX 2 /* Debug LED (Small LED Located near MCU) */ #define DEBUG_LED_ENABLE 1 -- cgit v1.2.3