Suga koubou / Mbed 2 deprecated PhonePlatform

Dependencies:   ulaw mbed ConfigFile

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Line.h Source File

Line.h

00001 #include "phone.h"
00002 #include "mbed.h"
00003 #include "RingBuffer.h"
00004 
00005 /**
00006  * @brief Line class
00007  */
00008 class Line {
00009 public:
00010     Line (PinName p_line, PinName p_xline, PinName p_hook, AnalogOut p_dac);
00011 
00012     void intr ();
00013     void poll ();
00014     int enter (enum Mode);
00015     int scan (enum Scan);
00016 
00017 private:
00018     volatile enum Mode mode;
00019     volatile enum Status status;
00020     volatile int dialtimer, dialcount, hooktimer, tonecount, hooktimer2;
00021     volatile int hook_last;
00022     DigitalOut line, xline;
00023     DigitalIn hook;
00024     AnalogOut dac;
00025     RingBuffer dial;
00026 
00027     void power (int);
00028     void ring ();
00029     void tone (enum Tone);
00030 };