Skip to content

Commit

Permalink
🎨 Misc. cleanup 29-01
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jan 30, 2024
1 parent 541bd26 commit 5639237
Show file tree
Hide file tree
Showing 131 changed files with 13 additions and 361 deletions.
2 changes: 1 addition & 1 deletion Marlin/Marlin.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Marlin Firmware
(c) 2011-2023 MarlinFirmware
(c) 2011-2024 MarlinFirmware
Portions of Marlin are (c) by their respective authors.
All code complies with GPLv2 and/or GPLv3
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/HAL/AVR/HAL_SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ void spiBegin() {
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
}


/** begin spi transaction */
void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode) {
// Based on Arduino SPI library
Expand Down Expand Up @@ -175,7 +174,6 @@ void spiBegin() {
SPSR = clockDiv | 0x01;
}


#else // SOFTWARE_SPI || FORCE_SOFT_SPI

// ------------------------
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/HAL/AVR/Servo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@

static volatile int8_t Channel[_Nbr_16timers]; // counter for the servo being pulsed for each timer (or -1 if refresh interval)


/************ static functions common to all instances ***********************/

static inline void handle_interrupts(const timer16_Sequence_t timer, volatile uint16_t* TCNTn, volatile uint16_t* OCRnA) {
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/HAL/AVR/endstop_interrupts.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ void endstop_ISR() { endstops.update(); }

#endif


// Install Pin change interrupt for a pin. Can be called multiple times.
void pciSetup(const int8_t pin) {
if (digitalPinHasPCICR(pin)) {
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,6 @@
#define PF7_PWM 0
#define PF7_DDR DDRF


/**
* Some of the pin mapping functions of the Teensduino extension to the Arduino IDE
* do not function the same as the other Arduino extensions.
Expand Down
3 changes: 0 additions & 3 deletions Marlin/src/HAL/AVR/pinsDebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ bool pwm_status(uint8_t pin) {
SERIAL_ECHO_SP(2);
} // pwm_status


const volatile uint8_t* const PWM_other[][3] PROGMEM = {
{ &TCCR0A, &TCCR0B, &TIMSK0 },
{ &TCCR1A, &TCCR1B, &TIMSK1 },
Expand All @@ -181,7 +180,6 @@ const volatile uint8_t* const PWM_other[][3] PROGMEM = {
#endif
};


const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {

#ifdef TIMER0A
Expand Down Expand Up @@ -217,7 +215,6 @@ const volatile uint8_t* const PWM_OCR[][3] PROGMEM = {
#endif
};


#define TCCR_A(T) pgm_read_word(&PWM_other[T][0])
#define TCCR_B(T) pgm_read_word(&PWM_other[T][1])
#define TIMSK(T) pgm_read_word(&PWM_other[T][2])
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/HAL/AVR/u8g_com_HAL_AVR_sw_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ void u8g_spiSend_sw_AVR_mode_3(uint8_t val) {
U8G_ATOMIC_END();
}


#if ENABLED(FYSETC_MINI_12864)
#define SPISEND_SW_AVR u8g_spiSend_sw_AVR_mode_3
#else
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/HAL/DUE/MarlinSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,6 @@ void MarlinSerial<Cfg>::flushTX() {
}
}


// If not using the USB port as serial port
#if defined(SERIAL_PORT) && SERIAL_PORT >= 0
template class MarlinSerial< MarlinSerialCfg<SERIAL_PORT> >;
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/HAL/DUE/fastio/G2_PWM.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ extern volatile uint32_t *SODR_A, *SODR_B, *CODR_A, *CODR_B;

#define PWM_MAP_INIT_ROW(IO,ZZ) { ZZ == 'A' ? SODR_A : SODR_B, ZZ == 'A' ? CODR_A : CODR_B, 1 << _PIN(IO) }


#define PWM_MAP_INIT { PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_X_PIN, 'B'), \
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Y_PIN, 'B'), \
PWM_MAP_INIT_ROW(MOTOR_CURRENT_PWM_Z_PIN, 'B'), \
Expand Down
1 change: 0 additions & 1 deletion Marlin/src/HAL/DUE/fastio/G2_pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ const G2_PinDescription G2_g_APinDescription[] = {
{ PIOB, PIO_PB21, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 52
{ PIOB, PIO_PB14, ID_PIOB, PIO_OUTPUT_0, PIO_DEFAULT, PIN_ATTR_DIGITAL, NO_ADC, NO_ADC, NOT_ON_PWM, NOT_ON_TIMER }, // PIN 53


// 54 .. 65 - Analog pins
// ----------------------
{ PIOA, PIO_PA16X1_AD7, ID_PIOA, PIO_INPUT, PIO_DEFAULT, PIN_ATTR_ANALOG, ADC0, ADC7, NOT_ON_PWM, NOT_ON_TIMER }, // AD0
Expand Down
11 changes: 0 additions & 11 deletions Marlin/src/HAL/DUE/usb/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@
*/
#define COMPILER_PACK_RESET() COMPILER_PRAGMA(pack())


/**
* \brief Set aligned boundary.
*/
Expand Down Expand Up @@ -283,15 +282,13 @@ typedef double F64; //!< 64-bit floating-point number.
typedef uint32_t iram_size_t;
//! @}


/*! \name Status Types
*/
//! @{
typedef bool Status_bool_t; //!< Boolean status.
typedef U8 Status_t; //!< 8-bit-coded status.
//! @}


/*! \name Aliasing Aggregate Types
*/
//! @{
Expand Down Expand Up @@ -462,7 +459,6 @@ typedef struct
#endif
//! @}


#ifndef __ASSEMBLY__ // not for assembling.

//! \name Optimization Control
Expand Down Expand Up @@ -581,7 +577,6 @@ typedef struct

//! @}


/*! \name Zero-Bit Counting
*
* Under GCC, __builtin_clz and __builtin_ctz behave like macros when
Expand Down Expand Up @@ -692,7 +687,6 @@ typedef struct

//! @}


/*! \name Bit Reversing
*/
//! @{
Expand Down Expand Up @@ -732,7 +726,6 @@ typedef struct

//! @}


/*! \name Alignment
*/
//! @{
Expand Down Expand Up @@ -798,7 +791,6 @@ typedef struct
*/
#define Long_call(addr) ((*(void (*)(void))(addr))())


/*! \name MCU Endianism Handling
* ARM is MCU little endianism.
*/
Expand Down Expand Up @@ -868,7 +860,6 @@ typedef struct
#define CPU_TO_BE32(x) swap32(x)
//! @}


/*! \name Endianism Conversion
*
* The same considerations as for clz and ctz apply here but GCC's
Expand Down Expand Up @@ -955,7 +946,6 @@ typedef struct

//! @}


/*! \name Target Abstraction
*/
//! @{
Expand Down Expand Up @@ -997,7 +987,6 @@ typedef U8 Byte; //!< 8-bit unsigned integer.

#endif // #ifndef __ASSEMBLY__


#ifdef __ICCARM__
#define SHORTENUM __packed
#elif defined(__GNUC__)
Expand Down
2 changes: 0 additions & 2 deletions Marlin/src/HAL/DUE/usb/conf_access.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
#define LUN_0_NAME "\"SD/MMC Card\""
//! @}


/*! \name Actions Associated with Memory Accesses
*
* Write here the action to associate with each memory access.
Expand Down Expand Up @@ -112,5 +111,4 @@
#define GLOBAL_WR_PROTECT false //!< Management of a global write protection.
//! @}


#endif // _CONF_ACCESS_H_
1 change: 0 additions & 1 deletion Marlin/src/HAL/DUE/usb/conf_clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,4 @@
// - UPLL frequency: 480MHz
// - USB clock: 480 / 1 = 480MHz


#endif /* CONF_CLOCK_H_INCLUDED */
4 changes: 0 additions & 4 deletions Marlin/src/HAL/DUE/usb/conf_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@
#endif
//@}


/**
* USB Device Callbacks definitions (Optional)
* @{
Expand Down Expand Up @@ -150,7 +149,6 @@

//@}


/**
* USB Interface Configuration
* @{
Expand Down Expand Up @@ -210,7 +208,6 @@
//@}
//@}


/**
* Configuration of MSC interface
* @{
Expand Down Expand Up @@ -245,7 +242,6 @@

//@}


/**
* Description of Composite Device
* @{
Expand Down
Loading

0 comments on commit 5639237

Please sign in to comment.