#ifndef _POC_INTERFACE_ #define _POC_INTERFACE_ /* * Function: virtual_uart_read * Description: * Poc task call function notify UI task cmd response * * Parameters: * data: cmd response * len: response len * * Explain: * module should define this function,this is just declare * * Example: * data = "+POC:8202000000014b6dd58b31000000\r\n" * * Return: * none * */ extern void virtual_uart_read(char *data, int len); /* * Function: virtual_uart_write * Description: * Other task send at cmd to poc task * * Parameters: * cmd: cmd body * len: cmd body len * * Explain: * module can call this function poc task have defined * * Example: * virtual_uart_write("AT+POC=0000000101\r\n", strlen("AT+POC=0000000101\r\n")); * * Return: * none * */ void virtual_uart_write(char *cmd, int len); /* * Function: OEM_PocInit * Description: * Poc Lib Init * * Parameters: * none * * Explain: * module can call this function init poc lib * * Example: * OEM_PocInit(); * * Return: * none * */ void OEM_PocInit(void); /* * Function: report_encode_data_for_record * Description: * Report encode voice data for record * * Parameters: * data: voice data after encode * size: voice data len * frame_type: encode type 0x01 general 0x02 enhance * self: 0 other voice 1 my voice * * Explain: * module should define this function,this is just declare * * Example: * * * Return: * none * */ extern void report_encode_data_for_record(unsigned char *data, unsigned int size, char frame_type, int self); /* * Function: decode_record_data * Description: * decode record data to pcm data * * Parameters: * enc_data: voice data after encode * len: voice data len * type: encode type 0x01 general 0x02 enhance * pcm_data: save pcm data after decode * size: save pcm data buf len * * Explain: * module can call this function poc task have defined * * Example: * * * Return: * -1 fail >0 pcm data len * */ int decode_record_data(char *enc_data, int len, int type, char *pcm_data, int size) #endif