Tony YI
/
ESDC2014
123123123123123123123123123
buzzer.h
- Committer:
- TonyYI
- Date:
- 2014-07-03
- Revision:
- 3:4306d042af6f
- Parent:
- 2:442902ec3aa1
File content as of revision 3:4306d042af6f:
/****************************************************** ****┏┓ ┏┓ **┏┛┻━━━━━━┛┻┓ **┃ ┃ **┃ ━━━ ┃ **┃ ┳┛ ┗┳ ┃ **┃ ┃ **┃ ''' ┻ ''' ┃ **┃ ┃ **┗━━┓ ┏━━┛ *******┃ ┃ *******┃ ┃ *******┃ ┃ *******┃ ┗━━━━━━━━┓ *******┃ ┃━┓ *******┃ 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'. **********************************************************/ #ifndef _BUZZER_H #define _BUZZER_H #include "define.h" #include "mbed.h" #define TIME_OUT 5 //8 seconds class Buzzer { public: Buzzer(MyDigitalOut* buzzer); ~Buzzer(); void ON(); void OFF(); void setFlag(); void cleanFlag(); void check_time_out(); void time_out_init(); private: MyDigitalOut* _buzzer; uint8_t flag; Timeout time_out; }; #endif