The Gertboard GPIO, SPI and PWM control procedures and macros packaged up into a library. The code is written by Gert, all I have done is package it up to hide implementation detail.