diff --git a/README.md b/README.md
index 54054ce..4764f77 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
## grblHAL ##
-Latest build date is 20260318, see the [changelog](changelog.md) for details.
+Latest build date is 20260320, see the [changelog](changelog.md) for details.
> [!NOTE]
> A settings reset will be performed on an update of builds prior to 20241208. Backup and restore of settings is recommended.
diff --git a/changelog.md b/changelog.md
index f2349a6..7d10035 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,21 @@
## grblHAL changelog
+Build 20260320
+
+Core:
+
+* Minor bug fix, only relevant when debug output to a dedicated UART is enabled.
+
+Drivers:
+
+* ESP32: fix for incorrect UART buffer flush, TX buffer was emptied when only RX buffer was called for.
+
+* iMXRT1062: added tentative support for THCAD2 ADC to some boards.
+> [!NOTE]
+> Only pin 14 can be used and any low pass filter on that input must be removed since THCAD2 outputs a frequency in the range 100KHz - 1MHz depending on the input voltage.
+
+---
+
Build 20260318
Core:
diff --git a/grbl.h b/grbl.h
index 15b886d..8e6150a 100644
--- a/grbl.h
+++ b/grbl.h
@@ -42,7 +42,7 @@
#else
#define GRBL_VERSION "1.1f"
#endif
-#define GRBL_BUILD 20260318
+#define GRBL_BUILD 20260320
#define GRBL_URL "https://github.com/grblHAL"
diff --git a/stream.c b/stream.c
index 4ad8da7..3f2bc55 100644
--- a/stream.c
+++ b/stream.c
@@ -381,7 +381,7 @@ FLASHMEM static bool stream_select (const io_stream_t *stream, bool add)
} else if(mpg_enable)
task_add_immediate(stream_mpg_set_mode, (void *)1);
- memcpy(&hal.stream, stream, sizeof(io_stream_t));
+ memcpy(&hal.stream, stream, offsetof(io_stream_t, report));
if(stream == usb.stream)
hal.stream.on_linestate_changed = usb.on_linestate_changed;
@@ -713,7 +713,7 @@ FLASHMEM bool stream_mpg_enable (bool on)
hal.stream.reset_read_buffer = mpg.stream.reset_read_buffer;
}
} else if(org_stream.type != StreamType_Redirected) {
- memcpy(&hal.stream, &org_stream, sizeof(io_stream_t));
+ memcpy(&hal.stream, &org_stream, offsetof(io_stream_t, report));
org_stream.type = StreamType_Redirected;
mpg.stream.report.override_counter = mpg.stream.report.wco_counter = 0;
if(hal.stream.disable_rx)
@@ -910,7 +910,7 @@ static bool debug_claim_stream (io_stream_properties_t const *stream)
bool debug_stream_init (void)
{
- if(stream_enumerate_streams(debug_claim_stream))
+ if(stream_enumerate_streams(debug_claim_stream, NULL))
hal.debug.write(ASCII_EOL "UART debug active:" ASCII_EOL);
else
task_run_on_startup(report_warning, "Failed to initialize debug stream!");
diff --git a/stream.h b/stream.h
index bbbba70..76a74dd 100644
--- a/stream.h
+++ b/stream.h
@@ -381,8 +381,8 @@ typedef struct {
set_format_ptr set_format; //!< Optional handler for setting the stream format.
stream_set_direction_ptr set_direction; //!< Optional handler for setting the transfer direction for half-duplex communication.
on_linestate_changed_ptr on_linestate_changed; //!< Optional handler to be called when line state changes. Set by client.
- status_report_tracking_t report; //!< Tracks when to add data to status reports.
vfs_file_t *file; //!< File handle, non-null if streaming from a file.
+ status_report_tracking_t report; //!< Tracks when to add data to status reports.
} io_stream_t;
typedef struct {