Arduino Libraries/SparkFun_Micro_OLED_Arduino_Library/src/hardware.cpp
/** \brief Set Up SPI Interface

	Sets up the SPI pins, initializes the Arduino's SPI interface.
**/
\brief Set Up SPI Interface
Sets up the SPI pins, initializes the Arduino's SPI interface.
\ brief Set Up SPI Interface Sets up the SPI pins initializes the Arduino ' s SPI interface .
void MicroOLED::spiSetup()
{
	pinMode(MOSI, OUTPUT);	
	pinMode(SCK, OUTPUT);	
	pinMode(csPin, OUTPUT);	
	digitalWrite(csPin, HIGH);	
	SPI.setClockDivider(SPI_CLOCK_DIV2);	
	SPI.setDataMode(SPI_MODE0);	
	pinMode(10, OUTPUT); 
	SPI.begin();
}
void MicroOLED :: spiSetup ( ) { pinMode ( MOSI , OUTPUT ) ; pinMode ( SCK , OUTPUT ) ; pinMode ( csPin , OUTPUT ) ; digitalWrite ( csPin , HIGH ) ; SPI . setClockDivider ( SPI_CLOCK_DIV2 ) ; SPI . setDataMode ( SPI_MODE0 ) ; pinMode ( 10 , OUTPUT ) ; SPI . begin ( ) ; }
\brief Set Up SPI Interface
Sets up the SPI pins, initializes the Arduino's SPI interface.
\ brief Set Up SPI Interface Sets up the SPI pins initializes the Arduino ' s SPI interface .
// Initialize the pins: // MOSI is an OUTPUT // SCK is an OUTPUT // CS is an OUTPUT // Start CS High // Initialize the SPI library: // Fastest SPI clock possible // CPOL=0 and CPHA=0, SPI mode 0 // Required for setting into Master mode