Skip to content

Commit

Permalink
[H7][LIB] Take care of UNUSED parameters in V1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ezshinoda committed Jul 8, 2019
1 parent 49ee02a commit 125e088
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 0 deletions.
Expand Up @@ -144,6 +144,8 @@ FLASH_ProcessTypeDef pFlash;
*/
HAL_StatusTypeDef HAL_FLASH_Program(uint32_t TypeProgram, uint32_t FlashAddress, uint32_t DataAddress)
{
UNUSED(TypeProgram);

HAL_StatusTypeDef status;
__IO uint32_t *dest_addr = (__IO uint32_t *)FlashAddress;
__IO uint32_t *src_addr = (__IO uint32_t*)DataAddress;
Expand Down Expand Up @@ -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)
{
UNUSED(TypeProgram);

HAL_StatusTypeDef status;
__IO uint32_t *dest_addr = (__IO uint32_t*)FlashAddress;
__IO uint32_t *src_addr = (__IO uint32_t*)DataAddress;
Expand Down
Expand Up @@ -376,6 +376,8 @@ void HAL_PWR_DisableWakeUpPin(uint32_t WakeUpPinx)
*/
void HAL_PWR_EnterSLEEPMode(uint32_t Regulator, uint8_t SLEEPEntry)
{
UNUSED(Regulator);

/* Check the parameters */
assert_param(IS_PWR_REGULATOR(Regulator));
assert_param(IS_PWR_SLEEP_ENTRY(SLEEPEntry));
Expand Down
Expand Up @@ -160,6 +160,8 @@
*/
HAL_StatusTypeDef HAL_RTCEx_SetTimeStamp(RTC_HandleTypeDef *hrtc, uint32_t TimeStampEdge, uint32_t RTC_TimeStampPin)
{
UNUSED(RTC_TimeStampPin);

uint32_t tmpreg;

/* Check the parameters */
Expand Down Expand Up @@ -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)
{
UNUSED(RTC_TimeStampPin);

uint32_t tmpreg;

/* Check the parameters */
Expand Down
Expand Up @@ -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)
{
UNUSED(cfgidx);

uint8_t ret = 0U;
USBD_CDC_HandleTypeDef *hcdc;

Expand Down Expand Up @@ -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)
{
UNUSED(cfgidx);

uint8_t ret = 0U;

/* Close EP IN */
Expand Down
Expand Up @@ -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)
{
UNUSED(cfgidx);

/* Open EP IN */
USBD_LL_OpenEP(pdev, HID_EPIN_ADDR, USBD_EP_TYPE_INTR, HID_EPIN_SIZE);
pdev->ep_in[HID_EPIN_ADDR & 0xFU].is_used = 1U;
Expand All @@ -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,
uint8_t cfgidx)
{
UNUSED(cfgidx);

/* Close HID EPs */
USBD_LL_CloseEP(pdev, HID_EPIN_ADDR);
pdev->ep_in[HID_EPIN_ADDR & 0xFU].is_used = 0U;
Expand Down Expand Up @@ -644,6 +648,7 @@ static uint8_t *USBD_HID_GetOtherSpeedCfgDesc (uint16_t *length)
static uint8_t USBD_HID_DataIn (USBD_HandleTypeDef *pdev,
uint8_t epnum)
{
UNUSED(epnum);

/* 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 */
Expand Down
Expand Up @@ -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)
{
UNUSED(cfgidx);

if(pdev->dev_speed == USBD_SPEED_HIGH)
{
/* Open EP OUT */
Expand Down Expand Up @@ -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 cfgidx)
{
UNUSED(cfgidx);

/* Close MSC EPs */
USBD_LL_CloseEP(pdev, MSC_EPOUT_ADDR);
pdev->ep_out[MSC_EPOUT_ADDR & 0xFU].is_used = 0U;
Expand Down
Expand Up @@ -159,6 +159,8 @@ void MSC_BOT_DeInit (USBD_HandleTypeDef *pdev)
void MSC_BOT_DataIn (USBD_HandleTypeDef *pdev,
uint8_t epnum)
{
UNUSED(epnum);

USBD_MSC_BOT_HandleTypeDef *hmsc = (USBD_MSC_BOT_HandleTypeDef*)pdev->pClassData;

switch (hmsc->bot_state)
Expand Down Expand Up @@ -192,6 +194,8 @@ void MSC_BOT_DataIn (USBD_HandleTypeDef *pdev,
void MSC_BOT_DataOut (USBD_HandleTypeDef *pdev,
uint8_t epnum)
{
UNUSED(epnum);

USBD_MSC_BOT_HandleTypeDef *hmsc = (USBD_MSC_BOT_HandleTypeDef*)pdev->pClassData;

switch (hmsc->bot_state)
Expand Down
Expand Up @@ -782,6 +782,8 @@ void USBD_ParseSetupRequest(USBD_SetupReqTypedef *req, uint8_t *pdata)
void USBD_CtlError( USBD_HandleTypeDef *pdev ,
USBD_SetupReqTypedef *req)
{
UNUSED(req);

USBD_LL_StallEP(pdev , 0x80U);
USBD_LL_StallEP(pdev , 0U);
}
Expand Down

0 comments on commit 125e088

Please sign in to comment.