Tony YI
/
ESDC2014
123123123123123123123123123
Diff: buzzer.cpp
- Revision:
- 0:3417ca0a36c0
- Child:
- 1:cbec1283a16a
diff -r 000000000000 -r 3417ca0a36c0 buzzer.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buzzer.cpp Tue Jul 01 10:59:33 2014 +0000 @@ -0,0 +1,47 @@ +/****************************************************** + +****┏┓ ┏┓ +**┏┛┻━━━━━━┛┻┓ +**┃ ┃ +**┃ ━━━ ┃ +**┃ ┳┛ ┗┳ ┃ +**┃ ┃ +**┃ ''' ┻ ''' ┃ +**┃ ┃ +**┗━━┓ ┏━━┛ +*******┃ ┃ +*******┃ ┃ +*******┃ ┃ +*******┃ ┗━━━━━━━━┓ +*******┃ ┃━┓ +*******┃ NO BUG ┏━┛ +*******┃ ┃ +*******┗━┓ ┓ ┏━┏━┓ ━┛ +***********┃ ┛ ┛ ┃ ┛ ┛ +***********┃ ┃ ┃ ┃ ┃ ┃ +***********┗━┛━┛ ┗━┛━┛ + +This part is added by project ESDC2014 of CUHK team. +All the code with this header are under GPL open source license. +This program is running on Mbed Platform 'mbed LPC1768' avaliable in 'http://mbed.org'. +**********************************************************/ + +#include "buzzer.h" + +Buzzer::Buzzer(MyDigitalOut* buzzer) +{ + this->_buzzer = buzzer; + *_buzzer = 1; +} + +Buzzer::~Buzzer(){} + +void Buzzer::buzzerON() +{ + *_buzzer = 0; +} + +void Buzzer::buzzerOFF() +{ + *_buzzer = 1; +} \ No newline at end of file