デバイス ドライバー ブロック
デバイス ドライバー ブロックは、ARM® Cortex®-A から派生するハードウェア ボードに展開された場合にカスタム C/C++ デバイス ドライバー コードを生成する特殊な MATLAB System ブロックです。デバイス ドライバー ブロックでは、通信プロトコルやハードウェア ライブラリなど、サポート パッケージでは利用できないハードウェア ボード機能に簡単にアクセスできます。
テンプレート 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.
- ステップ 1: Create a Project Folder
- ステップ 2: Write the Hardware Specific C/C++ Code
- ステップ 3: Select System Object Template
- ステップ 4: Specify the Initialization, Output, and Termination
- ステップ 5: Set Output Port Properties
- ステップ 6: Test 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