🧑💻 Remove extraneous 'inline' hints
This commit is contained in:
committed by
Scott Lahteine
parent
ccc66a8528
commit
5b9f3bd4b1
@@ -217,7 +217,7 @@
|
||||
#endif
|
||||
|
||||
enum { HasEmergencyParser = Cfg::EMERGENCYPARSER };
|
||||
static inline bool emergency_parser_enabled() { return Cfg::EMERGENCYPARSER; }
|
||||
static bool emergency_parser_enabled() { return Cfg::EMERGENCYPARSER; }
|
||||
|
||||
FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
|
||||
FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }
|
||||
|
@@ -118,7 +118,7 @@ public:
|
||||
static size_t write(const uint8_t c);
|
||||
static void flushTX();
|
||||
|
||||
static inline bool emergency_parser_enabled() { return Cfg::EMERGENCYPARSER; }
|
||||
static bool emergency_parser_enabled() { return Cfg::EMERGENCYPARSER; }
|
||||
|
||||
FORCE_INLINE static uint8_t dropped() { return Cfg::DROPPED_RX ? rx_dropped_bytes : 0; }
|
||||
FORCE_INLINE static uint8_t buffer_overruns() { return Cfg::RX_OVERRUNS ? rx_buffer_overruns : 0; }
|
||||
|
@@ -77,7 +77,7 @@ public:
|
||||
|
||||
//uint32_t spiRate() const { return spi_speed; }
|
||||
|
||||
static inline uint32_t spiRate2Clock(uint32_t spiRate) {
|
||||
static uint32_t spiRate2Clock(uint32_t spiRate) {
|
||||
uint32_t Marlin_speed[7]; // CPSR is always 2
|
||||
Marlin_speed[0] = 8333333; //(SCR: 2) desired: 8,000,000 actual: 8,333,333 +4.2% SPI_FULL_SPEED
|
||||
Marlin_speed[1] = 4166667; //(SCR: 5) desired: 4,000,000 actual: 4,166,667 +4.2% SPI_HALF_SPEED
|
||||
|
@@ -65,8 +65,8 @@ private:
|
||||
static uint16_t getRawData(const XPTCoordinate coordinate);
|
||||
static bool isTouched();
|
||||
|
||||
static inline void DataTransferBegin() { WRITE(TOUCH_CS_PIN, LOW); };
|
||||
static inline void DataTransferEnd() { WRITE(TOUCH_CS_PIN, HIGH); };
|
||||
static void DataTransferBegin() { WRITE(TOUCH_CS_PIN, LOW); };
|
||||
static void DataTransferEnd() { WRITE(TOUCH_CS_PIN, HIGH); };
|
||||
#if ENABLED(TOUCH_BUTTONS_HW_SPI)
|
||||
static uint16_t HardwareIO(uint16_t data);
|
||||
#endif
|
||||
|
@@ -62,8 +62,8 @@ private:
|
||||
static uint16_t getRawData(const XPTCoordinate coordinate);
|
||||
static bool isTouched();
|
||||
|
||||
static inline void DataTransferBegin();
|
||||
static inline void DataTransferEnd();
|
||||
static void DataTransferBegin();
|
||||
static void DataTransferEnd();
|
||||
#if ENABLED(TOUCH_BUTTONS_HW_SPI)
|
||||
static uint16_t HardwareIO(uint16_t data);
|
||||
#endif
|
||||
|
@@ -69,8 +69,8 @@ private:
|
||||
static uint16_t getRawData(const XPTCoordinate coordinate);
|
||||
static bool isTouched();
|
||||
|
||||
static inline void DataTransferBegin() { if (SPIx.Instance) { HAL_SPI_Init(&SPIx); } WRITE(TOUCH_CS_PIN, LOW); };
|
||||
static inline void DataTransferEnd() { WRITE(TOUCH_CS_PIN, HIGH); };
|
||||
static void DataTransferBegin() { if (SPIx.Instance) { HAL_SPI_Init(&SPIx); } WRITE(TOUCH_CS_PIN, LOW); };
|
||||
static void DataTransferEnd() { WRITE(TOUCH_CS_PIN, HIGH); };
|
||||
static uint16_t HardwareIO(uint16_t data);
|
||||
static uint16_t SoftwareIO(uint16_t data);
|
||||
static uint16_t IO(uint16_t data = 0) { return SPIx.Instance ? HardwareIO(data) : SoftwareIO(data); }
|
||||
|
@@ -417,7 +417,7 @@ private:
|
||||
/**
|
||||
* @brief Wait until TXE (tx empty) flag is set and BSY (busy) flag unset.
|
||||
*/
|
||||
static inline void waitSpiTxEnd(spi_dev *spi_d) {
|
||||
static void waitSpiTxEnd(spi_dev *spi_d) {
|
||||
while (spi_is_tx_empty(spi_d) == 0) { /* nada */ } // wait until TXE=1
|
||||
while (spi_is_busy(spi_d) != 0) { /* nada */ } // wait until BSY=0
|
||||
}
|
||||
|
@@ -54,11 +54,11 @@ extern const stm32_pin_info PIN_MAP[BOARD_NR_GPIO_PINS];
|
||||
#define M43_NEVER_TOUCH(Q) (Q >= 9 && Q <= 12) // SERIAL/USB pins PA9(TX) PA10(RX)
|
||||
#endif
|
||||
|
||||
static inline int8_t get_pin_mode(pin_t pin) {
|
||||
static int8_t get_pin_mode(pin_t pin) {
|
||||
return VALID_PIN(pin) ? _GET_MODE(pin) : -1;
|
||||
}
|
||||
|
||||
static inline pin_t DIGITAL_PIN_TO_ANALOG_PIN(pin_t pin) {
|
||||
static pin_t DIGITAL_PIN_TO_ANALOG_PIN(pin_t pin) {
|
||||
if (!VALID_PIN(pin)) return -1;
|
||||
int8_t adc_channel = int8_t(PIN_MAP[pin].adc_channel);
|
||||
#ifdef NUM_ANALOG_INPUTS
|
||||
@@ -67,7 +67,7 @@ static inline pin_t DIGITAL_PIN_TO_ANALOG_PIN(pin_t pin) {
|
||||
return pin_t(adc_channel);
|
||||
}
|
||||
|
||||
static inline bool IS_ANALOG(pin_t pin) {
|
||||
static bool IS_ANALOG(pin_t pin) {
|
||||
if (!VALID_PIN(pin)) return false;
|
||||
if (PIN_MAP[pin].adc_channel != ADCx) {
|
||||
#ifdef NUM_ANALOG_INPUTS
|
||||
@@ -78,11 +78,11 @@ static inline bool IS_ANALOG(pin_t pin) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool GET_PINMODE(const pin_t pin) {
|
||||
static bool GET_PINMODE(const pin_t pin) {
|
||||
return VALID_PIN(pin) && !IS_INPUT(pin);
|
||||
}
|
||||
|
||||
static inline bool GET_ARRAY_IS_DIGITAL(const int16_t array_pin) {
|
||||
static bool GET_ARRAY_IS_DIGITAL(const int16_t array_pin) {
|
||||
const pin_t pin = GET_ARRAY_PIN(array_pin);
|
||||
return (!IS_ANALOG(pin)
|
||||
#ifdef NUM_ANALOG_INPUTS
|
||||
@@ -93,7 +93,7 @@ static inline bool GET_ARRAY_IS_DIGITAL(const int16_t array_pin) {
|
||||
|
||||
#include "../../inc/MarlinConfig.h" // Allow pins/pins.h to set density
|
||||
|
||||
static inline void pwm_details(const pin_t pin) {
|
||||
static void pwm_details(const pin_t pin) {
|
||||
if (PWM_PIN(pin)) {
|
||||
timer_dev * const tdev = PIN_MAP[pin].timer_device;
|
||||
const uint8_t channel = PIN_MAP[pin].timer_channel;
|
||||
@@ -113,7 +113,7 @@ static inline void pwm_details(const pin_t pin) {
|
||||
}
|
||||
}
|
||||
|
||||
static inline void print_port(pin_t pin) {
|
||||
static void print_port(pin_t pin) {
|
||||
const char port = 'A' + char(pin >> 4); // pin div 16
|
||||
const int16_t gbit = PIN_MAP[pin].gpio_bit;
|
||||
char buffer[8];
|
||||
|
@@ -65,8 +65,8 @@ private:
|
||||
static uint16_t getRawData(const XPTCoordinate coordinate);
|
||||
static bool isTouched();
|
||||
|
||||
static inline void DataTransferBegin() { WRITE(TOUCH_CS_PIN, LOW); };
|
||||
static inline void DataTransferEnd() { WRITE(TOUCH_CS_PIN, HIGH); };
|
||||
static void DataTransferBegin() { WRITE(TOUCH_CS_PIN, LOW); };
|
||||
static void DataTransferEnd() { WRITE(TOUCH_CS_PIN, HIGH); };
|
||||
#if ENABLED(TOUCH_BUTTONS_HW_SPI)
|
||||
static uint16_t HardwareIO(uint16_t data);
|
||||
#endif
|
||||
|
@@ -49,7 +49,7 @@ public:
|
||||
|
||||
// Write one or more bytes of data
|
||||
// Return 'true' on write error
|
||||
static inline bool write_data(const int pos, const uint8_t *value, const size_t size=sizeof(uint8_t)) {
|
||||
static bool write_data(const int pos, const uint8_t *value, const size_t size=sizeof(uint8_t)) {
|
||||
int data_pos = pos;
|
||||
uint16_t crc = 0;
|
||||
return write_data(data_pos, value, size, &crc);
|
||||
@@ -57,11 +57,11 @@ public:
|
||||
|
||||
// Write a single byte of data
|
||||
// Return 'true' on write error
|
||||
static inline bool write_data(const int pos, const uint8_t value) { return write_data(pos, &value); }
|
||||
static bool write_data(const int pos, const uint8_t value) { return write_data(pos, &value); }
|
||||
|
||||
// Read one or more bytes of data
|
||||
// Return 'true' on read error
|
||||
static inline bool read_data(const int pos, uint8_t *value, const size_t size=1) {
|
||||
static bool read_data(const int pos, uint8_t *value, const size_t size=1) {
|
||||
int data_pos = pos;
|
||||
uint16_t crc = 0;
|
||||
return read_data(data_pos, value, size, &crc);
|
||||
|
Reference in New Issue
Block a user