コード例 #1
0
ファイル: main.c プロジェクト: DeviationTX/deviation
void Init() {
    PWR_Init();
    LED_Init();
    CLOCK_Init();
    UART_Initialize();
    printf("Start\n");
    Initialize_ButtonMatrix();
    STORAGE_Init();  // This must come before LCD_Init() for 7e

#ifdef MEDIA_DRIVE
    MEDIA_Init();
#endif

    LCD_Init();
    CHAN_Init();

    SPITouch_Init();
    SOUND_Init();
    BACKLIGHT_Init();
    BACKLIGHT_Brightness(1);
    AUTODIMMER_Init();
    STORAGE_WriteEnable(1);  // Enable writing to all banks of storage

    PPMin_TIM_Init();
#ifdef ENABLE_MODULAR
    //Force protocol to none to initialize RAM
    Model.protocol = PROTOCOL_NONE;
    PROTOCOL_Init(1);
#endif
#if HAS_RTC
    RTC_Init();        // Watchdog must be running in case something goes wrong (e.g no crystal)
#endif
}
コード例 #2
0
/**
  * @brief  Initializes a Drive
  * @param  lun : not used
  * @retval DSTATUS: Operation status
  */
DSTATUS PPP_initialize(BYTE lun)
{
  Stat = STA_NOINIT;

  /* Configure the uPPP device */
  if(MEDIA_Init() == PPP_OK)
  {
    Stat &= ~STA_NOINIT;
  }

  return Stat;
}