Completely remove PIN macros

pull/41/head
Yuri D'Elia 2021-07-02 19:23:25 +02:00 committed by DRracer
parent 7c7aa95445
commit 067deb7e55
1 changed files with 9 additions and 11 deletions

View File

@ -2,16 +2,14 @@
#include "hal/gpio.h"
/// pin definitions
#define GPIO_PIN(port, pin) hal::gpio::GPIO_pin{port, pin}
static constexpr hal::gpio::GPIO_pin TMC2130_SPI_MISO_PIN = {GPIOB, 3};
static constexpr hal::gpio::GPIO_pin TMC2130_SPI_MOSI_PIN = {GPIOB, 2};
static constexpr hal::gpio::GPIO_pin TMC2130_SPI_SCK_PIN = {GPIOB, 1};
static constexpr hal::gpio::GPIO_pin TMC2130_SPI_SS_PIN = {GPIOB, 0};
#define TMC2130_SPI_MISO_PIN GPIO_PIN(GPIOB, 3)
#define TMC2130_SPI_MOSI_PIN GPIO_PIN(GPIOB, 2)
#define TMC2130_SPI_SCK_PIN GPIO_PIN(GPIOB, 1)
#define TMC2130_SPI_SS_PIN GPIO_PIN(GPIOB, 0)
static constexpr hal::gpio::GPIO_pin SHR16_DATA = {GPIOB, 5}; ///DS
static constexpr hal::gpio::GPIO_pin SHR16_LATCH = {GPIOB, 6}; ///STCP
static constexpr hal::gpio::GPIO_pin SHR16_CLOCK = {GPIOC, 7}; ///SHCP
#define SHR16_DATA GPIO_PIN(GPIOB, 5) ///DS
#define SHR16_LATCH GPIO_PIN(GPIOB, 6) ///STCP
#define SHR16_CLOCK GPIO_PIN(GPIOC, 7) ///SHCP
#define USART_RX GPIO_PIN(GPIOD, 2)
#define USART_TX GPIO_PIN(GPIOD, 3)
static constexpr hal::gpio::GPIO_pin USART_RX = {GPIOD, 2};
static constexpr hal::gpio::GPIO_pin USART_TX = {GPIOD, 3};