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 ------------------------------------------------------------------*/
32 #include "hw_config.h"
36 /* Private typedef -----------------------------------------------------------*/
37 /* Private define ------------------------------------------------------------*/
39 /* Interval between sending IN packets in frame number (1 frame = 1ms) */
40 #define VCOMPORT_IN_FRAME_INTERVAL 5
41 /* Private macro -------------------------------------------------------------*/
42 /* Private variables ---------------------------------------------------------*/
43 extern __IO
uint32_t packetSent
; // HJI
44 extern __IO
uint8_t receiveBuffer
[64]; // HJI
45 __IO
uint32_t receiveLength
; // HJI
46 /* Private function prototypes -----------------------------------------------*/
47 /* Private functions ---------------------------------------------------------*/
49 /*******************************************************************************
50 * Function Name : EP1_IN_Callback
55 *******************************************************************************/
57 void EP1_IN_Callback(void)
59 packetSent
= 0; // HJI
62 /*******************************************************************************
63 * Function Name : EP3_OUT_Callback
68 *******************************************************************************/
69 void EP3_OUT_Callback(void)
71 receiveLength
= GetEPRxCount(ENDP3
); // HJI
72 PMAToUserBufferCopy((unsigned char*)receiveBuffer
, ENDP3_RXADDR
, receiveLength
); // HJI
75 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/