1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-29 23:07:42 +00:00

[SAMD51] Respect serial buffer size (#21194)

This commit is contained in:
Giuliano Zaro 2021-02-28 05:41:16 +01:00 committed by GitHub
parent 903d0b91fc
commit 254b25296b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#
# SAMD51_grandcentral_m4.py
# Customizations for env:SAMD51_grandcentral_m4
#
from os.path import join, isfile
import shutil
from pprint import pprint
Import("env")
rxBuf = env["MARLIN_FEATURES"]["RX_BUFFER_SIZE"] if "RX_BUFFER_SIZE" in env["MARLIN_FEATURES"] else "0"
txBuf = env["MARLIN_FEATURES"]["TX_BUFFER_SIZE"] if "TX_BUFFER_SIZE" in env["MARLIN_FEATURES"] else "0"
serialBuf = str(max(int(rxBuf), int(txBuf), 350))
build_flags = env.get('BUILD_FLAGS')
build_flags.append("-DSERIAL_BUFFER_SIZE=" + serialBuf)
env.Replace(BUILD_FLAGS=build_flags)

View File

@ -681,6 +681,8 @@ src_filter = ${common.default_src_filter} +<src/HAL/SAMD51>
lib_deps = ${common.lib_deps}
SoftwareSerialM
Adafruit SPIFlash
extra_scripts = ${common.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/SAMD51_grandcentral_m4.py
custom_marlin.SDSUPPORT = SdFat - Adafruit Fork
debug_tool = jlink