#include "hal_led.h" void LED_AllOff(void) { nrf_gpio_pin_write(LED_RUN,1); nrf_gpio_pin_write(LED_R,1); nrf_gpio_pin_write(LED_G,1); nrf_gpio_pin_write(LED_B,1); } void LED_process(void) { #if DEBUG_LEDRUN static uint32_t tim=0; if(TIME_GetTicks()-tim>=100){ tim = TIME_GetTicks(); uint32_t err = ERR_Get(); if(err==0) nrf_gpio_pin_toggle(LED_RUN); } #endif } void LED_Init(void) { nrf_gpio_cfg_output(LED_RUN); nrf_gpio_pin_write(LED_RUN,1); nrf_gpio_cfg_output(LED_R); nrf_gpio_pin_write(LED_R,1); nrf_gpio_cfg_output(LED_G); nrf_gpio_pin_write(LED_G,1); nrf_gpio_cfg_output(LED_B); nrf_gpio_pin_write(LED_B,1); }