MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mv_gpio_double_edge_init

Function mv_gpio_double_edge_init

freebsd/arm/mv/gpio.c:604–619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

602}
603
604static void
605mv_gpio_double_edge_init(device_t dev, int pin)
606{
607 uint8_t raw_read;
608 struct mv_gpio_softc *sc;
609 sc = (struct mv_gpio_softc *)device_get_softc(dev);
610
611 MV_GPIO_ASSERT_LOCKED();
612
613 raw_read = (mv_gpio_value_get(dev, pin, 1) ? 1 : 0);
614
615 if (raw_read)
616 mv_gpio_polarity(dev, pin, 1, 0);
617 else
618 mv_gpio_polarity(dev, pin, 0, 0);
619}
620
621static int
622mv_gpio_debounce_setup(device_t dev, int pin)

Callers 1

Calls 3

device_get_softcFunction · 0.85
mv_gpio_value_getFunction · 0.85
mv_gpio_polarityFunction · 0.85

Tested by

no test coverage detected