/******************************************************************************** * Copyright (c) 2016, Beijing Tongfang Microelectroics Co., Ltd. * All rights reserved. * Module: VSP class response * Author: Yang Song * Version: V1.0 * History: * 2016-09-22 Original version ********************************************************************************/ #include "global.h" u8 g_bVspLineCoding[7]; /*************************************************************************** * Function: vspClassRequest * Description:VSP Data processing * Input: req 处理at指令 * Return: NULL * Other: NULL **************************************************************************/ void vspClassRequest(u8 req) { switch(req) { case SET_LINE_CODING : vspSetLineCoding(); break;//0x20 case GET_LINE_CODING : vspGetLineCoding(); break;//0x21 case SET_CONTROL_LINE_STATE : vspSetCtrlLineState(); break;//0x22 default : break; } } /*************************************************************************** * Function: vspGetLineCoding * Description:VSP Data processing * Input: NULL * Return: NULL * Other: NULL **************************************************************************/ void vspGetLineCoding(void) { memcpy(g_abUsbEp0Buf, (u8*)g_bVspLineCoding, 7); usbEpnTx(0,g_abUsbEp0Buf,7); } /*************************************************************************** * Function: vspSetLineCoding * Description:VSP Data processing * Input: NULL * Return: NULL * Other: NULL **************************************************************************/ void vspSetLineCoding(void) { while(!EP0STSCXDPKT); //接收前,必须判断此位 memcpy(g_bVspLineCoding, g_abUsbEp0Buf, 7); } /*************************************************************************** * Function: vspSetCtrlLineState * Description:VSP Data processing * Input: NULL * Return: NULL * Other: NULL **************************************************************************/ void vspSetCtrlLineState(void) { } /*************************************************************************** * Function: vspCommOpenCloseDetect * Description:VSP 端口状态监测 * Input: NULL * Return: NULL * Other: NULL **************************************************************************/ void vspCommOpenCloseDetect(void) { }