mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
[H7][LIB] Take care of UNUSED parameters in V1.4.0
This commit is contained in:
parent
49ee02a707
commit
125e0887b5
8 changed files with 29 additions and 0 deletions
|
@ -144,6 +144,8 @@ FLASH_ProcessTypeDef pFlash;
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t FlashAddress, uint32_t DataAddress)
|
HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t FlashAddress, uint32_t DataAddress)
|
||||||
{
|
{
|
||||||
|
UNUSED(TypeProgram);
|
||||||
|
|
||||||
HAL_StatusTypeDef status;
|
HAL_StatusTypeDef status;
|
||||||
__IO uint32_t *dest_addr = (__IO uint32_t *)FlashAddress;
|
__IO uint32_t *dest_addr = (__IO uint32_t *)FlashAddress;
|
||||||
__IO uint32_t *src_addr = (__IO uint32_t*)DataAddress;
|
__IO uint32_t *src_addr = (__IO uint32_t*)DataAddress;
|
||||||
|
@ -232,6 +234,8 @@ HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t FlashAddress,
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t FlashAddress, uint32_t DataAddress)
|
HAL_StatusTypeDef HAL_FLASH_Program_IT(uint32_t TypeProgram, uint32_t FlashAddress, uint32_t DataAddress)
|
||||||
{
|
{
|
||||||
|
UNUSED(TypeProgram);
|
||||||
|
|
||||||
HAL_StatusTypeDef status;
|
HAL_StatusTypeDef status;
|
||||||
__IO uint32_t *dest_addr = (__IO uint32_t*)FlashAddress;
|
__IO uint32_t *dest_addr = (__IO uint32_t*)FlashAddress;
|
||||||
__IO uint32_t *src_addr = (__IO uint32_t*)DataAddress;
|
__IO uint32_t *src_addr = (__IO uint32_t*)DataAddress;
|
||||||
|
|
|
@ -376,6 +376,8 @@ void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
|
||||||
*/
|
*/
|
||||||
void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
|
void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
|
||||||
{
|
{
|
||||||
|
UNUSED(Regulator);
|
||||||
|
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
assert_param(IS_PWR_REGULATOR(Regulator));
|
assert_param(IS_PWR_REGULATOR(Regulator));
|
||||||
assert_param(IS_PWR_SLEEP_ENTRY(SLEEPEntry));
|
assert_param(IS_PWR_SLEEP_ENTRY(SLEEPEntry));
|
||||||
|
|
|
@ -160,6 +160,8 @@
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin)
|
HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin)
|
||||||
{
|
{
|
||||||
|
UNUSED(RTC_TimeStampPin);
|
||||||
|
|
||||||
uint32_t tmpreg;
|
uint32_t tmpreg;
|
||||||
|
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
|
@ -216,6 +218,8 @@ HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp(RTC_HandleTypeDef *hrtc, uint32_t TimeS
|
||||||
*/
|
*/
|
||||||
HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp_IT(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin)
|
HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp_IT(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin)
|
||||||
{
|
{
|
||||||
|
UNUSED(RTC_TimeStampPin);
|
||||||
|
|
||||||
uint32_t tmpreg;
|
uint32_t tmpreg;
|
||||||
|
|
||||||
/* Check the parameters */
|
/* Check the parameters */
|
||||||
|
|
|
@ -470,6 +470,8 @@ __ALIGN_BEGIN uint8_t USBD_CDC_OtherSpeedCfgDesc[USB_CDC_CONFIG_DESC_SIZ] __ALIG
|
||||||
*/
|
*/
|
||||||
static uint8_t USBD_CDC_Init (USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
static uint8_t USBD_CDC_Init (USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
||||||
{
|
{
|
||||||
|
UNUSED(cfgidx);
|
||||||
|
|
||||||
uint8_t ret = 0U;
|
uint8_t ret = 0U;
|
||||||
USBD_CDC_HandleTypeDef *hcdc;
|
USBD_CDC_HandleTypeDef *hcdc;
|
||||||
|
|
||||||
|
@ -548,6 +550,8 @@ static uint8_t USBD_CDC_Init (USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
||||||
*/
|
*/
|
||||||
static uint8_t USBD_CDC_DeInit (USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
static uint8_t USBD_CDC_DeInit (USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
||||||
{
|
{
|
||||||
|
UNUSED(cfgidx);
|
||||||
|
|
||||||
uint8_t ret = 0U;
|
uint8_t ret = 0U;
|
||||||
|
|
||||||
/* Close EP IN */
|
/* Close EP IN */
|
||||||
|
|
|
@ -382,6 +382,8 @@ __ALIGN_BEGIN static uint8_t HID_MOUSE_ReportDesc[HID_MOUSE_REPORT_DESC_SIZE] _
|
||||||
*/
|
*/
|
||||||
static uint8_t USBD_HID_Init (USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
static uint8_t USBD_HID_Init (USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
||||||
{
|
{
|
||||||
|
UNUSED(cfgidx);
|
||||||
|
|
||||||
/* Open EP IN */
|
/* Open EP IN */
|
||||||
USBD_LL_OpenEP(pdev, HID_EPIN_ADDR, USBD_EP_TYPE_INTR, HID_EPIN_SIZE);
|
USBD_LL_OpenEP(pdev, HID_EPIN_ADDR, USBD_EP_TYPE_INTR, HID_EPIN_SIZE);
|
||||||
pdev->ep_in[HID_EPIN_ADDR & 0xFU].is_used = 1U;
|
pdev->ep_in[HID_EPIN_ADDR & 0xFU].is_used = 1U;
|
||||||
|
@ -408,6 +410,8 @@ static uint8_t USBD_HID_Init (USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
||||||
static uint8_t USBD_HID_DeInit (USBD_HandleTypeDef *pdev,
|
static uint8_t USBD_HID_DeInit (USBD_HandleTypeDef *pdev,
|
||||||
uint8_t cfgidx)
|
uint8_t cfgidx)
|
||||||
{
|
{
|
||||||
|
UNUSED(cfgidx);
|
||||||
|
|
||||||
/* Close HID EPs */
|
/* Close HID EPs */
|
||||||
USBD_LL_CloseEP(pdev, HID_EPIN_ADDR);
|
USBD_LL_CloseEP(pdev, HID_EPIN_ADDR);
|
||||||
pdev->ep_in[HID_EPIN_ADDR & 0xFU].is_used = 0U;
|
pdev->ep_in[HID_EPIN_ADDR & 0xFU].is_used = 0U;
|
||||||
|
@ -644,6 +648,7 @@ static uint8_t *USBD_HID_GetOtherSpeedCfgDesc (uint16_t *length)
|
||||||
static uint8_t USBD_HID_DataIn (USBD_HandleTypeDef *pdev,
|
static uint8_t USBD_HID_DataIn (USBD_HandleTypeDef *pdev,
|
||||||
uint8_t epnum)
|
uint8_t epnum)
|
||||||
{
|
{
|
||||||
|
UNUSED(epnum);
|
||||||
|
|
||||||
/* Ensure that the FIFO is empty before a new transfer, this condition could
|
/* Ensure that the FIFO is empty before a new transfer, this condition could
|
||||||
be caused by a new transfer before the end of the previous transfer */
|
be caused by a new transfer before the end of the previous transfer */
|
||||||
|
|
|
@ -295,6 +295,8 @@ __ALIGN_BEGIN uint8_t USBD_MSC_DeviceQualifierDesc[USB_LEN_DEV_QUALIFIER_DESC]
|
||||||
*/
|
*/
|
||||||
uint8_t USBD_MSC_Init (USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
uint8_t USBD_MSC_Init (USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
||||||
{
|
{
|
||||||
|
UNUSED(cfgidx);
|
||||||
|
|
||||||
if(pdev->dev_speed == USBD_SPEED_HIGH)
|
if(pdev->dev_speed == USBD_SPEED_HIGH)
|
||||||
{
|
{
|
||||||
/* Open EP OUT */
|
/* Open EP OUT */
|
||||||
|
@ -338,6 +340,8 @@ uint8_t USBD_MSC_Init (USBD_HandleTypeDef *pdev, uint8_t cfgidx)
|
||||||
uint8_t USBD_MSC_DeInit (USBD_HandleTypeDef *pdev,
|
uint8_t USBD_MSC_DeInit (USBD_HandleTypeDef *pdev,
|
||||||
uint8_t cfgidx)
|
uint8_t cfgidx)
|
||||||
{
|
{
|
||||||
|
UNUSED(cfgidx);
|
||||||
|
|
||||||
/* Close MSC EPs */
|
/* Close MSC EPs */
|
||||||
USBD_LL_CloseEP(pdev, MSC_EPOUT_ADDR);
|
USBD_LL_CloseEP(pdev, MSC_EPOUT_ADDR);
|
||||||
pdev->ep_out[MSC_EPOUT_ADDR & 0xFU].is_used = 0U;
|
pdev->ep_out[MSC_EPOUT_ADDR & 0xFU].is_used = 0U;
|
||||||
|
|
|
@ -159,6 +159,8 @@ void MSC_BOT_DeInit (USBD_HandleTypeDef *pdev)
|
||||||
void MSC_BOT_DataIn (USBD_HandleTypeDef *pdev,
|
void MSC_BOT_DataIn (USBD_HandleTypeDef *pdev,
|
||||||
uint8_t epnum)
|
uint8_t epnum)
|
||||||
{
|
{
|
||||||
|
UNUSED(epnum);
|
||||||
|
|
||||||
USBD_MSC_BOT_HandleTypeDef *hmsc = (USBD_MSC_BOT_HandleTypeDef*)pdev->pClassData;
|
USBD_MSC_BOT_HandleTypeDef *hmsc = (USBD_MSC_BOT_HandleTypeDef*)pdev->pClassData;
|
||||||
|
|
||||||
switch (hmsc->bot_state)
|
switch (hmsc->bot_state)
|
||||||
|
@ -192,6 +194,8 @@ void MSC_BOT_DataIn (USBD_HandleTypeDef *pdev,
|
||||||
void MSC_BOT_DataOut (USBD_HandleTypeDef *pdev,
|
void MSC_BOT_DataOut (USBD_HandleTypeDef *pdev,
|
||||||
uint8_t epnum)
|
uint8_t epnum)
|
||||||
{
|
{
|
||||||
|
UNUSED(epnum);
|
||||||
|
|
||||||
USBD_MSC_BOT_HandleTypeDef *hmsc = (USBD_MSC_BOT_HandleTypeDef*)pdev->pClassData;
|
USBD_MSC_BOT_HandleTypeDef *hmsc = (USBD_MSC_BOT_HandleTypeDef*)pdev->pClassData;
|
||||||
|
|
||||||
switch (hmsc->bot_state)
|
switch (hmsc->bot_state)
|
||||||
|
|
|
@ -782,6 +782,8 @@ void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata)
|
||||||
void USBD_CtlError( USBD_HandleTypeDef *pdev ,
|
void USBD_CtlError( USBD_HandleTypeDef *pdev ,
|
||||||
USBD_SetupReqTypedef *req)
|
USBD_SetupReqTypedef *req)
|
||||||
{
|
{
|
||||||
|
UNUSED(req);
|
||||||
|
|
||||||
USBD_LL_StallEP(pdev , 0x80U);
|
USBD_LL_StallEP(pdev , 0x80U);
|
||||||
USBD_LL_StallEP(pdev , 0U);
|
USBD_LL_StallEP(pdev , 0U);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue