NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
hw_config.c File Reference

Hardware Configuration & Setup. More...

#include "stm32_it.h"
#include <platform.h>
#include "usb_lib.h"
#include "usb_prop.h"
#include "usb_desc.h"
#include "hw_config.h"
#include "usb_pwr.h"
#include <stdbool.h>
#include "build_config.h"
#include "drivers/system.h"
#include "drivers/usb_io.h"
#include "drivers/nvic.h"
Include dependency graph for hw_config.c:

Functions

void Set_System (void)
 
void Set_USBClock (void)
 
void Enter_LowPowerMode (void)
 
void Leave_LowPowerMode (void)
 
void USB_Interrupts_Config (void)
 
void USB_Cable_Config (FunctionalState NewState)
 
void Get_SerialNum (void)
 
uint32_t CDC_Send_DATA (uint8_t *ptrBuffer, uint8_t len)
 
uint32_t CDC_Receive_DATA (uint8_t *recvBuf, uint32_t len)
 
uint8_t usbIsConfigured (void)
 
uint8_t usbIsConnected (void)
 
uint32_t CDC_BaudRate (void)
 

Variables

ErrorStatus HSEStartUpStatus
 
EXTI_InitTypeDef EXTI_InitStructure
 
__IO uint32_t packetSent
 
uint8_t receiveBuffer [64]
 
uint32_t sendLength
 

Detailed Description

Hardware Configuration & Setup.

Author
MCD Application Team
Version
V4.0.0
Date
21-January-2013
Attention

© COPYRIGHT 2013 STMicroelectronics

Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at:

   http://www.st.com/software_license_agreement_liberty_v2

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

uint32_t CDC_BaudRate ( void  )

Here is the call graph for this function:

uint32_t CDC_Receive_DATA ( uint8_t *  recvBuf,
uint32_t  len 
)
uint32_t CDC_Send_DATA ( uint8_t *  ptrBuffer,
uint8_t  len 
)
void Enter_LowPowerMode ( void  )
void Get_SerialNum ( void  )
void Leave_LowPowerMode ( void  )
void Set_System ( void  )

< At this stage the microcontroller clock setting is already configured, this is done through SystemInit() function which is called from startup file (startup_stm32f10x_xx.s) before to branch to application main. To reconfigure the default setting of SystemInit() function, refer to system_stm32f10x.c file

Here is the call graph for this function:

void Set_USBClock ( void  )
void USB_Cable_Config ( FunctionalState  NewState)
void USB_Interrupts_Config ( void  )
uint8_t usbIsConfigured ( void  )
uint8_t usbIsConnected ( void  )

Variable Documentation

EXTI_InitTypeDef EXTI_InitStructure
ErrorStatus HSEStartUpStatus
__IO uint32_t packetSent
uint8_t receiveBuffer[64]
uint32_t sendLength