Browse Source

Fix lockup in SPI.setDataMode(SPI_MODE0)

teensy4-core
PaulStoffregen 10 years ago
parent
commit
d1b989b883
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      teensy3/avr_emulation.h

+ 1
- 0
teensy3/avr_emulation.h View File

@@ -930,6 +930,7 @@ public:
//serial_print("SPCR & ");
//serial_phex(val);
//serial_print("\n");
SIM_SCGC6 |= SIM_SCGC6_SPI0;
if ((val & (1<<DORD)) && (SPI0_CTAR0 & SPI_CTAR_LSBFE)) ret |= (1<<DORD);
if ((val & (1<<CPOL)) && (SPI0_CTAR0 & SPI_CTAR_CPOL)) ret |= (1<<CPOL);
if ((val & (1<<CPHA)) && (SPI0_CTAR0 & SPI_CTAR_CPHA)) ret |= (1<<CPHA);

Loading…
Cancel
Save