Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void station(int freq){
- char ack = 0;
- if ( ( ack = SI4735_Init() ) != 0 ){
- printf(\"Chyba (%d) inicializace obvodu SI4735\\n\", ack );
- return 0;
- }
- else
- printf( \"Obvod SI4735 inicializovan.\\n\" );
- I2C_Start();
- ack |= I2C_Vystup( SI4735_address | W );
- ack |= I2C_Vystup( 0x20 );
- ack |= I2C_Vystup( 0x00 );
- ack |= I2C_Vystup( freq >> 8 );
- ack |= I2C_Vystup( freq & 0xff );
- ack |= I2C_Vystup( 0x00 );
- I2C_Stop();
- if(ack!=0)
- printf(\"error\");
- else
- printf(\"OK.\\n\\n\");
- delay_ms( 100 );
- printf( \"...stanice naladena.\\n\\n\" );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement