Remove refs to non-existent CPU_32_BIT

This commit is contained in:
Scott Lahteine 2018-04-26 18:15:53 -05:00
parent 8f5d99a2ab
commit 083bfa3fe9
2 changed files with 13 additions and 16 deletions

View File

@ -63,41 +63,38 @@
static uint8_t LEDs[8] = { 0 };
#ifdef CPU_32_BIT
void MS_DELAY() { DELAY_1US; } // 32-bit processors need a delay to stabilize the signal
#else
#define MS_DELAY() DELAY_3_NOP
#endif
// Delay for 0.1875µs (16MHz AVR) or 0.15µs (20MHz AVR)
#define SIG_DELAY() DELAY_3_NOP
void Max7219_PutByte(uint8_t data) {
CRITICAL_SECTION_START
for (uint8_t i = 8; i--;) {
MS_DELAY();
SIG_DELAY();
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
MS_DELAY();
SIG_DELAY();
WRITE(MAX7219_CLK_PIN, HIGH); // tock
MS_DELAY();
SIG_DELAY();
data <<= 1;
}
CRITICAL_SECTION_END
}
void Max7219(const uint8_t reg, const uint8_t data) {
MS_DELAY();
SIG_DELAY();
CRITICAL_SECTION_START
WRITE(MAX7219_LOAD_PIN, LOW); // begin
MS_DELAY();
SIG_DELAY();
Max7219_PutByte(reg); // specify register
MS_DELAY();
SIG_DELAY();
Max7219_PutByte(data); // put data
MS_DELAY();
SIG_DELAY();
WRITE(MAX7219_LOAD_PIN, LOW); // and tell the chip to load the data
MS_DELAY();
SIG_DELAY();
WRITE(MAX7219_LOAD_PIN, HIGH);
CRITICAL_SECTION_END
MS_DELAY();
SIG_DELAY();
}
void Max7219_LED_Set(const uint8_t col, const uint8_t row, const bool on) {

View File

@ -44,7 +44,7 @@ class PrintCounter: public Stopwatch {
private:
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;
#else
typedef uint16_t promdress;