设备驱动程序模块
创建设备驱动程序模块以访问硬件板的特定功能
设备驱动程序模块是一种专用的 MATLAB System 模块,当部署到 ARM® Cortex®-A 派生的硬件板时,它会生成自定义 C/C++ 设备驱动程序代码。通过设备驱动程序模块可轻松访问硬件板功能,例如访问支持包中不提供的通信协议或硬件库。
您可以从 System object™ 模板开发设备驱动程序模块,然后与其他用户共享完成的模块。
主题
- Prerequisites
Learn the system requirements and recommended skills to develop device driver blocks for ARM Cortex-A based hardware boards.
- Structure of Device Driver System Object
Understand the concepts and operation of device driver blocks implemented using System object.
- Simulation with Device Driver Blocks
Choose and implement a data simulation mode for device driver blocks.
- Sharing Device Driver Blocks with Other Users
Package and distribute your device driver blocks.
- Create a Digital Write Block
Create a Digital Write block using a System object.
- 步骤 1: Create a Project Folder
- 步骤 2: Write the Hardware-Specific C/C++ Code
- 步骤 3: Select a System Object Template
- 步骤 4: Specify the Initialization, Output, and Termination Behavior
- 步骤 5: Test System Object on MATLAB Command Line
- 步骤 6: Create the MATLAB System Block
- 步骤 7: Generate Code and Deploy the Model to the Hardware
- Create a Digital Read Block
Create a Digital Read block using a System object.
- Block Mask
Create block masks for your device driver blocks.
- 步骤 1: Add Description for Users
- 步骤 2: Add Pin Number Property
- 步骤 3: Add Push Button to View Pin Map