Provides a simple way to generate complex square wave signals on any available pin. In addition the SignalGenerator can generate a carrier wave which is useful when generating IR signals to control electronic devices like a TV etc. The signal generation can be carried out either synchronously or asynchronously. In the case of synchronous signal generation all interrupts can optionally be disabled to improve timing accuracy.
Diff: SignalGenerator.h
- Revision:
- 2:b2a449bd787f
- Parent:
- 1:4a1bcc41c473
- Child:
- 3:f30dcc6e8e70
--- a/SignalGenerator.h Fri Sep 12 04:13:43 2014 +0000 +++ b/SignalGenerator.h Fri Sep 12 05:20:08 2014 +0000 @@ -27,10 +27,12 @@ uint32_t timingBuffer[], uint16_t bufferCount, uint32_t lastStateHoldTime = 0, - int carrierFrequency = -1); + int32_t carrierFrequency = -1); private: DigitalOut _pin; + + private: + static int32_t _latency; }; - #endif //__SIGNALGENERATOR_H__ \ No newline at end of file