NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
hw_config.h
Go to the documentation of this file.
1 
28 /* Define to prevent recursive inclusion -------------------------------------*/
29 #ifndef __HW_CONFIG_H
30 #define __HW_CONFIG_H
31 
32 /* Includes ------------------------------------------------------------------*/
33 //#include "platform_config.h"
34 #include "usb_type.h"
35 #ifdef STM32F303
36 #include "stm32f30x.h"
37 #endif
38 
39 #ifdef STM32F10X
40 #include "stm32f10x.h"
41 #endif
42 
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
49 
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 void USB_Cable_Config(FunctionalState NewState);
57 void Get_SerialNum(void);
58 uint32_t CDC_Send_DATA(uint8_t *ptrBuffer, uint8_t sendLength); // HJI
59 uint32_t CDC_Receive_DATA(uint8_t* recvBuf, uint32_t len); // HJI
60 uint8_t usbIsConfigured(void); // HJI
61 uint8_t usbIsConnected(void); // HJI
62 uint32_t CDC_BaudRate(void);
63 /* External variables --------------------------------------------------------*/
64 
65 extern __IO uint32_t receiveLength; // HJI
66 extern __IO uint32_t packetSent; // HJI
67 
68 #endif /*__HW_CONFIG_H*/
69 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
uint8_t usbIsConfigured(void)
Definition: hw_config.c:327
void Leave_LowPowerMode(void)
Definition: hw_config.c:157
uint32_t CDC_Receive_DATA(uint8_t *recvBuf, uint32_t len)
Definition: hw_config.c:294
uint32_t CDC_BaudRate(void)
Definition: hw_config.c:352
void USB_Cable_Config(FunctionalState NewState)
Definition: hw_config.c:205
__IO uint32_t packetSent
Definition: hw_config.c:54
void USB_Interrupts_Config(void)
Definition: hw_config.c:178
uint32_t CDC_Send_DATA(uint8_t *ptrBuffer, uint8_t sendLength)
Definition: hw_config.c:264
uint32_t sendLength
Definition: hw_config.c:57
FunctionalState
Definition: platform.h:54
void Enter_LowPowerMode(void)
Definition: hw_config.c:145
void Set_System(void)
Definition: hw_config.c:69
void Get_SerialNum(void)
Definition: hw_config.c:217
__IO uint32_t receiveLength
Definition: usb_endp.c:45
uint8_t usbIsConnected(void)
Definition: hw_config.c:339
void Set_USBClock(void)
Definition: hw_config.c:130