static void L3GD20_init(void) { swTimer_registerOnTimer(&L3GD20_firstInitSensor, 1000, true); //L3GD20_firstInitSensor(); msgPump_registerOnMessage(MSG_ID_GYRO_RAW_DATA, &onNewRawGyroData); }
void blinkRed(uint32_t count) { g_isRedBlinking = true; TIM_CR1(RGB_TIMER) = 0; // stop timer gpio_mode_setup(LED_PORT, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, LED_R_PIN); gpio_mode_setup(LED_PORT, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, LED_G_PIN); gpio_clear(LED_PORT, LED_R_PIN); gpio_clear(LED_PORT, LED_G_PIN); gpio_set(LED_PORT, LED_B_PIN); system_mutex_lock(); g_blinkCount = count; swTimer_registerOnTimer(onBlinkTimer, RGB_BLINK_DELAY_MS, false); system_mutex_unlock(); }
static void led_late_init() { swTimer_registerOnTimer(&onBlinkBlueTimerOn, 1000, false); }
static void onBlinkBlueTimerOn() { // gpio_clear(LED_PORT, LED_B_PIN); swTimer_registerOnTimer(&onBlinkBlueTimerOff, 100, true); }