Cleanup trailing whitespace
@Bob-the-Kuhn — Please set your git options to remove trailing whitespace on commit.
This commit is contained in:
parent
d0ac0151b6
commit
dd19e74476
3 changed files with 18 additions and 20 deletions
|
@ -532,7 +532,7 @@
|
||||||
(void) spiTransferTx(token);
|
(void) spiTransferTx(token);
|
||||||
spiTxBlock(buf,512);
|
spiTxBlock(buf,512);
|
||||||
WRITE(SS_PIN, HIGH);
|
WRITE(SS_PIN, HIGH);
|
||||||
|
|
||||||
#else // let calling routine control SDSS
|
#else // let calling routine control SDSS
|
||||||
void spiBegin() {
|
void spiBegin() {
|
||||||
SET_OUTPUT(SS_PIN);
|
SET_OUTPUT(SS_PIN);
|
||||||
|
@ -564,7 +564,7 @@
|
||||||
spiTxBlock(buf,512);
|
spiTxBlock(buf,512);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -602,7 +602,7 @@
|
||||||
|
|
||||||
#if MB(ALLIGATOR)
|
#if MB(ALLIGATOR)
|
||||||
WRITE(SS_PIN, HIGH);
|
WRITE(SS_PIN, HIGH);
|
||||||
#endif
|
#endif
|
||||||
WRITE(MOSI_PIN, HIGH);
|
WRITE(MOSI_PIN, HIGH);
|
||||||
WRITE(SCK_PIN, LOW);
|
WRITE(SCK_PIN, LOW);
|
||||||
}
|
}
|
||||||
|
@ -616,11 +616,11 @@
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#if MB(ALLIGATOR)
|
#if MB(ALLIGATOR)
|
||||||
|
|
||||||
// slave selects controlled by SPI controller
|
// slave selects controlled by SPI controller
|
||||||
// doesn't support changing SPI speeds for SD card
|
// doesn't support changing SPI speeds for SD card
|
||||||
|
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
// hardware SPI
|
// hardware SPI
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
@ -666,15 +666,15 @@
|
||||||
WRITE(SPI_FLASH_CS, HIGH );
|
WRITE(SPI_FLASH_CS, HIGH );
|
||||||
WRITE(SS_PIN, HIGH );
|
WRITE(SS_PIN, HIGH );
|
||||||
#endif // MB(ALLIGATOR)
|
#endif // MB(ALLIGATOR)
|
||||||
|
|
||||||
OUT_WRITE(SDSS,0);
|
OUT_WRITE(SDSS,0);
|
||||||
|
|
||||||
PIO_Configure(
|
PIO_Configure(
|
||||||
g_APinDescription[SPI_PIN].pPort,
|
g_APinDescription[SPI_PIN].pPort,
|
||||||
g_APinDescription[SPI_PIN].ulPinType,
|
g_APinDescription[SPI_PIN].ulPinType,
|
||||||
g_APinDescription[SPI_PIN].ulPin,
|
g_APinDescription[SPI_PIN].ulPin,
|
||||||
g_APinDescription[SPI_PIN].ulPinConfiguration);
|
g_APinDescription[SPI_PIN].ulPinConfiguration);
|
||||||
|
|
||||||
spiInit(1);
|
spiInit(1);
|
||||||
spiInitMaded = true;
|
spiInitMaded = true;
|
||||||
}
|
}
|
||||||
|
@ -824,7 +824,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
#else // U8G compatible hardware SPI
|
#else // U8G compatible hardware SPI
|
||||||
|
|
||||||
void spiInit(uint8_t spiRate = 6 ) { // default to slowest rate if not specified)
|
void spiInit(uint8_t spiRate = 6 ) { // default to slowest rate if not specified)
|
||||||
// 8.4 MHz, 4 MHz, 2 MHz, 1 MHz, 0.5 MHz, 0.329 MHz, 0.329 MHz
|
// 8.4 MHz, 4 MHz, 2 MHz, 1 MHz, 0.5 MHz, 0.329 MHz, 0.329 MHz
|
||||||
int spiDueDividors[] = { 10, 21, 42, 84, 168, 255, 255 };
|
int spiDueDividors[] = { 10, 21, 42, 84, 168, 255, 255 };
|
||||||
|
@ -849,7 +849,7 @@
|
||||||
|
|
||||||
/* SPI mode 0, 8 Bit data transfer, baud rate */
|
/* SPI mode 0, 8 Bit data transfer, baud rate */
|
||||||
SPI0->SPI_CSR[0] = SPI_CSR_SCBR(spiDueDividors[spiRate]) | 1;
|
SPI0->SPI_CSR[0] = SPI_CSR_SCBR(spiDueDividors[spiRate]) | 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint8_t spiTransfer(uint8_t data) {
|
static uint8_t spiTransfer(uint8_t data) {
|
||||||
|
|
||||||
|
@ -897,8 +897,8 @@
|
||||||
spiTransfer(token);
|
spiTransfer(token);
|
||||||
for (uint16_t i = 0; i < 512; i++)
|
for (uint16_t i = 0; i < 512; i++)
|
||||||
spiTransfer(buf[i]);
|
spiTransfer(buf[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif //MB(ALLIGATOR)
|
#endif //MB(ALLIGATOR)
|
||||||
#endif // ENABLED(SOFTWARE_SPI)
|
#endif // ENABLED(SOFTWARE_SPI)
|
||||||
|
|
||||||
|
|
|
@ -156,7 +156,7 @@
|
||||||
#define BTN_ENC 37
|
#define BTN_ENC 37
|
||||||
|
|
||||||
#define BEEPER_PIN -1
|
#define BEEPER_PIN -1
|
||||||
|
|
||||||
#elif ENABLED(MINIPANEL)
|
#elif ENABLED(MINIPANEL)
|
||||||
#define BTN_EN1 52
|
#define BTN_EN1 52
|
||||||
#define BTN_EN2 50
|
#define BTN_EN2 50
|
||||||
|
@ -166,6 +166,6 @@
|
||||||
#define BEEPER_PIN 41
|
#define BEEPER_PIN 41
|
||||||
#define DOGLCD_A0 46
|
#define DOGLCD_A0 46
|
||||||
#define DOGLCD_CS 45
|
#define DOGLCD_CS 45
|
||||||
|
|
||||||
#endif // SPARK_FULL_GRAPHICS
|
#endif // SPARK_FULL_GRAPHICS
|
||||||
#endif // ULTRA_LCD
|
#endif // ULTRA_LCD
|
||||||
|
|
|
@ -141,15 +141,13 @@
|
||||||
//
|
//
|
||||||
#if ENABLED(ULTRA_LCD)
|
#if ENABLED(ULTRA_LCD)
|
||||||
// ramps-fd lcd adaptor
|
// ramps-fd lcd adaptor
|
||||||
|
|
||||||
|
|
||||||
#define BEEPER_PIN 37
|
#define BEEPER_PIN 37
|
||||||
#define BTN_EN1 33
|
#define BTN_EN1 33
|
||||||
#define BTN_EN2 31
|
#define BTN_EN2 31
|
||||||
#define BTN_ENC 35
|
#define BTN_ENC 35
|
||||||
#define SD_DETECT_PIN 49
|
#define SD_DETECT_PIN 49
|
||||||
|
|
||||||
|
|
||||||
#if ENABLED(NEWPANEL)
|
#if ENABLED(NEWPANEL)
|
||||||
#define LCD_PINS_RS 16
|
#define LCD_PINS_RS 16
|
||||||
#define LCD_PINS_ENABLE 17
|
#define LCD_PINS_ENABLE 17
|
||||||
|
@ -158,11 +156,11 @@
|
||||||
#define LCD_PINS_D6 27
|
#define LCD_PINS_D6 27
|
||||||
#define LCD_PINS_D7 29
|
#define LCD_PINS_D7 29
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(MINIPANEL)
|
#if ENABLED(MINIPANEL)
|
||||||
#define DOGLCD_CS 25
|
#define DOGLCD_CS 25
|
||||||
#define DOGLCD_A0 27
|
#define DOGLCD_A0 27
|
||||||
#endif
|
#endif
|
||||||
#endif // ULTRA_LCD
|
#endif // ULTRA_LCD
|
||||||
|
|
||||||
#if ENABLED(HAVE_TMC2208)
|
#if ENABLED(HAVE_TMC2208)
|
||||||
|
|
Reference in a new issue