GPIO Write
Set GPIO pin status
Add-On Required: This feature requires the Embedded Coder Support Package for STMicroelectronics STM32 Processors add-on.
Libraries:
Embedded Coder Support Package for STMicroelectronics STM32 Processors /
STM32F4-Discovery
Description
Set the logical value of a digital pin of the STM32F4 -Discovery™ board.
Examples
Getting Started with Embedded Coder Support Package for STMicroelectronics Discovery Boards
Demonstrates how to use the Embedded Coder® Support Package for STMicroelectronics® STM32 Processors to run a Simulink® model on an STMicroelectronics STM32F4-Discovery, STM32F746G-Discovery, or STM32F769I-Discovery board.
Push Button and LED
Use the GPIO blocks in the STMicroelectronics® STM32F4-Discovery library to control the push-button and the LED's on the STMicroelectronics® STM32F4-Discovery board.
G.729 Voice Activity Detection for STM32 Processor Based Board
Model the ITU-T G.729 Voice Activity Detector (VAD) algorithm and run it on the ARM® Cortex®-M based STMicroelectronics® STM32 boards using Embedded Coder® Support Package for STMicroelectronics STM32 Processors.
Asynchronous Scheduling for STM32F4-Discovery Board
Model asynchronous scheduling using the Hardware Interrupt block for the STMicroelectronics® STM32F4-Discovery board using Asynchronous Scheduling for STM32F4-Discovery Board using Embedded Coder® Support Package for STMicroelectronics STM32 Processors.
Ports
Input
Port_1 — Set the GPIO pin status
scalar
The input port to set the GPIO pin status.
Data Types: single
| double
| int8
| int16
| int32
| uint8
| uint16
| uint32
| Boolean
| fixed point
| enumerated
| bus
Parameters
GPIO port — GPIO port to set the GPIO pin status
GPIOA (default) | GPIOA | GPIOB | GPIOC | GPIOD | GPIOE | GPIOF | GPIOG | GPIOH | GPIOI
Select one of GPIOA to GPIOI ports to set a GPIO pin status.
Pin number — GPIO port to set the GPIO pin status
1 (default)
Select a GPIO pin to write the logical status.
Initially set GPIO pin — Option to set the GPIO pin status during model initialization
off (default) | on
Select this option to set the GPIO pin status during model initialization.
Toggle pin when input is true — Option to enable GPIO pin toggling when the input is true
off (default) | on
Select this option to enable GPIO pin toggling when the input is ‘true’.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2013b
See Also
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)