This section covers functions related to general-purpose input and output signals.
More...
This section covers functions related to general-purpose input and output signals.
◆ watch_disable_digital_input()
void watch_disable_digital_input |
( |
const uint8_t |
pin | ) |
|
Disables any digital input, along with any pull-up or pull-down configuration.
- Parameters
-
pin | The pin that you wish to disable. |
◆ watch_disable_digital_output()
void watch_disable_digital_output |
( |
const uint8_t |
pin | ) |
|
Disables digital output on the selected pin.
- Parameters
-
pin | The pin that you wish disable. |
◆ watch_enable_digital_input()
void watch_enable_digital_input |
( |
const uint8_t |
pin | ) |
|
Configures the selected pin for digital input.
- Parameters
-
pin | The pin that you wish to act as an input. |
◆ watch_enable_digital_output()
void watch_enable_digital_output |
( |
const uint8_t |
pin | ) |
|
Configures the selected pin for digital output.
- Parameters
-
pin | The pin that you wish to act as an output. |
◆ watch_enable_pull_down()
void watch_enable_pull_down |
( |
const uint8_t |
pin | ) |
|
Enables a pull-down resistor on the selected pin.
- Parameters
-
pin | The pin that you wish to configure. |
◆ watch_enable_pull_up()
void watch_enable_pull_up |
( |
const uint8_t |
pin | ) |
|
Enables a pull-up resistor on the selected pin.
- Parameters
-
pin | The pin that you wish to configure. |
◆ watch_get_pin_level()
bool watch_get_pin_level |
( |
const uint8_t |
pin | ) |
|
Gets the level of the selected pin.
- Parameters
-
pin | The pin whose value you wish to read. |
- Returns
- true if the pin was logic high; otherwise, false.
◆ watch_set_pin_level()
void watch_set_pin_level |
( |
const uint8_t |
pin, |
|
|
const bool |
level |
|
) |
| |
Sets the level of the selected pin.
- Parameters
-
pin | The pin whose value you wish to set. |
level | The level you wish to set: true for high, false for low. |