From 3cccdba575b4f80e3e8a8f09d1d4b57c59a18cc1 Mon Sep 17 00:00:00 2001 From: Roy_01 Date: Wed, 30 Oct 2024 14:02:38 +0800 Subject: [PATCH] =?UTF-8?q?updated:=20idle=E8=A8=8A=E8=99=9F=E6=94=B9?= =?UTF-8?q?=E6=88=90highZ=E8=A8=8A=E8=99=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cpg11_io.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cpg11_io.c b/cpg11_io.c index 10918c3..aa83850 100644 --- a/cpg11_io.c +++ b/cpg11_io.c @@ -145,9 +145,9 @@ void cpg11_pulse_start(uint32_t hw_idx, pulse_gen_t *p_pulse_gen) nrf_gpiote_task_disable(pulse_gen_hw[hw_idx].gpiote_idx[2]); nrf_gpiote_task_disable(pulse_gen_hw[hw_idx].gpiote_idx[3]); - nrf_gpiote_task_configure(pulse_gen_hw[hw_idx].gpiote_idx[0], p_pulse_gen->VBxH, NRF_GPIOTE_POLARITY_TOGGLE, NRF_GPIOTE_INITIAL_VALUE_HIGH); + nrf_gpiote_task_configure(pulse_gen_hw[hw_idx].gpiote_idx[0], p_pulse_gen->VAxH, NRF_GPIOTE_POLARITY_TOGGLE, NRF_GPIOTE_INITIAL_VALUE_LOW); nrf_gpiote_task_configure(pulse_gen_hw[hw_idx].gpiote_idx[1], p_pulse_gen->VBxL, NRF_GPIOTE_POLARITY_TOGGLE, NRF_GPIOTE_INITIAL_VALUE_LOW); - nrf_gpiote_task_configure(pulse_gen_hw[hw_idx].gpiote_idx[2], p_pulse_gen->VAxH, NRF_GPIOTE_POLARITY_TOGGLE, NRF_GPIOTE_INITIAL_VALUE_HIGH); + nrf_gpiote_task_configure(pulse_gen_hw[hw_idx].gpiote_idx[2], p_pulse_gen->VBxH, NRF_GPIOTE_POLARITY_TOGGLE, NRF_GPIOTE_INITIAL_VALUE_LOW); nrf_gpiote_task_configure(pulse_gen_hw[hw_idx].gpiote_idx[3], p_pulse_gen->VAxL, NRF_GPIOTE_POLARITY_TOGGLE, NRF_GPIOTE_INITIAL_VALUE_LOW); nrf_gpiote_task_enable(pulse_gen_hw[hw_idx].gpiote_idx[0]); @@ -322,33 +322,33 @@ void cpg_pulse_default_demo_ext(void) if(e1) { nrf_gpio_pin_clear(p_pulse_genA[0].VBxL); - nrf_gpio_pin_set(p_pulse_genA[0].VBxH); + nrf_gpio_pin_clear(p_pulse_genA[0].VBxH); nrf_gpio_pin_clear(p_pulse_genA[0].VAxL); - nrf_gpio_pin_set(p_pulse_genA[0].VAxH); + nrf_gpio_pin_clear(p_pulse_genA[0].VAxH); } if(e2) { nrf_gpio_pin_clear(p_pulse_genA[1].VBxL); - nrf_gpio_pin_set(p_pulse_genA[1].VBxH); + nrf_gpio_pin_clear(p_pulse_genA[1].VBxH); nrf_gpio_pin_clear(p_pulse_genA[1].VAxL); - nrf_gpio_pin_set(p_pulse_genA[1].VAxH); + nrf_gpio_pin_clear(p_pulse_genA[1].VAxH); } if(e3) { nrf_gpio_pin_clear(p_pulse_genB[0].VBxL); - nrf_gpio_pin_set(p_pulse_genB[0].VBxH); + nrf_gpio_pin_clear(p_pulse_genB[0].VBxH); nrf_gpio_pin_clear(p_pulse_genB[0].VAxL); - nrf_gpio_pin_set(p_pulse_genB[0].VAxH); + nrf_gpio_pin_clear(p_pulse_genB[0].VAxH); } if(e4) { nrf_gpio_pin_clear(p_pulse_genB[1].VBxL); - nrf_gpio_pin_set(p_pulse_genB[1].VBxH); + nrf_gpio_pin_clear(p_pulse_genB[1].VBxH); nrf_gpio_pin_clear(p_pulse_genB[1].VAxL); - nrf_gpio_pin_set(p_pulse_genB[1].VAxH); + nrf_gpio_pin_clear(p_pulse_genB[1].VAxH); }