Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Windows で libusb を使用する場合 (poll/select のサポートが不十分な場合)、USB エンドポイントで保留中のバイトをチェックする方法はありますか?
既に読み取られたバイトを含むリング バッファーを実装することで、この問題を回避しました。保留中のバイトをチェックすると、リング バッファが検索され、(空の場合) エンドポイントでノンブロッキング読み取りが実行されます (何かがある場合はリング バッファに書き込みます)。終点。これは私にとってはうまくいきますが、あまりエレガントではありません。