#include <rl_usb.h>
BOOL usbh_msc_status (
U8 ctrl, // USB Host Controller index
U8 dev_idx // USB Device index
);
Description
The function usbh_msc_status checks whether a mass storage
device is connected. The argument ctrl is the index of USB
Host Controller. The argument dev_idx is the index of device
instance.
The function is part of the RL-USB Host Class Driver
software layer.
#include <rl_usb.h>
int main (void) {
..
init_msd (); // Initialize mass storage device
while (1) {
usbh_engine(0);
if (!usbh_msc_status(0, 0)) { // If device 0 on controller 0 is not connected
usbh_engine(0);
}
..
}
}
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.