From 7ac7ca96e960e23ae88dcb3ec2ac3145ebad5a68 Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Tue, 27 Jul 2021 23:57:42 +0100 Subject: Remove some legacy files (#13715) --- keyboards/cannonkeys/bluepill/keyboard.c | 20 ----- keyboards/cannonkeys/bluepill/ws2812.c | 133 ------------------------------- keyboards/cannonkeys/ortho48/rules.mk | 4 - keyboards/cannonkeys/ortho60/rules.mk | 4 - keyboards/cannonkeys/ortho75/rules.mk | 4 - keyboards/cannonkeys/practice60/rules.mk | 4 - keyboards/cannonkeys/practice65/rules.mk | 4 - 7 files changed, 173 deletions(-) delete mode 100644 keyboards/cannonkeys/bluepill/keyboard.c delete mode 100644 keyboards/cannonkeys/bluepill/ws2812.c (limited to 'keyboards/cannonkeys') diff --git a/keyboards/cannonkeys/bluepill/keyboard.c b/keyboards/cannonkeys/bluepill/keyboard.c deleted file mode 100644 index 6a8edd4a93..0000000000 --- a/keyboards/cannonkeys/bluepill/keyboard.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include -#include "util.h" -#include "quantum.h" - -#ifdef BOARD_STM32_F103_STM32DUINO -#define LED_ON() do { palClearPad(GPIOC, 13) ;} while (0) -#define LED_OFF() do { palSetPad(GPIOC, 13); } while (0) -#define LED_TGL() do { palTogglePad(GPIOC, 13); } while (0) -#else -#define LED_ON() -#define LED_OFF() -#define LED_TGL() -#endif - -void matrix_init_kb(void){ - LED_ON(); - wait_ms(500); - LED_OFF(); -} diff --git a/keyboards/cannonkeys/bluepill/ws2812.c b/keyboards/cannonkeys/bluepill/ws2812.c deleted file mode 100644 index 779e905198..0000000000 --- a/keyboards/cannonkeys/bluepill/ws2812.c +++ /dev/null @@ -1,133 +0,0 @@ -/* - * LEDDriver.c - * - * Created on: Aug 26, 2013 - * Author: Omri Iluz - */ - -#include "ws2812.h" -#include - -#define BYTES_FOR_LED_BYTE 4 -#define NB_COLORS 3 -#define BYTES_FOR_LED BYTES_FOR_LED_BYTE*NB_COLORS -#define DATA_SIZE BYTES_FOR_LED*NB_LEDS -#define RESET_SIZE 200 -#define PREAMBLE_SIZE 4 -// Define the spi your LEDs are plugged to here -#define WS2812_SPI SPID2 -// Define the number of LEDs you wish to control in your LED strip -#define NB_LEDS RGBLED_NUM - - #define LED_SPIRAL 1 - - static uint8_t txbuf[PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE]; -static uint8_t get_protocol_eq(uint8_t data, int pos); - - /* - * This lib is meant to be used asynchronously, thus the colors contained in - * the txbuf will be sent in loop, so that the colors are always the ones you - * put in the table (the user thus have less to worry about) - * - * Since the data are sent via DMA, and the call to spiSend is a blocking one, - * the processor ressources are not used to much, if you see your program being - * too slow, simply add a: - * chThdSleepMilliseconds(x); - * after the spiSend, where you increment x untill you are satisfied with your - * program speed, another trick may be to lower this thread priority : your call - */ -static THD_WORKING_AREA(LEDS_THREAD_WA, 128); -static THD_FUNCTION(ledsThread, arg) { - (void) arg; - while(1){ - spiSend(&WS2812_SPI, PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE, txbuf); - } -} - - static const SPIConfig spicfg = { - false, - NULL, - PORT_WS2812, - PIN_WS2812, - SPI_CR1_BR_1|SPI_CR1_BR_0 // baudrate : fpclk / 8 => 1tick is 0.32us (2.25 MHz) -}; - - /* - * Function used to initialize the driver. - * - * Starts by shutting off all the LEDs. - * Then gets access on the LED_SPI driver. - * May eventually launch an animation on the LEDs (e.g. a thread setting the - * txbuff values) - */ -void leds_init(void){ - /* MOSI pin*/ - palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_STM32_ALTERNATE_PUSHPULL); - for(int i = 0; i < RESET_SIZE; i++) - txbuf[DATA_SIZE+i] = 0x00; - for (int i=0; i