1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-25 12:57:53 +00:00
MarlinFirmware/buildroot/share/PlatformIO/variants/MEEB_3DP/variant.h

18 lines
736 B
C
Raw Normal View History

2020-06-12 01:17:22 +00:00
#pragma once
2020-06-01 23:25:13 +00:00
#define digitalPinToPort(P) ( PIN_MAP[P].gpio_device )
#define digitalPinToBitMask(P) ( BIT(PIN_MAP[P].gpio_bit) )
#define portOutputRegister(port) ( &(port->regs->ODR) )
#define portInputRegister(port) ( &(port->regs->IDR) )
2020-06-12 01:17:22 +00:00
#define portSetRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BSRR) )
#define portClearRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BRR) )
2020-06-01 23:25:13 +00:00
2020-06-12 01:17:22 +00:00
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
2020-06-01 23:25:13 +00:00
static const uint8_t SS = BOARD_SPI1_NSS_PIN;
static const uint8_t SS1 = BOARD_SPI2_NSS_PIN;
static const uint8_t MOSI = BOARD_SPI1_MOSI_PIN;
static const uint8_t MISO = BOARD_SPI1_MISO_PIN;
static const uint8_t SCK = BOARD_SPI1_SCK_PIN;