mbed Phone Platform

Dependencies:   ulaw mbed ConfigFile

phone.h

Committer:
okini3939
Date:
2010-12-26
Revision:
1:0f82c574096f
Child:
2:e37117117e79

File content as of revision 1:0f82c574096f:

#ifndef MAIN_H
#define MAIN_H

#define FREQ 8000
#define UDPPORT 20080
#define MTU 720
#define DATA_SIZE 700
#define DIAL_SIZE 10
#define PB_SIZE 10

enum PhoneType {
    PhoneNone,
    PhoneLine1,
    PhoneLine2,
    PhoneMicSp,
    PhoneIpLine,
};

enum Status {
    StatusNone,
    StatusOk,
    StatusNg,
};

enum Mode {
    ModeOff,
    ModeReady,
    ModeDT,
    ModeDial,
    ModeCall,
    ModeRing,
    ModeRBT,
    ModeTalk,
    ModeBT,
    ModeDisconnect,
    ModeData,
};

enum Scan {
    ScanMode,
    ScanStatus,
    ScanHook,
    ScanDial,
};
    
enum Tone {
    DialTone,
    RingBackTone,
    BusyTone,
};

struct PhoneBook {
    char dial[DIAL_SIZE];
    enum PhoneType target;
    char hostname[30];
};

#define HookOff 0
#define HookOn 1

#endif