Create release.yml
[betaflight.git] / src / main / vcp / hw_config.h
blob9e598831ec353df315415b93907fec6aa6a1c86e
1 /**
2 ******************************************************************************
3 * @file hw_config.h
4 * @author MCD Application Team
5 * @version V4.0.0
6 * @date 21-January-2013
7 * @brief Hardware Configuration & Setup
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 /* Define to prevent recursive inclusion -------------------------------------*/
29 #ifndef __HW_CONFIG_H
30 #define __HW_CONFIG_H
32 /* Includes ------------------------------------------------------------------*/
33 //#include "platform_config.h"
34 #include "usb_type.h"
35 #ifdef STM32F303
36 #include "stm32f30x.h"
37 #endif
39 #ifdef STM32F10X
40 #include "stm32f10x.h"
41 #endif
43 /* Exported types ------------------------------------------------------------*/
44 /* Exported constants --------------------------------------------------------*/
45 /* Exported macro ------------------------------------------------------------*/
46 /* Exported define -----------------------------------------------------------*/
47 #define MASS_MEMORY_START 0x04002000
48 #define BULK_MAX_PACKET_SIZE 0x00000040
50 /* Exported functions ------------------------------------------------------- */
51 void Set_System(void);
52 void Set_USBClock(void);
53 void Enter_LowPowerMode(void);
54 void Leave_LowPowerMode(void);
55 void USB_Interrupts_Config(void);
56 #ifdef STM32F10X
57 void USB_Interrupts_Disable(void);
58 #endif
59 void USB_Cable_Config(FunctionalState NewState);
60 void Get_SerialNum(void);
61 uint32_t CDC_Send_DATA(const uint8_t *ptrBuffer, uint32_t sendLength); // HJI
62 uint32_t CDC_Send_FreeBytes(void);
63 uint32_t CDC_Receive_DATA(uint8_t* recvBuf, uint32_t len); // HJI
64 uint32_t CDC_Receive_BytesAvailable(void);
66 uint8_t usbIsConfigured(void); // HJI
67 uint8_t usbIsConnected(void); // HJI
68 uint32_t CDC_BaudRate(void);
69 void CDC_SetCtrlLineStateCb(void (*cb)(void *context, uint16_t ctrlLineState), void *context);
70 void CDC_SetBaudRateCb(void (*cb)(void *context, uint32_t baud), void *context);
72 /* External variables --------------------------------------------------------*/
73 extern __IO uint32_t packetSent; // HJI
75 #endif /*__HW_CONFIG_H*/
76 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/