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.
protocol.h
00001 #ifndef PROTOCOL_H 00002 #define PROTOCOL_H 00003 00004 #define CMD_BREAK 'b' // abort recog or ping 00005 #define CMD_SLEEP 's' // go to power down 00006 #define CMD_KNOB 'k' // set si knob <1> 00007 #define CMD_MIC_DIST 'k' // set microphone (<1>=-1) distance <2> 00008 #define CMD_LEVEL 'v' // set sd level <1> 00009 #define CMD_LANGUAGE 'l' // set si language <1> 00010 #define CMD_TIMEOUT 'o' // set timeout <1> 00011 #define CMD_RECOG_SI 'i' // do si recog from ws <1> 00012 #define CMD_TRAIN_SD 't' // train sd command at group <1> pos <2> 00013 #define CMD_GROUP_SD 'g' // insert new command at group <1> pos <2> 00014 #define CMD_UNGROUP_SD 'u' // remove command at group <1> pos <2> 00015 #define CMD_RECOG_SD 'd' // do sd recog at group <1> (0 = trigger mixed si/sd) 00016 #define CMD_ERASE_SD 'e' // reset command at group <1> pos <2> 00017 #define CMD_NAME_SD 'n' // label command at group <1> pos <2> with length <3> name <4-n> 00018 #define CMD_COUNT_SD 'c' // get command count for group <1> 00019 #define CMD_DUMP_SD 'p' // read command data at group <1> pos <2> 00020 #define CMD_MASK_SD 'm' // get active group mask 00021 #define CMD_RESETALL 'r' // reset all commands and groups 00022 #define CMD_ID 'x' // get version id 00023 #define CMD_DELAY 'y' // set transmit delay <1> (log scale) 00024 #define CMD_BAUDRATE 'a' // set baudrate <1> (bit time, 1=>115200) 00025 #define CMD_QUERY_IO 'q' // configure, read or write I/O pin <1> of type <2> 00026 #define CMD_PLAY_SX 'w' // wave table entry <1-2> (10-bit) playback at volume <3> 00027 #define CMD_PLAY_DTMF 'w' // play (<1>=-1) dial tone <2> for duration <3> 00028 #define CMD_DUMP_SX 'h' // dump wave table entries 00029 #define CMD_DUMP_SI 'z' // dump si settings for ws <1> (or total ws count if -1) 00030 #define CMD_SEND_SN 'j' // send sonicnet token with bits <1> index <2-3> at time <4-5> 00031 #define CMD_RECV_SN 'f' // receive sonicnet token with bits <1> rejection <2> timeout <3-4> 00032 00033 #define STS_MASK 'k' // mask of active groups <1-8> 00034 #define STS_COUNT 'c' // count of commands <1> (or number of ws <1>) 00035 #define STS_AWAKEN 'w' // back from power down mode 00036 #define STS_DATA 'd' // provide training <1>, conflict <2>, command label <3-35> (counted string) 00037 #define STS_ERROR 'e' // signal error code <1-2> 00038 #define STS_INVALID 'v' // invalid command or argument 00039 #define STS_TIMEOUT 't' // timeout expired 00040 #define STS_INTERR 'i' // back from aborted recognition (see 'break') 00041 #define STS_SUCCESS 'o' // no errors status 00042 #define STS_RESULT 'r' // recognised sd command <1> - training similar to sd <1> 00043 #define STS_SIMILAR 's' // recognised si <1> (in mixed si/sd) - training similar to si <1> 00044 #define STS_OUT_OF_MEM 'm' // no more available commands (see 'group') 00045 #define STS_ID 'x' // provide version id <1> 00046 #define STS_PIN 'p' // return pin state <1> 00047 #define STS_TABLE_SX 'h' // table entries count <1-2> (10-bit), table name <3-35> (counted string) 00048 #define STS_GRAMMAR 'z' // si grammar: flags <1>, word count <2>, labels... <3-35> (n counted strings) 00049 #define STS_TOKEN 'f' // received sonicnet token <1-2> 00050 00051 // protocol arguments are in the range 0x40 (-1) to 0x60 (+31) inclusive 00052 #define ARG_MIN 0x40 00053 #define ARG_MAX 0x60 00054 #define ARG_ZERO 0x41 00055 00056 #define ARG_ACK 0x20 // to read more status arguments 00057 00058 #endif //PROTOCOL_H 00059
Generated on Fri Jul 22 2022 05:31:07 by
1.7.2