Polling or Interrupt based method

前端 未结 14 2406
暗喜
暗喜 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:17

    Basically, polled mode is used in case interrupt mode is unavailable due to some hardware or software reasons. So, interrupt mode is more preferable from power consumption, performance, etc points of view (agree with Paul R). Polled mode is also can be used at prototyping, for cores without peripheral needed and for some testing purposes.

提交回复
热议问题