Skip to content

Commit

Permalink
fix compiler warnings - STM32F7 HAL Drivers: 'packed' attribute ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdCopter committed Feb 23, 2024
1 parent 8be0288 commit a2052de
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ HAL_StatusTypeDef USB_WritePacket(USB_OTG_GlobalTypeDef *USBx, uint8_t *src, uin
count32b = (len + 3) / 4;
for (i = 0; i < count32b; i++, src += 4)
{
USBx_DFIFO(ch_ep_num) = *((__packed uint32_t *)src);
USBx_DFIFO((uint32_t)ch_ep_num) = *((uint32_t *)src);
}
}
return HAL_OK;
Expand All @@ -843,7 +843,7 @@ void *USB_ReadPacket(USB_OTG_GlobalTypeDef *USBx, uint8_t *dest, uint16_t len)

for ( i = 0; i < count32b; i++, dest += 4 )
{
*(__packed uint32_t *)dest = USBx_DFIFO(0);
*(uint32_t *)dest = USBx_DFIFO(0);

}
return ((void *)dest);
Expand Down

0 comments on commit a2052de

Please sign in to comment.