This program generates sound by using FM tone generator YMF825 via SPI.

Dependencies:   microbit

Committer:
hasebems
Date:
Fri Jan 05 22:58:49 2018 +0000
Revision:
0:c54d59d6fb78
???????????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hasebems 0:c54d59d6fb78 1 #ifndef FMSD1_H
hasebems 0:c54d59d6fb78 2 #define FMSD1_H
hasebems 0:c54d59d6fb78 3
hasebems 0:c54d59d6fb78 4 // public
hasebems 0:c54d59d6fb78 5 void initSPI( void );
hasebems 0:c54d59d6fb78 6 void initSD1( void );
hasebems 0:c54d59d6fb78 7 void delayMs( int ms );
hasebems 0:c54d59d6fb78 8 void writeSingle( unsigned char adrs, unsigned char data );
hasebems 0:c54d59d6fb78 9 void writeBurst( unsigned char adrs, unsigned char* data, int count );
hasebems 0:c54d59d6fb78 10
hasebems 0:c54d59d6fb78 11 static const unsigned char REG_TOP_ADRS = 12;
hasebems 0:c54d59d6fb78 12 static const unsigned char REG_VOL = 0;
hasebems 0:c54d59d6fb78 13 static const unsigned char REG_BLK = 1;
hasebems 0:c54d59d6fb78 14 static const unsigned char REG_FNUM = 2;
hasebems 0:c54d59d6fb78 15 static const unsigned char REG_CTRL = 3;
hasebems 0:c54d59d6fb78 16 static const unsigned char REG_CH_VOL = 4;
hasebems 0:c54d59d6fb78 17 static const unsigned char REG_XVB = 5;
hasebems 0:c54d59d6fb78 18 static const unsigned char REG_INT = 6;
hasebems 0:c54d59d6fb78 19 static const unsigned char REG_FRC = 7;
hasebems 0:c54d59d6fb78 20 static const unsigned char REG_MASTER_VOL = 25;
hasebems 0:c54d59d6fb78 21 #endif
hasebems 0:c54d59d6fb78 22