SPSR &= ~(1 << SPI2X);\r
}\r
\r
+ /** Turns off the SPI driver, disabling and returning used hardware to their default configuration. */\r
+ static inline void SPI_ShutDown(void)\r
+ {\r
+ DDRB &= ~((1 << 1) | (1 << 2));\r
+ PORTB &= ~((1 << 0) | (1 << 3));\r
+ \r
+ SPCR = 0;\r
+ SPSR = 0;\r
+ }\r
+ \r
/** Sends and receives a byte through the SPI interface, blocking until the transfer is complete.\r
*\r
* \param[in] Byte Byte to send through the SPI interface\r