rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
port_park.h File Reference

A programming port's pin held with no driver (FUNC NONE): an input with its pull-down, so a lead on it reads low rather than floating. More...

#include <stdbool.h>
#include <stdint.h>

Go to the source code of this file.

Functions

bool port_park (uint8_t pin)
 pin as an input with its pull-down.
void port_unpark (uint8_t pin)
 pin let go: an input with no pull, as out_pwm_release() leaves a pin, for whoever takes it next.

Detailed Description

A programming port's pin held with no driver (FUNC NONE): an input with its pull-down, so a lead on it reads low rather than floating.

SPDX-License-Identifier: MIT

Function Documentation

◆ port_park()

bool port_park ( uint8_t pin)

pin as an input with its pull-down.

False for a pin the chip does not have.

Parameters
pinGPIO number of the pin to hold.
Returns
True when the pin was held. False when the chip does not have the pin, and nothing was changed.

◆ port_unpark()

void port_unpark ( uint8_t pin)

pin let go: an input with no pull, as out_pwm_release() leaves a pin, for whoever takes it next.

Parameters
pinGPIO number of the pin to release. A pin the chip does not have is ignored.