SConscript 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. from building import *
  2. src = []
  3. cwd = GetCurrentDir()
  4. include_path = [cwd]
  5. # add kernel samples.
  6. if GetDepend('PERIPHERAL_SAMPLES_USING_ADC'):
  7. src += ['adc_vol_sample.c']
  8. if GetDepend('PERIPHERAL_SAMPLES_USING_HWTIMER'):
  9. src += ['hwtimer_sample.c']
  10. if GetDepend('PERIPHERAL_SAMPLES_USING_I2C'):
  11. src += ['i2c_aht10_sample.c']
  12. if GetDepend('PERIPHERAL_SAMPLES_USING_IWDG'):
  13. src += ['iwdg_sample.c']
  14. if GetDepend('PERIPHERAL_SAMPLES_USING_LED_BLINK'):
  15. src += ['led_blink_sample.c']
  16. if GetDepend('PERIPHERAL_SAMPLES_USING_PIN'):
  17. src += Glob('pin_beep_sample.c')
  18. if GetDepend('PERIPHERAL_SAMPLES_USING_PWM'):
  19. src += ['pwm_led_sample.c']
  20. if GetDepend('PERIPHERAL_SAMPLES_USING_RTC'):
  21. src += ['rtc_sample.c']
  22. if GetDepend('PERIPHERAL_SAMPLES_USING_SD'):
  23. src += ['sd_sample.c']
  24. if GetDepend('PERIPHERAL_SAMPLES_USING_SERIAL'):
  25. src += Glob('uart_sample.c')
  26. if GetDepend('PERIPHERAL_SAMPLES_USING_SPI'):
  27. src += Glob('spi_w25q_sample.c')
  28. group = DefineGroup('peripheral-samples', src, depend = ['PKG_USING_PERIPHERAL_SAMPLES'], CPPPATH = include_path)
  29. Return('group')