U8glib: Graphics Lib for LCDs and OLEDs

You can use this file as a template:
https://code.google.com/p/u8glib/source/browse/csrc/u8g_com_arduino_std_sw_spi.c

Oliver