[BSP][STM32F4xx-HAL][USB HOST]Add USB host drivers and rename device drivers

This commit is contained in:
uestczyh222 committed 2017-12-15 17:52:31 +08:00
1 parent 87d057f130
commit 03a69276e4
6 files changed
+326 -7

No files matched your search

+19
View File
@@ -339,6 +339,25 @@ if RT_USING_USB_DEVICE
default 0x5750
endif
if RT_USING_USB_HOST
menu "USB Host Config"
config USBH_USING_CONTROLLABLE_POWER
bool "using a gpio control usb power"
default y
if USBH_USING_CONTROLLABLE_POWER
config USBH_POWER_PIN
int "power control pin"
default 15
config USBH_CURRENT_PIN
int "current check pin"
default 86
endif
config USBH_USING_VBUS
bool "using vbus check pin"
default n
endmenu
endif
+3 -2
View File
@@ -26,11 +26,12 @@ if GetDepend(['RT_USING_WDT']):
src += ['drv_iwg.c']
if GetDepend(['RT_USING_USB_DEVICE']):
src += ['drv_usb.c']
src += ['drv_usbd.c']
if GetDepend(['RT_USING_RTC']):
src += ['drv_rtc.c']
if GetDepend(['RT_USING_USB_HOST']):
src += ['drv_usbh.c']
CPPPATH = [cwd]
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
@@ -1,5 +1,5 @@
/*
* File : stm32_usb.c
* File : stm32_usbd.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2015, RT-Thread Development Team
*
@@ -11,7 +11,7 @@
* Date Author Notes
* 2017-10-30 ZYH the first version
*/
#include "drv_usb.h"
#include "drv_usbd.h"
#include <rtthread.h>
#include <rtdevice.h>
#include "board.h"
@@ -1,5 +1,5 @@
/*
* File : stm32_usb.h
* File : stm32_usbd.h
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2015, RT-Thread Development Team
*
@@ -11,8 +11,8 @@
* Date Author Notes
* 2017-10-30 ZYH the first version
*/
#ifndef __STM32_USB_H__
#define __STM32_USB_H__
#ifndef __STM32_USBD_H__
#define __STM32_USBD_H__
#include <rtthread.h>
int stm_usbd_register(void);
File diff suppressed because it is too large. Load diff
+20
View File
@@ -0,0 +1,20 @@
/*
* File : stm32_usbh.h
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2015, RT-Thread Development Team
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rt-thread.org/license/LICENSE
*
* Change Logs:
* Date Author Notes
* 2017-12-12 ZYH the first version
*/
#ifndef __STM32_USBH_H__
#define __STM32_USBH_H__
#include <rtthread.h>
int stm_usbh_register(void);
#endif