Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of RTC8564NB_Clock by
bip.h
00001 #ifndef BIP_H 00002 #define BIP_H 00003 #include "mbed.h" 00004 /* Ez egy 0.1 s hosszú 1 kHz jel alapból, meghívása: Bip(int freq, int time) 00005 // freki = 1 kHz * freq 00006 // idő = 0.1 s * time 00007 // Flehsználja: PTD7 lábat 00008 */ 00009 DigitalOut bip(PTD7); 00010 Ticker timer; 00011 int v=0; 00012 00013 void attime(){v=1;} 00014 00015 void Bip(int freq, int time){ 00016 v=0; 00017 timer.attach(&attime, 0.1*time); 00018 while(1){ 00019 bip = !bip; 00020 wait(0.001/freq); 00021 if(v>0){bip = 0; return;} 00022 } 00023 } 00024 00025 #endif
Generated on Mon Jul 18 2022 01:34:26 by
1.7.2
