Skip to content

Commit

Permalink
Fix XON/OFF thresholds to be based off the correct buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed May 23, 2024
1 parent eaa0674 commit 78fb750
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
: Fix XON/OFF thresholds to be based off the correct buffer size

2v22 : Graphics: Ensure floodFill sets modified area correctly
nRF52: Lower expected BLE XTAL accuracy to 50ppm (can improve BLE stability on some Bangle.js 2)
Emulator: force stack alignment of 'data' variable when accessing ArrayBuffers (fix #2463)
Expand Down
10 changes: 5 additions & 5 deletions scripts/build_platform_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
boardname = sys.argv[1]
headerFilename = sys.argv[2]
defines = sys.argv[3:]

print("HEADER_FILENAME "+headerFilename)
print("BOARD "+boardname)
# import the board def
Expand Down Expand Up @@ -379,9 +379,9 @@ def codeOutDevicePins(device, definition_name):
codeOut("");

codeOut("// When to send the message that the IO buffer is getting full")
codeOut("#define IOBUFFER_XOFF ((TXBUFFERMASK)*"+str(xoff_thresh)+"/8)")
codeOut("#define IOBUFFER_XOFF ((IOBUFFERMASK)*"+str(xoff_thresh)+"/8)")
codeOut("// When to send the message that we can start receiving again")
codeOut("#define IOBUFFER_XON ((TXBUFFERMASK)*"+str(xon_thresh)+"/8)")
codeOut("#define IOBUFFER_XON ((IOBUFFERMASK)*"+str(xon_thresh)+"/8)")

codeOut("");

Expand Down Expand Up @@ -526,7 +526,7 @@ def codeOutDevicePins(device, definition_name):
if "DRIVER0" in board.devices:
codeOutDevicePins("DRIVER0", "DRIVER0")
if "DRIVER1" in board.devices:
codeOutDevicePins("DRIVER1", "DRIVER1")
codeOutDevicePins("DRIVER1", "DRIVER1")

if "SPIFLASH" in board.devices:
codeOut("#define SPIFLASH_PAGESIZE 4096")
Expand Down Expand Up @@ -568,7 +568,7 @@ def codeOutDevicePins(device, definition_name):
codeOut("// is ignored and all these defines go on the command line and apply to every file")
codeOut("// whether or not platform_config was included. However if you're viewing a file in")
codeOut("// a code editor like VS Code it'll parse this and should then highlight the correct")
codeOut("// code based on your build")
codeOut("// code based on your build")
for define in defines:
if not define.startswith("-D"):
continue
Expand Down

0 comments on commit 78fb750

Please sign in to comment.