#ifndef __SPI1_H__
#define __SPI1_H__

#ifdef CONFIG_SPI1_ENABLE

// номер spi для fram
#define SPI1_CS_SD_CARD         0
#define SPI1_CS_MUSIC_SHIELD    1

extern void spi1_init(void);
extern unsigned char spi1_exchange(unsigned char c);
extern void spi1_getSem();
extern void spi1_freeSem();
extern void spi1_unselectChip(unsigned char spi);
extern void spi1_selectChip(unsigned char spi);
extern void spi1_setSpeed(unsigned int speed_hz);

#endif

#endif //#ifndef __SPI1_H__