SAMD21_minitronics20.py 502 B

123456789101112131415161718
  1. #
  2. # SAMD21_minitronics20.py
  3. # Customizations for env:SAMD21_minitronics20
  4. #
  5. import pioutil
  6. if pioutil.is_pio_build():
  7. from os.path import join, isfile
  8. import shutil
  9. env = pioutil.env
  10. mf = env["MARLIN_FEATURES"]
  11. rxBuf = mf["RX_BUFFER_SIZE"] if "RX_BUFFER_SIZE" in mf else "0"
  12. txBuf = mf["TX_BUFFER_SIZE"] if "TX_BUFFER_SIZE" in mf else "0"
  13. serialBuf = str(max(int(rxBuf), int(txBuf), 350))
  14. build_flags = env.get('BUILD_FLAGS')
  15. env.Replace(BUILD_FLAGS=build_flags)