Is it possible to tell if the USB is connected to a wall-charger as opposed to a PC?
Is it possible to tell if the USB is connected to a wall-charger as opposed to a PC?
I'm understand that topic is outdated, but it might be useful for those who has the same problem.
I added APP_USBD_EVT_DRV_SOF case to usbd_user_ev_handler() . If device is connected to wall charger SOF event would never come, so it can be easiest way to distinguish whether it plugged to USB host or not. At least this trick is works for me.
I'm understand that topic is outdated, but it might be useful for those who has the same problem.
I added APP_USBD_EVT_DRV_SOF case to usbd_user_ev_handler() . If device is connected to wall charger SOF event would never come, so it can be easiest way to distinguish whether it plugged to USB host or not. At least this trick is works for me.