2 ******************************************************************************
4 * @author MCD Application Team
6 * @date 21-January-2013
7 * @brief Endpoint routines
8 ******************************************************************************
11 * <h2><center>© COPYRIGHT 2013 STMicroelectronics</center></h2>
13 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 * You may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at:
17 * http://www.st.com/software_license_agreement_liberty_v2
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
25 ******************************************************************************
28 /* Includes ------------------------------------------------------------------*/
35 #include "hw_config.h"
39 /* Private typedef -----------------------------------------------------------*/
40 /* Private define ------------------------------------------------------------*/
42 /* Interval between sending IN packets in frame number (1 frame = 1ms) */
43 #define VCOMPORT_IN_FRAME_INTERVAL 5
44 /* Private macro -------------------------------------------------------------*/
45 /* Private variables ---------------------------------------------------------*/
46 extern __IO
uint32_t packetSent
; // HJI
47 extern __IO
uint8_t receiveBuffer
[64]; // HJI
48 __IO
uint32_t receiveLength
; // HJI
49 /* Private function prototypes -----------------------------------------------*/
50 /* Private functions ---------------------------------------------------------*/
52 /*******************************************************************************
53 * Function Name : EP1_IN_Callback
58 *******************************************************************************/
60 void EP1_IN_Callback(void)
62 packetSent
= 0; // HJI
65 /*******************************************************************************
66 * Function Name : EP3_OUT_Callback
71 *******************************************************************************/
72 void EP3_OUT_Callback(void)
74 receiveLength
= GetEPRxCount(ENDP3
); // HJI
75 PMAToUserBufferCopy((unsigned char*)receiveBuffer
, ENDP3_RXADDR
, receiveLength
); // HJI
78 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/