Esempio n. 1
0
/* ===================================================================*/
void LDD_SetClockConfiguration(LDD_TClockConfiguration ClockConfiguration)
{
  /* Component TU1 (TimerUnit_LDD). */
  if (PE_LDD_DeviceDataList[PE_LDD_COMPONENT_TU1_ID] != NULL) {
    TU1_SetClockConfiguration(PE_LDD_DeviceDataList[PE_LDD_COMPONENT_TU1_ID], ClockConfiguration);
  }
  /* Component TimerIntLdd1 (TimerInt_LDD). */
  if (PE_LDD_DeviceDataList[PE_LDD_COMPONENT_TimerIntLdd1_ID] != NULL) {
    TimerIntLdd1_SetClockConfiguration(PE_LDD_DeviceDataList[PE_LDD_COMPONENT_TimerIntLdd1_ID], ClockConfiguration);
  }
  /* Component AS1 (Serial_LDD). */
  if (PE_LDD_DeviceDataList[PE_LDD_COMPONENT_AS1_ID] != NULL) {
    AS1_SetClockConfiguration(PE_LDD_DeviceDataList[PE_LDD_COMPONENT_AS1_ID], ClockConfiguration);
  }
}
Esempio n. 2
0
/* ===================================================================*/
void LDD_SetClockConfiguration(LDD_TClockConfiguration ClockConfiguration)
{
  /* Component RTC (LDD_RTC). */
  if (PE_LDD_DeviceDataList[PE_LDD_COMPONENT_RTC_ID] != NULL) {
    RTC_SetClockConfiguration(PE_LDD_DeviceDataList[PE_LDD_COMPONENT_RTC_ID], ClockConfiguration);
  }
  /* Component TU1 (TimerUnit_LDD). */
  if (PE_LDD_DeviceDataList[PE_LDD_COMPONENT_TU1_ID] != NULL) {
    TU1_SetClockConfiguration(PE_LDD_DeviceDataList[PE_LDD_COMPONENT_TU1_ID], ClockConfiguration);
  }
  /* Component TimerMillis (TimerInt_LDD). */
  if (PE_LDD_DeviceDataList[PE_LDD_COMPONENT_TimerMillis_ID] != NULL) {
    TimerMillis_SetClockConfiguration(PE_LDD_DeviceDataList[PE_LDD_COMPONENT_TimerMillis_ID], ClockConfiguration);
  }
  /* Component ASerialLdd1 (Serial_LDD). */
  if (PE_LDD_DeviceDataList[PE_LDD_COMPONENT_ASerialLdd1_ID] != NULL) {
    ASerialLdd1_SetClockConfiguration(PE_LDD_DeviceDataList[PE_LDD_COMPONENT_ASerialLdd1_ID], ClockConfiguration);
  }
  /* Component IntFlashLdd1 (LDD_FLASH_Polling). */
  if (PE_LDD_DeviceDataList[PE_LDD_COMPONENT_IntFlashLdd1_ID] != NULL) {
    IntFlashLdd1_SetClockConfiguration(PE_LDD_DeviceDataList[PE_LDD_COMPONENT_IntFlashLdd1_ID], ClockConfiguration);
  }
  /* Component SPI_ADC (SPIMaster_LDD). */
  if (PE_LDD_DeviceDataList[PE_LDD_COMPONENT_SPI_ADC_ID] != NULL) {
    SPI_ADC_SetClockConfiguration(PE_LDD_DeviceDataList[PE_LDD_COMPONENT_SPI_ADC_ID], ClockConfiguration);
  }
  /* Component AdcLdd1 (ADC_LDD). */
  if (PE_LDD_DeviceDataList[PE_LDD_COMPONENT_AdcLdd1_ID] != NULL) {
    AdcLdd1_SetClockConfiguration(PE_LDD_DeviceDataList[PE_LDD_COMPONENT_AdcLdd1_ID], ClockConfiguration);
  }
  /* Component SPI_SD (SPIMaster_LDD). */
  if (PE_LDD_DeviceDataList[PE_LDD_COMPONENT_SPI_SD_ID] != NULL) {
    SPI_SD_SetClockConfiguration(PE_LDD_DeviceDataList[PE_LDD_COMPONENT_SPI_SD_ID], ClockConfiguration);
  }
  UART_SetClockConfiguration(ClockConfiguration);
  ADC_Accel_SetClockConfiguration(ClockConfiguration);
}