Closed Squonk42 closed 5 years ago
https://github.com/dmitrystu/libusb_stm32/blob/7b5e32e2ef326d80863245fcd87859db8498c879/src/usbd_stm32f103_devfs.c#L162 The logical AND should probably be replaced by a bitwise AND, such that the bit value is used as a mask on the read port input data: if (USBD_DP_PORT->IDR & _BV(USBD_DP_PIN)) return STATUS_VAL(USBD_HW_ENABLED | USBD_HW_SPEED_FS);
if (USBD_DP_PORT->IDR & _BV(USBD_DP_PIN)) return STATUS_VAL(USBD_HW_ENABLED | USBD_HW_SPEED_FS);
Yes. Will be fixed ASAP
https://github.com/dmitrystu/libusb_stm32/blob/7b5e32e2ef326d80863245fcd87859db8498c879/src/usbd_stm32f103_devfs.c#L162 The logical AND should probably be replaced by a bitwise AND, such that the bit value is used as a mask on the read port input data:
if (USBD_DP_PORT->IDR & _BV(USBD_DP_PIN)) return STATUS_VAL(USBD_HW_ENABLED | USBD_HW_SPEED_FS);