mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-12-21 01:37:24 +00:00
ee016e605c
* Consolidate variant scripts * Rename Marlin-local boards * Simplify variants where possible * Rename variants * CHITU_F103 and MEEB_3DP: Maple platform `platformio-build-stm32f1.py` uses the 'board' name, not 'board_build.variant' so folder names match 'board' and not `board_build.variant`.
18 lines
736 B
C
18 lines
736 B
C
#pragma once
|
|
|
|
#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) )
|
|
|
|
#define portSetRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BSRR) )
|
|
#define portClearRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->BRR) )
|
|
|
|
#define portConfigRegister(pin) ( &(PIN_MAP[pin].gpio_device->regs->CRL) )
|
|
|
|
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;
|