@wwatson . Thanks for your suggestion , but not working for me . The program stay lock at the first myusb.begin() in main.
I have changed my USB key and tested again with my program, and now it work as expected. If you unmount, remove key, plug it again and mount, it's fine. But if you unmount key and directly mount it, program stay lock in mount process. To avoid that, i have add test in my program with
Code:
stat = disk_status (2);
. This test return me value (stat) with value below:
1)When i run program with one key, stat = 0 (correct)
2)When i un_mount key, stat = 0 (??)((Why not stat = 1 = Disk not initialized)
3)When i remove key , stat = 1 (Disk not initialized)(Why not stat = 2 = No disk)
4)When i plug key , stat = 1 (Disk not initialized)
5)When i mount key , stat = 0 (correct)
For step 3, is-it like deviceAvailable() was always true and don't fall to false when i remove key.
Finally step 2 and 3 don't return me one expected value (for me), but perhaps it's correct for you.
Thanks for you help