Lines Matching refs:sc

117   struct gpiote_ch_status_t *sc = &gpiote_st[inst].gpiote_ch_status[n];  in nrf_gpiote_TASKS_OUT()  local
118 if (sc->mode != GPIOTE_CONFIG_MODE_Task) { in nrf_gpiote_TASKS_OUT()
121 switch (sc->polarity) { in nrf_gpiote_TASKS_OUT()
125 sc->level = true; in nrf_gpiote_TASKS_OUT()
128 sc->level = false; in nrf_gpiote_TASKS_OUT()
131 sc->level = !sc->level; in nrf_gpiote_TASKS_OUT()
138 nrf_gpio_peri_change_output(sc->port, sc->pin, sc->level); in nrf_gpiote_TASKS_OUT()
142 struct gpiote_ch_status_t *sc = &gpiote_st[inst].gpiote_ch_status[n]; in nrf_gpiote_TASKS_SET() local
143 if (sc->mode != GPIOTE_CONFIG_MODE_Task) { in nrf_gpiote_TASKS_SET()
146 sc->level = true; in nrf_gpiote_TASKS_SET()
148 nrf_gpio_peri_change_output(sc->port, sc->pin, sc->level); in nrf_gpiote_TASKS_SET()
152 struct gpiote_ch_status_t *sc = &gpiote_st[inst].gpiote_ch_status[n]; in nrf_gpiote_TASKS_CLR() local
153 if (sc->mode != GPIOTE_CONFIG_MODE_Task) { in nrf_gpiote_TASKS_CLR()
156 sc->level = false; in nrf_gpiote_TASKS_CLR()
158 nrf_gpio_peri_change_output(sc->port, sc->pin, sc->level); in nrf_gpiote_TASKS_CLR()
244 struct gpiote_ch_status_t *sc; in nrf_gpiote_input_change_ntf() local
247 sc = &gpiote_st[inst].gpiote_ch_status[ch_n]; in nrf_gpiote_input_change_ntf()
249 switch (sc->polarity) { in nrf_gpiote_input_change_ntf()
253 if ((sc->level == false) && (value == true)) { in nrf_gpiote_input_change_ntf()
258 if ((sc->level == true) && (value == false)) { in nrf_gpiote_input_change_ntf()
263 if (sc->level != value) { in nrf_gpiote_input_change_ntf()
271 sc->level = value; in nrf_gpiote_input_change_ntf()
346 struct gpiote_ch_status_t *sc = &gpiote_st[inst].gpiote_ch_status[ch_n]; in nrf_gpiote_regw_sideeffects_CONFIG() local
363 if ((port != sc->port) || (pin != sc->pin) in nrf_gpiote_regw_sideeffects_CONFIG()
364 || (mode == GPIOTE_CONFIG_MODE_Disabled && sc->mode != GPIOTE_CONFIG_MODE_Disabled)) { in nrf_gpiote_regw_sideeffects_CONFIG()
366 nrf_gpio_peri_pin_control(sc->port, sc->pin, 0, 0, 0, NULL, NULL, -1); in nrf_gpiote_regw_sideeffects_CONFIG()
369 sc->mode = mode; in nrf_gpiote_regw_sideeffects_CONFIG()
370 sc->pin = pin; in nrf_gpiote_regw_sideeffects_CONFIG()
371 sc->port = port; in nrf_gpiote_regw_sideeffects_CONFIG()
372 sc->polarity = polarity; in nrf_gpiote_regw_sideeffects_CONFIG()
375 sc->level = nrf_gpio_get_pin_level(port, pin); in nrf_gpiote_regw_sideeffects_CONFIG()
379 sc->level = outinit; in nrf_gpiote_regw_sideeffects_CONFIG()