예제 #1
0
static bool ButtonRightPressed(void) {
#if PL_HAS_MP3
  MUSIC_PlayTheme(MUSIC_THEME_WHOSH1);
  FRTOS1_taskYIELD();
#endif
  return EVNT1_GetClearEvent(EVNT1_BTN_LEFT_PRESSED);
}
예제 #2
0
static portTASK_FUNCTION(HostTask, pvParameters) {
  (void)pvParameters; /* not used */
  for(;;) {
    FsMSD1_AppTask();
    CheckStatus();
    FRTOS1_taskYIELD();
    //FRTOS1_vTaskDelay(10/portTICK_RATE_MS);
  }
}
예제 #3
0
파일: Drive.c 프로젝트: sisem/intro
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;
}
예제 #4
0
파일: Drive.c 프로젝트: sisem/intro
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;
}