| Summary |
#include <rl_usb.h>
BOOL usbh_msc_status (
U8 ctrl,
U8 dev_idx
);
|
| 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 usbh_msc_status function is part of the RL-USB Host Class Driver software layer. |
| Return Value | A boolean value indicating whether the mass storage device is connected and initialized. |
| See Also | usbh_msc_get_last_error, usbh_msc_read, usbh_msc_read_config, usbh_msc_write |
| Example |
#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);
}
..
}
}
|