Digital I/O functions: pinMode(), digitalWrite(), digitalRead() and digitalToggle().
More...
#include "Arduino.h"
#include "PinConfigured.h"
|
| void | pinMode (pin_size_t pinNumber, PinMode pinMode) |
| | Set the mode of a pin.
|
| |
| void | digitalWrite (pin_size_t pinNumber, PinStatus status) |
| | Write a HIGH or LOW value to a digital pin.
|
| |
| PinStatus | digitalRead (pin_size_t pinNumber) |
| | Read the value of a digital pin.
|
| |
| void | digitalToggle (pin_size_t pinNumber) |
| | Toggle the value from a specified digital pin.
|
| |
|
|
pin_size_t | g_anOutputPinConfigured [MAX_NB_PORT] |
| |
◆ digitalRead()
| PinStatus digitalRead |
( |
pin_size_t |
pinNumber | ) |
|
Read the value of a digital pin.
- Parameters
-
| pinNumber | Pin number, Dx or x. |
- Returns
- HIGH or LOW. LOW if the pin is invalid.
◆ digitalToggle()
| void digitalToggle |
( |
pin_size_t |
pinNumber | ) |
|
Toggle the value from a specified digital pin.
- Parameters
-
| pinNumber | The number of the digital pin you want to toggle. |
◆ digitalWrite()
| void digitalWrite |
( |
pin_size_t |
pinNumber, |
|
|
PinStatus |
status |
|
) |
| |
Write a HIGH or LOW value to a digital pin.
- Parameters
-
| pinNumber | Pin number, Dx or x. |
| status | HIGH or LOW. |
◆ pinMode()
| void pinMode |
( |
pin_size_t |
pinNumber, |
|
|
PinMode |
pinMode |
|
) |
| |
Set the mode of a pin.
If the pin was used for PWM or DAC output (analogWrite()), the output is stopped first. Any unsupported mode calls Error_Handler().
- Parameters
-
| pinNumber | Pin number, Dx or x. |
| pinMode | INPUT, INPUT_PULLUP, INPUT_PULLDOWN, INPUT_ANALOG, OUTPUT or OUTPUT_OPEN_DRAIN. |