pieusb: use proper wait loop