This article describes my new SPI library for master MCU. It is based on library published in startup package. I made some changes. At the first, I removed all PIC MCU related lines of code, because of universality of library. Next, I encapsulated all global variables related to SPI state machine to one structure. There are published two versions of library – for AVR-GCC and GCC compiler for ARM version 4.9.3.