Set blackbox file handler to NULL after closing file
[inav.git] / src / main / vcp / usb_endp.c
blobfbbb4bc62b9c4a334773ef0bead747108ecbf9b1
1 /**
2 ******************************************************************************
3 * @file usb_endp.c
4 * @author MCD Application Team
5 * @version V4.0.0
6 * @date 21-January-2013
7 * @brief Endpoint routines
8 ******************************************************************************
9 * @attention
11 * <h2><center>&copy; 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 ------------------------------------------------------------------*/
29 #include "usb_lib.h"
30 #include "usb_desc.h"
31 #include "usb_mem.h"
32 #include "hw_config.h"
33 #include "usb_istr.h"
34 #include "usb_pwr.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
51 * Description :
52 * Input : None.
53 * Output : None.
54 * Return : None.
55 *******************************************************************************/
57 void EP1_IN_Callback(void)
59 packetSent = 0; // HJI
62 /*******************************************************************************
63 * Function Name : EP3_OUT_Callback
64 * Description :
65 * Input : None.
66 * Output : None.
67 * Return : None.
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****/