Skip to content

Commit

Permalink
usb/usb_lm4f: Removed the unnecessary and standards-forbidden `(void …
Browse files Browse the repository at this point in the history
…*)` casts from the callback registrations
  • Loading branch information
dragonmux committed Jan 14, 2024
1 parent a7f2ec7 commit ae15429
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/usb/usb_lm4f.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,7 @@ static void lm4f_ep_setup(usbd_device *usbd_dev, uint8_t addr, uint8_t type,
USB_TXFIFOSZ = reg8;
USB_TXFIFOADD = ((usbd_dev->fifo_mem_top) >> 3);
if (callback) {
usbd_dev->user_callback_ctr[ep][USB_TRANSACTION_IN] =
(void *)callback;
usbd_dev->user_callback_ctr[ep][USB_TRANSACTION_IN] = callback;
}
if (type == USB_ENDPOINT_ATTR_ISOCHRONOUS) {
USB_TXCSRH(ep) |= USB_TXCSRH_ISO;
Expand All @@ -277,8 +276,7 @@ static void lm4f_ep_setup(usbd_device *usbd_dev, uint8_t addr, uint8_t type,
USB_RXFIFOSZ = reg8;
USB_RXFIFOADD = ((usbd_dev->fifo_mem_top) >> 3);
if (callback) {
usbd_dev->user_callback_ctr[ep][USB_TRANSACTION_OUT] =
(void *)callback;
usbd_dev->user_callback_ctr[ep][USB_TRANSACTION_OUT] = callback;
}
if (type == USB_ENDPOINT_ATTR_ISOCHRONOUS) {
USB_RXCSRH(ep) |= USB_RXCSRH_ISO;
Expand Down

0 comments on commit ae15429

Please sign in to comment.