using usb as console
This commit is contained in:
+15
-65
@@ -286,60 +286,7 @@ CONFIG_RT_USING_WDT=y
|
||||
CONFIG_RT_USING_PIN=y
|
||||
# CONFIG_RT_USING_KTIME is not set
|
||||
CONFIG_RT_USING_HWTIMER=y
|
||||
CONFIG_RT_USING_CHERRYUSB=y
|
||||
CONFIG_RT_CHERRYUSB_DEVICE=y
|
||||
CONFIG_RT_CHERRYUSB_DEVICE_SPEED_FS=y
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_SPEED_HS is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_SPEED_AUTO is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_CUSTOM is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_FSDEV_ST is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_FSDEV_CUSTOM is not set
|
||||
CONFIG_RT_CHERRYUSB_DEVICE_DWC2_ST=y
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_DWC2_ESP is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_DWC2_KENDRYTE is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_DWC2_AT is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_DWC2_HC is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_DWC2_NATION is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_DWC2_GD is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_DWC2_CUSTOM is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_MUSB_ES is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_MUSB_SUNXI is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_MUSB_BK is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_MUSB_SIFLI is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_MUSB_CUSTOM is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_CHIPIDEA_MCX is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_CHIPIDEA_CUSTOM is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_KINETIS_MCX is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_KINETIS_MM32 is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_KINETIS_CUSTOM is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_BL is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_HPM is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_AIC is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_RP2040 is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_CH32 is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_PUSB2 is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_NRF5X is not set
|
||||
CONFIG_RT_CHERRYUSB_DEVICE_CDC_ACM=y
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_HID is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_MSC is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_AUDIO is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_VIDEO is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_CDC_RNDIS is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_CDC_ECM is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_CDC_NCM is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_MTP is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_ADB is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_DFU is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_CDC_ACM_CHARDEV is not set
|
||||
CONFIG_CONFIG_USBDEV_REQUEST_BUFFER_LEN=512
|
||||
CONFIG_CONFIG_USBDEV_MSC_MAX_BUFSIZE=512
|
||||
# CONFIG_CONFIG_USBDEV_RNDIS_USING_LWIP is not set
|
||||
# CONFIG_CONFIG_USBDEV_CDC_ECM_USING_LWIP is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_TEMPLATE_NONE is not set
|
||||
CONFIG_RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM=y
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_TEMPLATE_WINUSBV1 is not set
|
||||
# CONFIG_RT_CHERRYUSB_DEVICE_TEMPLATE_WINUSBV2_CDC is not set
|
||||
# CONFIG_RT_CHERRYUSB_HOST is not set
|
||||
# CONFIG_RT_USING_CHERRYUSB is not set
|
||||
# end of Device Drivers
|
||||
|
||||
#
|
||||
@@ -426,14 +373,19 @@ CONFIG_RT_USING_USB_DEVICE=y
|
||||
CONFIG_RT_USBD_THREAD_STACK_SZ=4096
|
||||
CONFIG_USB_VENDOR_ID=0x0483
|
||||
CONFIG_USB_PRODUCT_ID=0x5740
|
||||
# CONFIG_RT_USB_DEVICE_COMPOSITE is not set
|
||||
CONFIG__RT_USB_DEVICE_NONE=y
|
||||
# CONFIG__RT_USB_DEVICE_CDC is not set
|
||||
# CONFIG__RT_USB_DEVICE_MSTORAGE is not set
|
||||
# CONFIG__RT_USB_DEVICE_HID is not set
|
||||
# CONFIG__RT_USB_DEVICE_WINUSB is not set
|
||||
# CONFIG__RT_USB_DEVICE_AUDIO is not set
|
||||
CONFIG_RT_USB_DEVICE_COMPOSITE=y
|
||||
CONFIG_RT_USB_DEVICE_CDC=y
|
||||
CONFIG_RT_USB_DEVICE_NONE=y
|
||||
# CONFIG_RT_USB_DEVICE_MSTORAGE is not set
|
||||
# CONFIG_RT_USB_DEVICE_HID is not set
|
||||
# CONFIG_RT_USB_DEVICE_WINUSB is not set
|
||||
# CONFIG_RT_USB_DEVICE_AUDIO is not set
|
||||
CONFIG_RT_VCOM_TASK_STK_SIZE=512
|
||||
CONFIG_RT_CDC_RX_BUFSIZE=128
|
||||
# CONFIG_RT_VCOM_TX_USE_DMA is not set
|
||||
CONFIG_RT_VCOM_SERNO="32021919830108"
|
||||
CONFIG_RT_VCOM_SER_LEN=14
|
||||
CONFIG_RT_VCOM_TX_TIMEOUT=1000
|
||||
# end of Using USB legacy version
|
||||
|
||||
# CONFIG_RT_USING_FDT is not set
|
||||
@@ -1504,9 +1456,7 @@ CONFIG_BSP_USING_UART3=y
|
||||
CONFIG_BSP_UART3_RX_USING_DMA=y
|
||||
CONFIG_BSP_UART3_TX_USING_DMA=y
|
||||
# CONFIG_BSP_USING_UART4 is not set
|
||||
CONFIG_BSP_USING_UART5=y
|
||||
# CONFIG_BSP_UART5_RX_USING_DMA is not set
|
||||
# CONFIG_BSP_UART5_TX_USING_DMA is not set
|
||||
# CONFIG_BSP_USING_UART5 is not set
|
||||
CONFIG_BSP_USING_UART6=y
|
||||
CONFIG_BSP_UART6_RX_USING_DMA=y
|
||||
CONFIG_BSP_UART6_TX_USING_DMA=y
|
||||
@@ -1519,7 +1469,7 @@ CONFIG_BSP_USING_I2C4=y
|
||||
# CONFIG_BSP_USING_ADC is not set
|
||||
# CONFIG_BSP_USING_ONCHIP_RTC is not set
|
||||
CONFIG_BSP_USING_WDT=y
|
||||
# CONFIG_BSP_USING_USBD is not set
|
||||
CONFIG_BSP_USING_USBD=y
|
||||
# CONFIG_BSP_USING_USBH is not set
|
||||
CONFIG_BSP_USING_ON_CHIP_FLASH=y
|
||||
CONFIG_BSP_USING_TIM=y
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <board.h>
|
||||
|
||||
#if 0
|
||||
void usb_dc_low_level_init (uint8_t busid)
|
||||
{
|
||||
extern void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd);
|
||||
HAL_PCD_MspInit(&(PCD_HandleTypeDef){
|
||||
.Instance = USB_OTG_FS
|
||||
});
|
||||
}
|
||||
|
||||
void OTG_FS_IRQHandler (void)
|
||||
{
|
||||
extern void USBD_IRQHandler(uint8_t busid);
|
||||
USBD_IRQHandler(0);
|
||||
}
|
||||
|
||||
int usbd_init(void)
|
||||
{
|
||||
usb_dc_low_level_init(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
INIT_BOARD_EXPORT(usbd_init);
|
||||
|
||||
|
||||
int chrg_usbd_init (void)
|
||||
{
|
||||
extern void cdc_acm_init(uint8_t busid, uintptr_t reg_base);
|
||||
cdc_acm_init(0, USB_OTG_FS_PERIPH_BASE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
//INIT_COMPONENT_EXPORT(chrg_usbd_init);
|
||||
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <board.h>
|
||||
|
||||
#include "chrg_vcom.h"
|
||||
|
||||
#define DBG_TAG "chrg.vcom"
|
||||
#include <rtdbg.h>
|
||||
|
||||
int chrg_vcom_init (void)
|
||||
{
|
||||
rt_err_t ret = RT_EOK;
|
||||
rt_device_t dev = RT_NULL;
|
||||
|
||||
dev = rt_device_find(DEV_NAME_VCOM);
|
||||
if (RT_NULL == dev) {
|
||||
LOG_E("device 'vcom' not found.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = rt_device_open(dev, RT_DEVICE_FLAG_RDWR);
|
||||
if (RT_EOK != ret) {
|
||||
LOG_E("open 'vcom' failed.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
//INIT_COMPONENT_EXPORT(chrg_vcom_init);
|
||||
|
||||
|
||||
int chrg_vcom_console_init (void)
|
||||
{
|
||||
rt_console_set_device(DEV_NAME_VCOM);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
INIT_ENV_EXPORT(chrg_vcom_console_init);
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef __CHRG_VCOM_H__
|
||||
#define __CHRG_VCOM_H__
|
||||
|
||||
|
||||
#define DEV_NAME_VCOM "vcom"
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
#include <board.h>
|
||||
#include <drv_gpio.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "shell.h"
|
||||
#include "main.h"
|
||||
@@ -21,6 +23,8 @@ void show_app_version (void)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
//rt_uint32_t tick = 0;
|
||||
|
||||
#if defined(RT_USING_FINSH) && defined(FINSH_USING_MSH)
|
||||
finsh_set_prompt("chrg ");
|
||||
#endif
|
||||
@@ -28,6 +32,8 @@ int main(void)
|
||||
while (1) {
|
||||
rt_thread_mdelay(1000);
|
||||
chrg_wdt_feed();
|
||||
|
||||
//rt_kprintf("%d\r\n", ++tick);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#MicroXplorer Configuration settings - do not modify
|
||||
CAD.formats=
|
||||
CAD.pinconfig=
|
||||
CAD.provider=
|
||||
File.Version=6
|
||||
KeepUserPlacement=false
|
||||
Mcu.CPN=STM32F405RGT6
|
||||
Mcu.Family=STM32F4
|
||||
Mcu.IP0=NVIC
|
||||
Mcu.IP1=RCC
|
||||
@@ -20,18 +24,19 @@ Mcu.PinsNb=7
|
||||
Mcu.ThirdPartyNb=0
|
||||
Mcu.UserConstants=
|
||||
Mcu.UserName=STM32F405RGTx
|
||||
MxCube.Version=5.0.0
|
||||
MxDb.Version=DB.5.0.0
|
||||
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
MxCube.Version=6.12.1
|
||||
MxDb.Version=DB.6.0.121
|
||||
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.ForceEnableDMAVector=true
|
||||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
|
||||
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:false
|
||||
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
|
||||
PA2.GPIOParameters=GPIO_PuPd
|
||||
PA2.GPIO_PuPd=GPIO_PULLUP
|
||||
PA2.Mode=Asynchronous
|
||||
@@ -44,14 +49,6 @@ PC14-OSC32_IN.Mode=LSE-External-Oscillator
|
||||
PC14-OSC32_IN.Signal=RCC_OSC32_IN
|
||||
PC15-OSC32_OUT.Mode=LSE-External-Oscillator
|
||||
PC15-OSC32_OUT.Signal=RCC_OSC32_OUT
|
||||
PCC.Checker=false
|
||||
PCC.Line=STM32F405/415
|
||||
PCC.MCU=STM32F405RGTx
|
||||
PCC.PartNumber=STM32F405RGTx
|
||||
PCC.Seq0=0
|
||||
PCC.Series=STM32F4
|
||||
PCC.Temperature=25
|
||||
PCC.Vdd=3.3
|
||||
PH0-OSC_IN.Mode=HSE-External-Oscillator
|
||||
PH0-OSC_IN.Signal=RCC_OSC_IN
|
||||
PH1-OSC_OUT.Mode=HSE-External-Oscillator
|
||||
@@ -66,7 +63,7 @@ ProjectManager.CustomerFirmwarePackage=
|
||||
ProjectManager.DefaultFWLocation=true
|
||||
ProjectManager.DeletePrevious=true
|
||||
ProjectManager.DeviceId=STM32F405RGTx
|
||||
ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.23.0
|
||||
ProjectManager.FirmwarePackage=STM32Cube FW_F4 V1.28.3
|
||||
ProjectManager.FreePins=false
|
||||
ProjectManager.HalAssertFull=false
|
||||
ProjectManager.HeapSize=0x200
|
||||
@@ -79,30 +76,47 @@ ProjectManager.PreviousToolchain=
|
||||
ProjectManager.ProjectBuild=false
|
||||
ProjectManager.ProjectFileName=CubeMX_Config.ioc
|
||||
ProjectManager.ProjectName=CubeMX_Config
|
||||
ProjectManager.ProjectStructure=
|
||||
ProjectManager.RegisterCallBack=
|
||||
ProjectManager.StackSize=0x400
|
||||
ProjectManager.TargetToolchain=EWARM V8
|
||||
ProjectManager.ToolChainLocation=
|
||||
ProjectManager.UAScriptAfterPath=
|
||||
ProjectManager.UAScriptBeforePath=
|
||||
ProjectManager.UnderRoot=false
|
||||
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-SystemClock_Config-RCC-false-HAL-false,3-MX_USART2_UART_Init-USART2-false-HAL-true
|
||||
RCC.AHBFreq_Value=16000000
|
||||
RCC.APB1Freq_Value=16000000
|
||||
RCC.APB2Freq_Value=16000000
|
||||
RCC.CortexFreq_Value=16000000
|
||||
RCC.48MHZClocksFreq_Value=84000000
|
||||
RCC.AHBFreq_Value=168000000
|
||||
RCC.APB1CLKDivider=RCC_HCLK_DIV4
|
||||
RCC.APB1Freq_Value=42000000
|
||||
RCC.APB1TimFreq_Value=84000000
|
||||
RCC.APB2CLKDivider=RCC_HCLK_DIV2
|
||||
RCC.APB2Freq_Value=84000000
|
||||
RCC.APB2TimFreq_Value=168000000
|
||||
RCC.CortexFreq_Value=168000000
|
||||
RCC.EthernetFreq_Value=168000000
|
||||
RCC.FCLKCortexFreq_Value=168000000
|
||||
RCC.FamilyName=M
|
||||
RCC.HCLKFreq_Value=168000000
|
||||
RCC.HSE_VALUE=8000000
|
||||
RCC.HSI_VALUE=16000000
|
||||
RCC.I2SClocksFreq_Value=96000000
|
||||
RCC.IPParameters=AHBFreq_Value,APB1Freq_Value,APB2Freq_Value,CortexFreq_Value,FamilyName,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LSI_VALUE,PLLCLKFreq_Value,PLLQCLKFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VcooutputI2S
|
||||
RCC.I2SClocksFreq_Value=192000000
|
||||
RCC.IPParameters=48MHZClocksFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CortexFreq_Value,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2SClocksFreq_Value,LSI_VALUE,MCO2PinFreq_Value,PLLCLKFreq_Value,PLLM,PLLN,PLLQCLKFreq_Value,PLLSourceVirtual,RTCFreq_Value,RTCHSEDivFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VcooutputI2S
|
||||
RCC.LSI_VALUE=32000
|
||||
RCC.PLLCLKFreq_Value=96000000
|
||||
RCC.PLLQCLKFreq_Value=48000000
|
||||
RCC.MCO2PinFreq_Value=168000000
|
||||
RCC.PLLCLKFreq_Value=168000000
|
||||
RCC.PLLM=4
|
||||
RCC.PLLN=168
|
||||
RCC.PLLQCLKFreq_Value=84000000
|
||||
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE
|
||||
RCC.RTCFreq_Value=32000
|
||||
RCC.RTCHSEDivFreq_Value=4000000
|
||||
RCC.SYSCLKFreq_VALUE=16000000
|
||||
RCC.VCOI2SOutputFreq_Value=192000000
|
||||
RCC.VCOInputFreq_Value=1000000
|
||||
RCC.VCOOutputFreq_Value=192000000
|
||||
RCC.VcooutputI2S=96000000
|
||||
RCC.SYSCLKFreq_VALUE=168000000
|
||||
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
|
||||
RCC.VCOI2SOutputFreq_Value=384000000
|
||||
RCC.VCOInputFreq_Value=2000000
|
||||
RCC.VCOOutputFreq_Value=336000000
|
||||
RCC.VcooutputI2S=192000000
|
||||
USART2.IPParameters=VirtualMode
|
||||
USART2.VirtualMode=VM_ASYNC
|
||||
VP_SYS_VS_Systick.Mode=SysTick
|
||||
|
||||
@@ -333,16 +333,6 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
|
||||
PB11 ------> USART3_RX
|
||||
*/
|
||||
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_10|GPIO_PIN_11);
|
||||
} else if(huart->Instance==UART5) {
|
||||
/* Peripheral clock disable */
|
||||
__HAL_RCC_UART5_CLK_DISABLE();
|
||||
|
||||
/**UART5 GPIO Configuration
|
||||
PC12 ------> UART5_TX
|
||||
PD2 ------> UART5_RX
|
||||
*/
|
||||
HAL_GPIO_DeInit(GPIOC, GPIO_PIN_12);
|
||||
HAL_GPIO_DeInit(GPIOD, GPIO_PIN_2);
|
||||
} else if(huart->Instance==USART6) {
|
||||
/* Peripheral clock disable */
|
||||
__HAL_RCC_USART6_CLK_DISABLE();
|
||||
@@ -357,7 +347,76 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief PCD MSP Initialization
|
||||
* This function configures the hardware resources used in this example
|
||||
* @param hpcd: PCD handle pointer
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd)
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStruct = {0};
|
||||
if(hpcd->Instance==USB_OTG_FS)
|
||||
{
|
||||
/* USER CODE BEGIN USB_OTG_FS_MspInit 0 */
|
||||
|
||||
/* USER CODE END USB_OTG_FS_MspInit 0 */
|
||||
|
||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||
/**USB_OTG_FS GPIO Configuration
|
||||
PA11 ------> USB_OTG_FS_DM
|
||||
PA12 ------> USB_OTG_FS_DP
|
||||
*/
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
|
||||
GPIO_InitStruct.Alternate = GPIO_AF10_OTG_FS;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
/* Peripheral clock enable */
|
||||
__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
|
||||
/* USB_OTG_FS interrupt Init */
|
||||
HAL_NVIC_SetPriority(OTG_FS_IRQn, 0, 0);
|
||||
HAL_NVIC_EnableIRQ(OTG_FS_IRQn);
|
||||
/* USER CODE BEGIN USB_OTG_FS_MspInit 1 */
|
||||
|
||||
/* USER CODE END USB_OTG_FS_MspInit 1 */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief PCD MSP De-Initialization
|
||||
* This function freeze the hardware resources used in this example
|
||||
* @param hpcd: PCD handle pointer
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_PCD_MspDeInit(PCD_HandleTypeDef* hpcd)
|
||||
{
|
||||
if(hpcd->Instance==USB_OTG_FS)
|
||||
{
|
||||
/* USER CODE BEGIN USB_OTG_FS_MspDeInit 0 */
|
||||
|
||||
/* USER CODE END USB_OTG_FS_MspDeInit 0 */
|
||||
/* Peripheral clock disable */
|
||||
__HAL_RCC_USB_OTG_FS_CLK_DISABLE();
|
||||
|
||||
/**USB_OTG_FS GPIO Configuration
|
||||
PA11 ------> USB_OTG_FS_DM
|
||||
PA12 ------> USB_OTG_FS_DP
|
||||
*/
|
||||
HAL_GPIO_DeInit(GPIOA, GPIO_PIN_11|GPIO_PIN_12);
|
||||
|
||||
/* USB_OTG_FS interrupt DeInit */
|
||||
HAL_NVIC_DisableIRQ(OTG_FS_IRQn);
|
||||
/* USER CODE BEGIN USB_OTG_FS_MspDeInit 1 */
|
||||
|
||||
/* USER CODE END USB_OTG_FS_MspDeInit 1 */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
+38
-4
@@ -2,6 +2,38 @@
|
||||
#include <board.h>
|
||||
#include <drv_common.h>
|
||||
|
||||
|
||||
void MX_USB_OTG_FS_PCD_Init(void)
|
||||
{
|
||||
PCD_HandleTypeDef hpcd_USB_OTG_FS;
|
||||
/* USER CODE BEGIN USB_OTG_FS_Init 0 */
|
||||
|
||||
/* USER CODE END USB_OTG_FS_Init 0 */
|
||||
|
||||
/* USER CODE BEGIN USB_OTG_FS_Init 1 */
|
||||
|
||||
/* USER CODE END USB_OTG_FS_Init 1 */
|
||||
hpcd_USB_OTG_FS.Instance = USB_OTG_FS;
|
||||
hpcd_USB_OTG_FS.Init.dev_endpoints = 4;
|
||||
hpcd_USB_OTG_FS.Init.speed = PCD_SPEED_FULL;
|
||||
hpcd_USB_OTG_FS.Init.dma_enable = DISABLE;
|
||||
hpcd_USB_OTG_FS.Init.phy_itface = PCD_PHY_EMBEDDED;
|
||||
hpcd_USB_OTG_FS.Init.Sof_enable = DISABLE;
|
||||
hpcd_USB_OTG_FS.Init.low_power_enable = DISABLE;
|
||||
hpcd_USB_OTG_FS.Init.lpm_enable = DISABLE;
|
||||
hpcd_USB_OTG_FS.Init.vbus_sensing_enable = DISABLE;
|
||||
hpcd_USB_OTG_FS.Init.use_dedicated_ep1 = DISABLE;
|
||||
if (HAL_PCD_Init(&hpcd_USB_OTG_FS) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
/* USER CODE BEGIN USB_OTG_FS_Init 2 */
|
||||
|
||||
/* USER CODE END USB_OTG_FS_Init 2 */
|
||||
|
||||
}
|
||||
|
||||
|
||||
void SystemClock_Config(void)
|
||||
{
|
||||
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
|
||||
@@ -17,10 +49,10 @@ void SystemClock_Config(void)
|
||||
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
|
||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
|
||||
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
|
||||
RCC_OscInitStruct.PLL.PLLM = 8;
|
||||
RCC_OscInitStruct.PLL.PLLN = 192;
|
||||
RCC_OscInitStruct.PLL.PLLM = 4;
|
||||
RCC_OscInitStruct.PLL.PLLN = 168;
|
||||
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
|
||||
RCC_OscInitStruct.PLL.PLLQ = 4;
|
||||
RCC_OscInitStruct.PLL.PLLQ = 7;
|
||||
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
@@ -34,10 +66,12 @@ void SystemClock_Config(void)
|
||||
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
|
||||
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV2;
|
||||
|
||||
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_3) != HAL_OK)
|
||||
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK)
|
||||
{
|
||||
Error_Handler();
|
||||
}
|
||||
|
||||
MX_USB_OTG_FS_PCD_Init();
|
||||
}
|
||||
|
||||
|
||||
|
||||
+186
-221
@@ -337,9 +337,9 @@
|
||||
<v6Rtti>0</v6Rtti>
|
||||
<VariousControls>
|
||||
<MiscControls></MiscControls>
|
||||
<Define>__CLK_TCK=RT_TICK_PER_SECOND, STM32F405xx, RT_USING_ARMLIBC, __RTTHREAD__, USE_HAL_DRIVER, __STDC_LIMIT_MACROS, RT_USING_LIBC</Define>
|
||||
<Define>USE_HAL_DRIVER, __RTTHREAD__, RT_USING_LIBC, RT_USING_ARMLIBC, __CLK_TCK=RT_TICK_PER_SECOND, STM32F405xx, __STDC_LIMIT_MACROS</Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath>..\..\rt-thread\components\libc\compilers\common\include;..\..\rt-thread\components\libc\posix\io\eventfd;..\..\rt-thread\components\libc\posix\ipc;..\..\rt-thread\components\drivers\include;..\..\libs\stm32f4\STM32F4_HAL\Inc\Legacy;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\usb\cherryusb;..\..\rt-thread\components\drivers\usb\cherryusb\class\audio;..\..\rt-thread\components\drivers\usb\cherryusb\class\vendor\net;..\..\rt-thread\components\drivers\smp_call;..\..\rt-thread\components\drivers\usb\cherryusb\class\vendor\serial;applications\bsp;..\..\rt-thread\components\fal\inc;..\..\rt-thread\components\libc\posix\io\epoll;..\..\rt-thread\components\drivers\usb\cherryusb\class\midi;..\..\rt-thread\components\legacy\usb\usbdevice;..\..\rt-thread\components\drivers\usb\cherryusb\class\cdc;applications\thread;..\..\rt-thread\components\libc\compilers\common\extension;..\..\rt-thread\components\libc\compilers\common\extension\fcntl\octal;..\..\rt-thread\components\drivers\include;..\..\libs\stm32f4\STM32F4_HAL\Inc;..\..\rt-thread\components\finsh;..\..\rt-thread\include;..\..\rt-thread\components\drivers\usb\cherryusb\class\hub;..\..\rt-thread\components\drivers\usb\cherryusb\class\vendor\wifi;..\..\rt-thread\components\drivers\include;applications\utils;..\..\rt-thread\libcpu\arm\common;..\..\libs\cmsis-core\Include;board;..\..\rt-thread\components\drivers\phy;..\..\rt-thread\components\drivers\include;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\config;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\drv_flash;board\CubeMX_Config\Inc;..\..\rt-thread\components\drivers\usb\cherryusb\class\msc;..\..\libs\stm32f4\STM32F4_CMSIS\Include;..\..\rt-thread\components\drivers\usb\cherryusb\osal;..\..\rt-thread\components\drivers\include;applications;..\..\rt-thread\components\drivers\usb\cherryusb\class\hid;..\..\rt-thread\components\drivers\include;board\ports;.;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\usb\cherryusb\class\video;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers;..\..\rt-thread\components\drivers\usb\cherryusb\class\dfu;..\..\rt-thread\components\libc\posix\io\poll;..\..\rt-thread\components\drivers\usb\cherryusb\class\adb;..\..\rt-thread\components\drivers\usb\cherryusb\common;..\..\rt-thread\libcpu\arm\cortex-m4;..\..\rt-thread\components\drivers\usb\cherryusb\class\wireless;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\usb\cherryusb\core</IncludePath>
|
||||
<IncludePath>..\..\rt-thread\components\drivers\include;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers;..\..\libs\stm32f4\STM32F4_HAL\Inc\Legacy;..\..\libs\stm32f4\STM32F4_HAL\Inc;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\config;.;board;..\..\rt-thread\include;..\..\rt-thread\components\drivers\include;board\ports;applications;..\..\rt-thread\components\drivers\phy;..\..\libs\cmsis-core\Include;..\..\rt-thread\components\libc\posix\io\poll;..\..\rt-thread\components\libc\compilers\common\include;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\smp_call;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\drv_flash;..\..\rt-thread\components\libc\posix\io\epoll;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\posix\ipc;..\..\rt-thread\components\libc\compilers\common\extension\fcntl\octal;..\..\rt-thread\components\fal\inc;applications\utils;..\..\rt-thread\components\drivers\include;applications\thread;board\CubeMX_Config\Inc;..\..\libs\stm32f4\STM32F4_CMSIS\Include;..\..\rt-thread\components\legacy\usb\usbdevice;..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers;..\..\rt-thread\components\finsh;applications\bsp;..\..\rt-thread\libcpu\arm\common;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\posix\io\eventfd;..\..\rt-thread\components\drivers\include;..\..\rt-thread\components\libc\compilers\common\extension;..\..\rt-thread\libcpu\arm\cortex-m4;..\..\rt-thread\components\drivers\include</IncludePath>
|
||||
</VariousControls>
|
||||
</Cads>
|
||||
<Aads>
|
||||
@@ -394,39 +394,24 @@
|
||||
<GroupName>Applications/bsp</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>chrg_wdt.c</FileName>
|
||||
<FileName>chrg_fal.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\bsp\chrg_wdt.c</FilePath>
|
||||
<FilePath>applications\bsp\chrg_fal.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_switch.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\bsp\chrg_switch.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_fal.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\bsp\chrg_fal.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_i2c.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\bsp\chrg_i2c.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_usbd.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\bsp\chrg_usbd.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_pin.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\bsp\chrg_pin.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_clk.c</FileName>
|
||||
<FileName>chrg_vcom.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\bsp\chrg_clk.c</FilePath>
|
||||
<FilePath>applications\bsp\chrg_vcom.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_tmr.c</FileName>
|
||||
@@ -438,36 +423,51 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\bsp\chrg_tty.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_i2c.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\bsp\chrg_i2c.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_wdt.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\bsp\chrg_wdt.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_intr.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\bsp\chrg_intr.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_clk.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\bsp\chrg_clk.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>Applications/thread</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>chrg_north.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\thread\chrg_north.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_lcd.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\thread\chrg_lcd.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_comm.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\thread\chrg_comm.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_south.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\thread\chrg_south.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_north.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\thread\chrg_north.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_comm.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\thread\chrg_comm.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_roll.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -479,15 +479,20 @@
|
||||
<GroupName>Applications/utils</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>chrg_pkg.c</FileName>
|
||||
<FileName>chrg_sink.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\utils\chrg_pkg.c</FilePath>
|
||||
<FilePath>applications\utils\chrg_sink.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_utils.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\utils\chrg_utils.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_pkg.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\utils\chrg_pkg.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_pcf8574.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -498,56 +503,6 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\utils\chrg_source.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>chrg_sink.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>applications\utils\chrg_sink.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>CherryUSB</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>usbd_cdc_acm.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\drivers\usb\cherryusb\class\cdc\usbd_cdc_acm.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>usb_msh.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\drivers\usb\cherryusb\platform\rtthread\usb_msh.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>usb_osal_rtthread.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\drivers\usb\cherryusb\osal\usb_osal_rtthread.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>usb_check.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\drivers\usb\cherryusb\platform\rtthread\usb_check.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>usbd_core.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\drivers\usb\cherryusb\core\usbd_core.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>usb_glue_st.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\drivers\usb\cherryusb\port\dwc2\usb_glue_st.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>usb_dc_dwc2.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\drivers\usb\cherryusb\port\dwc2\usb_dc_dwc2.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>cdc_acm_template.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\drivers\usb\cherryusb\demo\cdc_acm_template.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
@@ -1651,6 +1606,11 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\drv_usart.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>drv_usbd.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\bsp\stm32\libraries\HAL_Drivers\drivers\drv_usbd.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>drv_wdt.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -1671,16 +1631,16 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\fal\src\fal_partition.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>fal_flash.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\fal\src\fal_flash.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>fal_rtt.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\fal\src\fal_rtt.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>fal_flash.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\fal\src\fal_flash.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>fal.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -1692,9 +1652,9 @@
|
||||
<GroupName>Finsh</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>msh_parse.c</FileName>
|
||||
<FileName>shell.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\finsh\msh_parse.c</FilePath>
|
||||
<FilePath>..\..\rt-thread\components\finsh\shell.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>cmd.c</FileName>
|
||||
@@ -1702,9 +1662,9 @@
|
||||
<FilePath>..\..\rt-thread\components\finsh\cmd.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>shell.c</FileName>
|
||||
<FileName>msh_parse.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\finsh\shell.c</FilePath>
|
||||
<FilePath>..\..\rt-thread\components\finsh\msh_parse.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>msh.c</FileName>
|
||||
@@ -2562,9 +2522,9 @@
|
||||
<GroupName>klibc</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>kstring.c</FileName>
|
||||
<FileName>kstdio.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\src\klibc\kstring.c</FilePath>
|
||||
<FilePath>..\..\rt-thread\src\klibc\kstdio.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>rt_vsnprintf_tiny.c</FileName>
|
||||
@@ -2576,16 +2536,16 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\src\klibc\kerrno.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>kstring.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\src\klibc\kstring.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>rt_vsscanf.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\src\klibc\rt_vsscanf.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>kstdio.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\src\klibc\kstdio.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
@@ -2622,125 +2582,40 @@
|
||||
<GroupName>rt_usbd</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>usbdevice.c</FileName>
|
||||
<FileName>cdc_vcom.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\legacy\usb\usbdevice\core\usbdevice.c</FilePath>
|
||||
<FilePath>..\..\rt-thread\components\legacy\usb\usbdevice\class\cdc_vcom.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>usbdevice_core.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\legacy\usb\usbdevice\core\usbdevice_core.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>usbdevice.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\rt-thread\components\legacy\usb\usbdevice\core\usbdevice.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>STM32F4-CMSIS</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>system_stm32f4xx.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_CMSIS\Source\Templates\system_stm32f4xx.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>startup_stm32f405xx.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_CMSIS\Source\Templates\arm\startup_stm32f405xx.s</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>system_stm32f4xx.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_CMSIS\Source\Templates\system_stm32f4xx.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>STM32F4-HAL</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_dma_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_iwdg.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_iwdg.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_cryp.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cryp.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_dma.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_lptim.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_lptim.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_pcd.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pcd.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_flash.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_i2c_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_i2c_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_pccard.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pccard.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_ll_usb.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_ll_usb.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_pwr_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_usart.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_usart.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_cryp_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cryp_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_pcd_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pcd_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_rcc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_wwdg.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_wwdg.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_i2c.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_i2c.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_tim.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -2751,40 +2626,45 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash_ramfunc.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_pwr_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_cryp_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cryp_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_rcc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_flash.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_tim_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_tim_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_uart.c</FileName>
|
||||
<FileName>stm32f4xx_hal.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_uart.c</FilePath>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_crc.c</FileName>
|
||||
<FileName>stm32f4xx_hal_dma_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_crc.c</FilePath>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_can.c</FileName>
|
||||
<FileName>stm32f4xx_hal_pccard.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_can.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_cortex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cortex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_rng.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rng.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_cec.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cec.c</FilePath>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pccard.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_flash_ex.c</FileName>
|
||||
@@ -2792,25 +2672,110 @@
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_flash_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_gpio.c</FileName>
|
||||
<FileName>stm32f4xx_hal_dma.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_gpio.c</FilePath>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_dma.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_pwr.c</FileName>
|
||||
<FileName>stm32f4xx_ll_usb.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr.c</FilePath>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_ll_usb.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_wwdg.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_wwdg.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_rng.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rng.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_hcd.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_hcd.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_cec.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cec.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_pwr.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pwr.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_uart.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_uart.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_lptim.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_lptim.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_pcd_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pcd_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_gpio.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_gpio.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_usart.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_usart.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_pcd.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_pcd.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_crc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_crc.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_cryp.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cryp.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_rcc_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_rcc_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_can.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_can.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_iwdg.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_iwdg.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_i2c.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_i2c.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_i2c_ex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_i2c_ex.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>stm32f4xx_hal_cortex.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\libs\stm32f4\STM32F4_HAL\Src\stm32f4xx_hal_cortex.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
</Groups>
|
||||
|
||||
+8
-10
@@ -163,14 +163,6 @@
|
||||
#define RT_USING_WDT
|
||||
#define RT_USING_PIN
|
||||
#define RT_USING_HWTIMER
|
||||
#define RT_USING_CHERRYUSB
|
||||
#define RT_CHERRYUSB_DEVICE
|
||||
#define RT_CHERRYUSB_DEVICE_SPEED_FS
|
||||
#define RT_CHERRYUSB_DEVICE_DWC2_ST
|
||||
#define RT_CHERRYUSB_DEVICE_CDC_ACM
|
||||
#define CONFIG_USBDEV_REQUEST_BUFFER_LEN 512
|
||||
#define CONFIG_USBDEV_MSC_MAX_BUFSIZE 512
|
||||
#define RT_CHERRYUSB_DEVICE_TEMPLATE_CDC_ACM
|
||||
/* end of Device Drivers */
|
||||
|
||||
/* C/C++ and POSIX layer */
|
||||
@@ -217,8 +209,14 @@
|
||||
#define RT_USBD_THREAD_STACK_SZ 4096
|
||||
#define USB_VENDOR_ID 0x0483
|
||||
#define USB_PRODUCT_ID 0x5740
|
||||
#define _RT_USB_DEVICE_NONE
|
||||
#define RT_USB_DEVICE_COMPOSITE
|
||||
#define RT_USB_DEVICE_CDC
|
||||
#define RT_USB_DEVICE_NONE
|
||||
#define RT_VCOM_TASK_STK_SIZE 512
|
||||
#define RT_CDC_RX_BUFSIZE 128
|
||||
#define RT_VCOM_SERNO "32021919830108"
|
||||
#define RT_VCOM_SER_LEN 14
|
||||
#define RT_VCOM_TX_TIMEOUT 1000
|
||||
/* end of Using USB legacy version */
|
||||
/* end of RT-Thread Components */
|
||||
|
||||
@@ -445,7 +443,6 @@
|
||||
#define BSP_USING_UART3
|
||||
#define BSP_UART3_RX_USING_DMA
|
||||
#define BSP_UART3_TX_USING_DMA
|
||||
#define BSP_USING_UART5
|
||||
#define BSP_USING_UART6
|
||||
#define BSP_UART6_RX_USING_DMA
|
||||
#define BSP_UART6_TX_USING_DMA
|
||||
@@ -455,6 +452,7 @@
|
||||
#define BSP_USING_I2C3
|
||||
#define BSP_USING_I2C4
|
||||
#define BSP_USING_WDT
|
||||
#define BSP_USING_USBD
|
||||
#define BSP_USING_ON_CHIP_FLASH
|
||||
#define BSP_USING_TIM
|
||||
#define BSP_USING_TIM2
|
||||
|
||||
@@ -17,17 +17,17 @@
|
||||
|
||||
#include "drv_gpio.h"
|
||||
|
||||
#define BSP_I2C1_SCL_PIN GET_PIN(C, 0)
|
||||
#define BSP_I2C1_SDA_PIN GET_PIN(C, 1)
|
||||
#define BSP_I2C1_SCL_PIN GET_PIN(C, 2)
|
||||
#define BSP_I2C1_SDA_PIN GET_PIN(C, 3)
|
||||
|
||||
#define BSP_I2C2_SCL_PIN GET_PIN(A, 0)
|
||||
#define BSP_I2C2_SDA_PIN GET_PIN(A, 1)
|
||||
#define BSP_I2C2_SCL_PIN GET_PIN(A, 4)
|
||||
#define BSP_I2C2_SDA_PIN GET_PIN(A, 5)
|
||||
|
||||
#define BSP_I2C3_SCL_PIN GET_PIN(A, 6)
|
||||
#define BSP_I2C3_SDA_PIN GET_PIN(A, 7)
|
||||
#define BSP_I2C3_SCL_PIN GET_PIN(C, 4)
|
||||
#define BSP_I2C3_SDA_PIN GET_PIN(C, 5)
|
||||
|
||||
#define BSP_I2C4_SCL_PIN GET_PIN(B, 12)
|
||||
#define BSP_I2C4_SDA_PIN GET_PIN(B, 13)
|
||||
#define BSP_I2C4_SCL_PIN GET_PIN(B, 14)
|
||||
#define BSP_I2C4_SDA_PIN GET_PIN(B, 15)
|
||||
|
||||
/* stm32 config class */
|
||||
struct stm32_soft_i2c_config
|
||||
|
||||
Reference in New Issue
Block a user