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.
LedBlinker/LedBlinker.h
- Committer:
- bwang
- Date:
- 2018-11-13
- Revision:
- 252:38644631ed97
- Parent:
- 223:b986e7cee521
File content as of revision 252:38644631ed97:
#ifndef __LEDBLINKER_H #define __LEDBLINKER_H #include "mbed.h" class LedBlinker { public: LedBlinker(PinName p, float sample_frequency, float code_frequency); public: void set_code(uint8_t code); void update(); private: uint8_t _code; uint32_t _tics_per_code, _tics_per_bit; uint32_t _counter; uint8_t _bit; DigitalOut *_led; }; #endif