MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / modGPIOWrite

Function modGPIOWrite

modules/pins/digital/esp/modGPIO.c:192–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void modGPIOWrite(modGPIOConfiguration config, uint8_t value)
193{
194 if (config->pin < 16) {
195 if (value)
196 GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, 1 << config->pin);
197 else
198 GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, 1 << config->pin);
199 }
200 else if (16 == config->pin) {
201 WRITE_PERI_REG(RTC_GPIO_OUT,
202 (READ_PERI_REG(RTC_GPIO_OUT) & (uint32)0xfffffffe) | (uint32)(value & 1));
203 }
204}

Callers 15

playedBufferFunction · 0.50
audioOutLoopFunction · 0.50
xs_digital_writeFunction · 0.50
xs_digital_static_writeFunction · 0.50
_resetFunction · 0.50
_write_bitFunction · 0.50
_read_bitFunction · 0.50
xs_LightMy92x1Function · 0.50
my92x1PulseFunction · 0.50
my92x1WriteFunction · 0.50
xs_ILI9341Function · 0.50
ili9341EndFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected