Jon Hazan / PulseLibrary
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Pulse.h Source File

Pulse.h

00001 #ifndef MBED_PULSE_H
00002 #define MBED_PULSE_H
00003 
00004 #include "mbed.h"
00005 
00006 class Pulse {
00007 public:
00008     Pulse(PinName pin);
00009 
00010     void send_pulse(int* sequence);
00011     void set_osc(int hz);
00012     void set_pin(PinName pin);
00013     
00014 private:
00015     DigitalOut output_pin;
00016     int oscilation;
00017     bool switch_state;
00018     Ticker flipper;
00019         
00020     void flip_pin();
00021     void change_state();
00022 };
00023 
00024 
00025 #endif