mbed Phone Platform
Dependencies: ulaw mbed ConfigFile
Line.h
- Committer:
- okini3939
- Date:
- 2011-01-21
- Revision:
- 6:bd62b12de751
- Parent:
- 4:41a3534d085f
File content as of revision 6:bd62b12de751:
#include "phone.h" #include "mbed.h" #include "RingBuffer.h" /** * @brief Line class */ class Line { public: Line (PinName p_line, PinName p_xline, PinName p_hook, AnalogOut p_dac); void intr (); void poll (); int enter (enum Mode); int scan (enum Scan); private: volatile enum Mode mode; volatile enum Status status; volatile int dialtimer, dialcount, hooktimer, tonecount, hooktimer2; volatile int hook_last; DigitalOut line, xline; DigitalIn hook; AnalogOut dac; RingBuffer dial; void power (int); void ring (); void tone (enum Tone); };