firmware/platforms/arm/k20/fastspi_arm_k20.h
// Borrowed from the teensy3 SPSR emulation code
Borrowed from the teensy3 SPSR emulation code
Borrowed from the teensy3 SPSR emulation code
static inline void disable_pins(void) __attribute__((always_inline)) {
		if(_DATA_PIN == 11) {
			CORE_PIN11_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
			CORE_PIN12_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
			CORE_PIN13_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
		} else if(_DATA_PIN == 7) {
			CORE_PIN7_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
			CORE_PIN8_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
			CORE_PIN14_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX(1);
		}
}
static inline void disable_pins ( void ) __attribute__ ( ( always_inline ) ) { if ( _DATA_PIN == 11 ) { CORE_PIN11_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX ( 1 ) ; CORE_PIN12_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX ( 1 ) ; CORE_PIN13_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX ( 1 ) ; } else if ( _DATA_PIN == 7 ) { CORE_PIN7_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX ( 1 ) ; CORE_PIN8_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX ( 1 ) ; CORE_PIN14_CONFIG = PORT_PCR_SRE | PORT_PCR_DSE | PORT_PCR_MUX ( 1 ) ; } }
Borrowed from the teensy3 SPSR emulation code
Borrowed from the teensy3 SPSR emulation code
//serial_print("disable_pins\n");