Skip to content

File wiring_private.h

FileList > arduino > src > wiring > wiring_private.h

Go to the source code of this file.

  • #include <Arduino.h>

Public Functions

Type Name
PinData * pinData (PinInfo * pin)
void pinDisable (PinInfo * pin, uint32_t mask)
void pinEnable (PinInfo * pin, uint32_t mask)
void pinRemoveData (PinInfo * pin)

Macros

Type Name
define pinCheckGetData (pinNumber, mask, ret)
define pinCheckGetInfo (pinNumber, mask, ret)
define pinIsInput (pin, data) (pinEnabled(pin, PIN_GPIO) && (data->gpioMode ^ 0b101) > 4)
define pinIsOutput (pin, data) (pinEnabled(pin, PIN_GPIO) && (data->gpioMode ^ 0b101) < 5)
define pinSetInputMode (pin, data, pinNumber)
define pinSetOutputPull (pin, data, pinNumber, status)

Public Functions Documentation

function pinData

PinData * pinData (
    PinInfo * pin
) 

function pinDisable

inline void pinDisable (
    PinInfo * pin,
    uint32_t mask
) 

function pinEnable

inline void pinEnable (
    PinInfo * pin,
    uint32_t mask
) 

function pinRemoveData

void pinRemoveData (
    PinInfo * pin
) 

Macro Definition Documentation

define pinCheckGetData

#define pinCheckGetData (
    pinNumber,
    mask,
    ret
) PinInfo *pin = pinInfo(pinNumber);                                                                                 \
    if (!pin)                                                                                                          \
        return ret;                                                                                                    \
    if (!pinSupported(pin, mask))                                                                                      \
        return ret;                                                                                                    \
    PinData *data = pinData(pin);

define pinCheckGetInfo

#define pinCheckGetInfo (
    pinNumber,
    mask,
    ret
) PinInfo *pin = pinInfo(pinNumber);                                                                                 \
    if (!pin)                                                                                                          \
        return ret;                                                                                                    \
    if (!pinSupported(pin, mask))                                                                                      \
        return ret;

define pinIsInput

#define pinIsInput (
    pin,
    data
) (pinEnabled(pin, PIN_GPIO) && (data->gpioMode ^ 0b101) > 4)

define pinIsOutput

#define pinIsOutput (
    pin,
    data
) (pinEnabled(pin, PIN_GPIO) && (data->gpioMode ^ 0b101) < 5)

define pinSetInputMode

#define pinSetInputMode (
    pin,
    data,
    pinNumber
) do {                                                                                                               \
        if (!pinIsInput(pin, data))                                                                                    \
            pinMode(pinNumber, INPUT);                                                                                 \
    } while (0);

define pinSetOutputPull

#define pinSetOutputPull (
    pin,
    data,
    pinNumber,
    status
) do {                                                                                                               \
        if (!pinIsOutput(pin, data)) {                                                                                 \
            pinMode(pinNumber, INPUT_PULLDOWN ^ !!status);                                                             \
            return;                                                                                                    \
        }                                                                                                              \
    } while (0);

The documentation for this class was generated from the following file cores/common/arduino/src/wiring/wiring_private.h