Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ulaw mbed ConfigFile
phone.h
00001 /** @file phone.h 00002 * @brief mbed Phone Platform 00003 */ 00004 00005 #ifndef MAIN_H 00006 #define MAIN_H 00007 00008 #define FREQ 8000 00009 #define UDPPORT 20080 00010 #define MTU 720 00011 #define HOSTNAME_SIZE 30 00012 #define DATA_SIZE 400 00013 #define DIAL_SIZE 10 00014 #define PB_SIZE 10 00015 #define DIAL_TIMEOUT (FREQ * 3) 00016 #define CALL_TIMEOUT (FREQ * 10) 00017 00018 /** 00019 * @brief Phone Type 00020 */ 00021 enum PhoneType { 00022 PhoneNone, 00023 PhoneLine1, 00024 PhoneLine2, 00025 PhoneMicSp, 00026 PhoneIpLine, 00027 PhoneType_FORCE_WORD = 0x7FFF 00028 }; 00029 00030 /** 00031 * @brief Status 00032 */ 00033 enum Status { 00034 StatusNone, 00035 StatusOk, 00036 StatusNg, 00037 Status_FORCE_WORD = 0x7FFF 00038 }; 00039 00040 /** 00041 * @brief Mode 00042 */ 00043 enum Mode { 00044 ModeOff, 00045 ModeReady, 00046 ModeDT, 00047 ModeDial, 00048 ModeCall, 00049 ModeRing, 00050 ModeRBT, 00051 ModeTalk, 00052 ModeBT, 00053 ModeDisconnect, 00054 ModeData, 00055 Mode_FORCE_WORD = 0x7FFF 00056 }; 00057 00058 /** 00059 * @brief Scan 00060 */ 00061 enum Scan { 00062 ScanMode, 00063 ScanStatus, 00064 ScanHook, 00065 ScanDial, 00066 }; 00067 00068 /** 00069 * @brief Tone 00070 */ 00071 enum Tone { 00072 DialTone, 00073 RingBackTone, 00074 BusyTone, 00075 }; 00076 00077 /** 00078 * @brief Phone Book 00079 */ 00080 struct PhoneBook { 00081 char dial[DIAL_SIZE]; 00082 enum PhoneType target; 00083 char hostname[HOSTNAME_SIZE]; 00084 }; 00085 00086 #define HookOff 0 00087 #define HookOn 1 00088 00089 int config (); 00090 00091 #endif
Generated on Wed Jul 13 2022 04:31:15 by
1.7.2