推荐星级:
  • 1
  • 2
  • 3
  • 4
  • 5

基于中断和阻塞机制的MQX I2C驱动程序(英文)

更新时间:2023-02-15 08:15:16 大小:514K 上传用户:sun2152查看TA发布的资源 标签:中断阻塞机制mqxi2c驱动 下载积分:1分 评价赚积分 (如何评价?) 打赏 收藏 评论(0) 举报

资料介绍

1 Introduction This application note implements an I2C driver on MQX based on interrupt and blocking mechanism, which masked the details of the I2C module operations and simplifies the application code to a great extent. It covers both the master and slave modes. The code is validated on the K60N512-TWR board. 2 How the driver is designed This driver is fully driven by interrupt. Following is the operation of driver in master and slave modes. • Master mode: When it is working as a master and sending data, the application task passes the address and length of buffer to driver and after that, it is blocked. After the driver finishes transmitting the data in the buffer, it resumes the application task. To reduce memory consumption, the driver does not make its own buffer and copy the data from application to it. The driver uses the buffer at application layer directly. In the same way, when the master is receiving, it passes theaddress and length of buffer to the driver, and then, it is pended by the driver until driver finishes the reading operation. See Figure 1. • Slave mode: There are some differences when it is working as a slave. A slave is working in a passive way, not as a master does. So, when it is sending data, it keeps blocked until the master reads it. When it is reading, it will keep blocked until the master sends data to it. See Figure 1.

部分文件列表

文件名 大小
基于中断和阻塞机制的MQX_I2C驱动程序(英文).pdf 514K

全部评论(0)

暂无评论

上传资源 上传优质资源有赏金

  • 打赏
  • 30日榜单

推荐下载