Spidev example. You may find a very good inbuilt SPI driver for SSD1306.