mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-08-08 22:34:59 -06:00
Clean up envs / variants
This commit is contained in:
parent
85e48bbb0d
commit
ea20c77df9
4 changed files with 163 additions and 118 deletions
|
@ -1,20 +1,17 @@
|
|||
#ifndef _VARIANT_ARDUINO_STM32_
|
||||
#define _VARIANT_ARDUINO_STM32_
|
||||
#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 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) )
|
||||
#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;
|
||||
|
||||
#endif /* _VARIANT_ARDUINO_STM32_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue