changed SPIFunc to enum