MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / configureWithPinBitmask

Function configureWithPinBitmask

Tactility/Source/hal/gpio/Gpio.cpp:57–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57bool configureWithPinBitmask(uint64_t pinBitMask, Mode mode, bool pullUp, bool pullDown) {
58#ifdef ESP_PLATFORM
59 gpio_config_t sd_gpio_config = {
60 .pin_bit_mask = pinBitMask,
61 .mode = toEspGpioMode(mode),
62 .pull_up_en = pullUp ? GPIO_PULLUP_ENABLE : GPIO_PULLUP_DISABLE,
63 .pull_down_en = pullDown ? GPIO_PULLDOWN_ENABLE : GPIO_PULLDOWN_DISABLE,
64 .intr_type = GPIO_INTR_DISABLE,
65 };
66 return gpio_config(&sd_gpio_config) == ESP_OK;
67#else
68 return true;
69#endif
70}
71
72bool configure(Pin pin, Mode mode, bool pullUp, bool pullDown) {
73#ifdef ESP_PLATFORM

Callers 1

configureFunction · 0.85

Calls 1

toEspGpioModeFunction · 0.85

Tested by

no test coverage detected