FRMD KL25Z <=i2c=> NXP PCF8563 (RTC) FRMD KL25Z SPI=> MCP23S17 => (GLCD) T6963C FRMD KL25Z Tsi => 3 button : <--> <enter> <++> FRMD KL25Z => Bip()
Fork of RTC8564NB_Clock by
bip.h
- Committer:
- szjenter
- Date:
- 2014-05-14
- Revision:
- 2:c271f83a69e4
File content as of revision 2:c271f83a69e4:
#ifndef BIP_H #define BIP_H #include "mbed.h" /* Ez egy 0.1 s hosszú 1 kHz jel alapból, meghívása: Bip(int freq, int time) // freki = 1 kHz * freq // idő = 0.1 s * time // Flehsználja: PTD7 lábat */ DigitalOut bip(PTD7); Ticker timer; int v=0; void attime(){v=1;} void Bip(int freq, int time){ v=0; timer.attach(&attime, 0.1*time); while(1){ bip = !bip; wait(0.001/freq); if(v>0){bip = 0; return;} } } #endif