static bool ButtonRightPressed(void) { #if PL_HAS_MP3 MUSIC_PlayTheme(MUSIC_THEME_WHOSH1); FRTOS1_taskYIELD(); #endif return EVNT1_GetClearEvent(EVNT1_BTN_LEFT_PRESSED); }
static portTASK_FUNCTION(HostTask, pvParameters) { (void)pvParameters; /* not used */ for(;;) { FsMSD1_AppTask(); CheckStatus(); FRTOS1_taskYIELD(); //FRTOS1_vTaskDelay(10/portTICK_RATE_MS); } }
uint8_t DRV_SetMode(DRV_Mode mode) { DRV_Command cmd; cmd.cmd = DRV_SET_MODE; cmd.u.mode = mode; if (FRTOS1_xQueueSendToBack(DRV_Queue, &cmd, portMAX_DELAY)!=pdPASS) { return ERR_FAILED; } FRTOS1_taskYIELD(); /* yield so drive task has a chance to read message */ return ERR_OK; }
uint8_t DRV_SetPos(int32_t left, int32_t right) { DRV_Command cmd; cmd.cmd = DRV_SET_POS; cmd.u.pos.left = left; cmd.u.pos.right = right; if (FRTOS1_xQueueSendToBack(DRV_Queue, &cmd, portMAX_DELAY)!=pdPASS) { return ERR_FAILED; } FRTOS1_taskYIELD(); /* yield so drive task has a chance to read message */ return ERR_OK; }