Engee documentation

STM32 DI

Reading digital inputs from the specified pin.

blockType: CFunction

Path in the library:

/Interfaces/Targets/STM32/STM32 DI

Description

To work with the block, install/update the support package. equipment.

Block STM32 DI It is used to read digital inputs from the specified pin.

Ports

Output

# Condition — logical 0 or logical 1
scalar

Details

Logical 0 or logical 1 with dimension ().

Data types

uint8_t

Complex numbers support

No

Parameters

Main group

# Порт: — the microcontroller port selected in CubeMX GPIO
A | B | C

Details
Values

A | B | C

Default value

C

Program usage name

m_port

Tunable

No

Evaluatable

Yes

# Вывод: — pin number for the selected GPIO port of the microcontroller
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15

Details
Values

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15

Default value

8

Program usage name

m_input

Tunable

No

Evaluatable

Yes

Configuring CubeMX to read analog inputs

In the "Pinout & Configuration" tab, select the GPIO pins you are interested in recording in the main "Pinout" menu and point to them GPIO Input, the pull-up resistor.

stm32 prepare 6

stm32 prepare 7

Generate the code.