4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-21 02:27:10 +08:00

add usb_led for stm32radio

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@325 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
wuyangyong 2010-01-20 13:27:23 +00:00
parent 9b282bd925
commit 10dde354c7
3 changed files with 11 additions and 9 deletions
bsp/stm32_radio/Libraries/Mass_Storage

@ -24,6 +24,11 @@
#define USB_DISCONNECT_PIN GPIO_Pin_7 #define USB_DISCONNECT_PIN GPIO_Pin_7
#define RCC_APB2Periph_GPIO_DISCONNECT RCC_APB2Periph_GPIOG #define RCC_APB2Periph_GPIO_DISCONNECT RCC_APB2Periph_GPIOG
/* use led: 0-NO 1-YES */
#define USB_USE_LED 1
#define USB_LED_PORT GPIOE
#define USB_LED_PIN GPIO_Pin_2
#endif /* __PLATFORM_CONFIG_H */ #endif /* __PLATFORM_CONFIG_H */
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/ /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/

@ -133,7 +133,9 @@ void Led_Config(void)
*******************************************************************************/ *******************************************************************************/
void Led_RW_ON(void) void Led_RW_ON(void)
{ {
//GPIO_SetBits(USB_LED_PORT, GPIO_Pin_8); #if (USB_USE_LED == 1)
GPIO_SetBits(USB_LED_PORT, USB_LED_PIN);
#endif
} }
/******************************************************************************* /*******************************************************************************
@ -145,7 +147,9 @@ void Led_RW_ON(void)
*******************************************************************************/ *******************************************************************************/
void Led_RW_OFF(void) void Led_RW_OFF(void)
{ {
//GPIO_ResetBits(USB_LED_PORT, GPIO_Pin_8); #if (USB_USE_LED == 1)
GPIO_ResetBits(USB_LED_PORT, USB_LED_PIN);
#endif
} }
/******************************************************************************* /*******************************************************************************
* Function Name : USB_Configured_LED * Function Name : USB_Configured_LED

@ -93,13 +93,6 @@ uint16_t MAL_GetStatus (uint8_t lun)
default: default:
return MAL_FAIL; return MAL_FAIL;
} }
#if 0
if(lun == 0)
{
return MAL_OK;
}
return MAL_FAIL;
#endif
} }
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/ /******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/