mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-02-25 02:18:12 +00:00
Remove refs to non-existent CPU_32_BIT
This commit is contained in:
parent
8f5d99a2ab
commit
083bfa3fe9
2 changed files with 13 additions and 16 deletions
|
@ -63,41 +63,38 @@
|
||||||
|
|
||||||
static uint8_t LEDs[8] = { 0 };
|
static uint8_t LEDs[8] = { 0 };
|
||||||
|
|
||||||
#ifdef CPU_32_BIT
|
// Delay for 0.1875µs (16MHz AVR) or 0.15µs (20MHz AVR)
|
||||||
void MS_DELAY() { DELAY_1US; } // 32-bit processors need a delay to stabilize the signal
|
#define SIG_DELAY() DELAY_3_NOP
|
||||||
#else
|
|
||||||
#define MS_DELAY() DELAY_3_NOP
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void Max7219_PutByte(uint8_t data) {
|
void Max7219_PutByte(uint8_t data) {
|
||||||
CRITICAL_SECTION_START
|
CRITICAL_SECTION_START
|
||||||
for (uint8_t i = 8; i--;) {
|
for (uint8_t i = 8; i--;) {
|
||||||
MS_DELAY();
|
SIG_DELAY();
|
||||||
WRITE(MAX7219_CLK_PIN, LOW); // tick
|
WRITE(MAX7219_CLK_PIN, LOW); // tick
|
||||||
MS_DELAY();
|
SIG_DELAY();
|
||||||
WRITE(MAX7219_DIN_PIN, (data & 0x80) ? HIGH : LOW); // send 1 or 0 based on data bit
|
WRITE(MAX7219_DIN_PIN, (data & 0x80) ? HIGH : LOW); // send 1 or 0 based on data bit
|
||||||
MS_DELAY();
|
SIG_DELAY();
|
||||||
WRITE(MAX7219_CLK_PIN, HIGH); // tock
|
WRITE(MAX7219_CLK_PIN, HIGH); // tock
|
||||||
MS_DELAY();
|
SIG_DELAY();
|
||||||
data <<= 1;
|
data <<= 1;
|
||||||
}
|
}
|
||||||
CRITICAL_SECTION_END
|
CRITICAL_SECTION_END
|
||||||
}
|
}
|
||||||
|
|
||||||
void Max7219(const uint8_t reg, const uint8_t data) {
|
void Max7219(const uint8_t reg, const uint8_t data) {
|
||||||
MS_DELAY();
|
SIG_DELAY();
|
||||||
CRITICAL_SECTION_START
|
CRITICAL_SECTION_START
|
||||||
WRITE(MAX7219_LOAD_PIN, LOW); // begin
|
WRITE(MAX7219_LOAD_PIN, LOW); // begin
|
||||||
MS_DELAY();
|
SIG_DELAY();
|
||||||
Max7219_PutByte(reg); // specify register
|
Max7219_PutByte(reg); // specify register
|
||||||
MS_DELAY();
|
SIG_DELAY();
|
||||||
Max7219_PutByte(data); // put data
|
Max7219_PutByte(data); // put data
|
||||||
MS_DELAY();
|
SIG_DELAY();
|
||||||
WRITE(MAX7219_LOAD_PIN, LOW); // and tell the chip to load the data
|
WRITE(MAX7219_LOAD_PIN, LOW); // and tell the chip to load the data
|
||||||
MS_DELAY();
|
SIG_DELAY();
|
||||||
WRITE(MAX7219_LOAD_PIN, HIGH);
|
WRITE(MAX7219_LOAD_PIN, HIGH);
|
||||||
CRITICAL_SECTION_END
|
CRITICAL_SECTION_END
|
||||||
MS_DELAY();
|
SIG_DELAY();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Max7219_LED_Set(const uint8_t col, const uint8_t row, const bool on) {
|
void Max7219_LED_Set(const uint8_t col, const uint8_t row, const bool on) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ class PrintCounter: public Stopwatch {
|
||||||
private:
|
private:
|
||||||
typedef Stopwatch super;
|
typedef Stopwatch super;
|
||||||
|
|
||||||
#if ENABLED(I2C_EEPROM) || ENABLED(SPI_EEPROM) || defined(CPU_32_BIT)
|
#if ENABLED(I2C_EEPROM) || ENABLED(SPI_EEPROM)
|
||||||
typedef uint32_t promdress;
|
typedef uint32_t promdress;
|
||||||
#else
|
#else
|
||||||
typedef uint16_t promdress;
|
typedef uint16_t promdress;
|
||||||
|
|
Loading…
Reference in a new issue