Follow these steps to create, package, and distribute device driver blocks as a toolbox to other users.
Create a Digital Write Block or Create a Digital Read Block. During this process, you will Create a Project Folder. This project folder provides a standard structure for device driver blocks created by different users.
Add Description for Users to the block mask.
(Optional) Depending on the hardware your block supports, you may choose to Add Push Button to View Pin Map of your hardware board.
Add code for the Simulation with Device Driver Blocks modes of your blocks. Including simulation modes allows your blocks to be used and tested in models without the need to deploy them to the physical hardware each time.
(Recommended) Add documentation on how to use your blocks to the project folder. You can quickly create rich documentation either by Publish and Share MATLAB Code or including Live Scripts and Functions.
Package your project folder using the Create and Share Toolboxes workflow.
Share your with device driver block toolbox with other users or submit the toolbox to MathWorks File Exchange.