Polling or Interrupt based method

前端 未结 14 2568
暗喜
暗喜 2020-12-12 13:44

When should one use polling method and when should one use interrupt based method ? Are there scenarios in which both can be used ?

14条回答
  •  南笙
    南笙 (楼主)
    2020-12-12 14:35

    You don't want to have your host waiting in the busy loop for a long time, and also polling can become inefficient when frequent checks are made for data that is not there frequently. So there for, if t he host and the device are both fast, then polling if pretty fast.

提交回复
热议问题