Beispiel #1
0
/**************************************************************************************************
 * @fn      Hal_DriverInit
 *
 * @brief   Initialize HW - These need to be initialized before anyone.
 *
 * @param   task_id - Hal TaskId
 *
 * @return  None
 **************************************************************************************************/
void HalDriverInit (void)
{
    /* VDDMON */
#if (defined HAL_VDDMON) && (HAL_VDDMON == TRUE)
    HalVddMonInit();
#endif

    /* ADC */
#if (defined HAL_ADC) && (HAL_ADC == TRUE)
    HalAdcInit();
#endif

    /* DMA */
#if (defined HAL_DMA) && (HAL_DMA == TRUE)
    // Must be called before the init call to any module that uses DMA.
    HalDmaInit();
#endif

    /* AES */
#if (defined HAL_AES) && (HAL_AES == TRUE)
    HalAesInit();
#endif

    /* LCD */
#if (defined HAL_LCD) && (HAL_LCD == TRUE)
    HalLcdInit();
#endif

    /* LED */
#if (defined HAL_LED) && (HAL_LED == TRUE)
    HalLedInit();
#endif

    /* UART */
#if (defined HAL_UART) && (HAL_UART == TRUE)
    HalUARTInit();
#endif

    /* KEY */
#if (defined HAL_KEY) && (HAL_KEY == TRUE)
    HalKeyInit();
#endif

    /* SPI */
#if (defined HAL_SPI) && (HAL_SPI == TRUE)
    HalSpiInit();
#endif

    /* Buzzer */
#if (defined HAL_BUZZER) && (HAL_BUZZER == TRUE)
    HalBuzzerInit();
#endif

    /* GPIO Debug */
#if (defined HAL_GPIO_DBG) && (HAL_GPIO_DBG == TRUE)
    HalGpioDbgInit();
#endif
}
Beispiel #2
0
/**************************************************************************************************
 * @fn      Hal_DriverInit
 *
 * @brief   Initialize HW - These need to be initialized before anyone.
 *
 * @param   task_id - Hal TaskId
 *
 * @return  None
 **************************************************************************************************/
void HalDriverInit (void)
{
  /* TIMER */
#if (defined HAL_TIMER) && (HAL_TIMER == TRUE)
  #error "The hal timer driver module is removed."
#endif

  /* ADC */
#if (defined HAL_ADC) && (HAL_ADC == TRUE)
  HalAdcInit();
#endif

  /* DMA */
#if (defined HAL_DMA) && (HAL_DMA == TRUE)
  // Must be called before the init call to any module that uses DMA.
  HalDmaInit();
#endif

  /* AES */
#if (defined HAL_AES) && (HAL_AES == TRUE)
  HalAesInit();
#endif

  /* LCD */
#if (defined HAL_LCD) && (HAL_LCD == TRUE)
  HalLcdInit();
#endif

  /* LED */
#if (defined HAL_LED) && (HAL_LED == TRUE)
  HalLedInit();
#endif

  /* UART */
#if (defined HAL_UART) && (HAL_UART == TRUE)
  HalUARTInit();
#endif

  /* KEY */
#if (defined HAL_KEY) && (HAL_KEY == TRUE)
  HalKeyInit();
#endif

  /* SPI */
#if (defined HAL_SPI) && (HAL_SPI == TRUE)
  HalSpiInit();
#endif

  /* HID */
#if (defined HAL_HID) && (HAL_HID == TRUE)
  usbHidInit();
#endif
}
Beispiel #3
0
/**************************************************************************************************
 * @fn      Hal_DriverInit (ªì©l¤ÆµwÅ骺ÅX°Êµ{§Ç, ¨Ï¥ÎªÌ¥i¦b¦¹¨ç¼Æ²K¥[¬ÛÃöµwÅé)
 *
 * @brief   Initialize HW - These need to be initialized before anyone.
 *
 * @param   task_id - Hal TaskId
 *
 * @return  None
 **************************************************************************************************/
void HalDriverInit (void)
{
  /* TIMER */
#if (defined HAL_TIMER) && (HAL_TIMER == TRUE)
  HalTimerInit();
#endif

  /* ADC */
#if (defined HAL_ADC) && (HAL_ADC == TRUE)
  HalAdcInit();
  #if defined(M170)
    M170_Init();
  #endif
#endif

  /* DMA */
#if (defined HAL_DMA) && (HAL_DMA == TRUE)
  // Must be called before the init call to any module that uses DMA.
  HalDmaInit();
#endif

  /* Flash */
#if (defined HAL_FLASH) && (HAL_FLASH == TRUE)
  // Must be called before the init call to any module that uses Flash access or NV.
  HalFlashInit();
#endif

  /* AES */
#if (defined HAL_AES) && (HAL_AES == TRUE)
  HalAesInit();
#endif

  /* LCD */
#if (defined HAL_LCD) && (HAL_LCD == TRUE)
  HalLcdInit();
#endif

  /* UART */
#if (defined HAL_UART) && (HAL_UART == TRUE)
  HalUARTInit();
#endif

  /* KEY */
#if (defined HAL_KEY) && (HAL_KEY == TRUE)
  HalKeyInit();
#endif
  
  /* SPI */
#if (defined HAL_SPI) && (HAL_SPI == TRUE)
  HalSpiInit();
#endif

  /* HID */
#if (defined HAL_HID) && (HAL_HID == TRUE)
  usbHidInit();
#endif
    
  /* KEYPAD */
#if (defined HAL_KEYPAD) && (HAL_KEYPAD == TRUE)
  halKeypadInit();
#endif
  
  /* BUZZER */
#if (defined HAL_BUZZER) && (HAL_BUZZER == TRUE)
  halBuzzerInit();
#endif
  
  /* I2C (M200 module) */
#if (defined HAL_I2C) && (HAL_I2C == TRUE)
  #if defined(M200)
    M200_Init();
  #endif
#endif
    
  /* LED */
#if (defined HAL_LED) && (HAL_LED == TRUE)
  HalLedInit();
#endif
  
}