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

View File

@ -24,6 +24,11 @@
#define USB_DISCONNECT_PIN GPIO_Pin_7
#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 */
/******************* (C) COPYRIGHT 2009 STMicroelectronics *****END OF FILE****/

View File

@ -133,7 +133,9 @@ void Led_Config(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)
{
//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

View File

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