For developers: added function for getting standardized UART pin descriptions.

This commit is contained in:
Terje Io
2025-10-06 07:44:51 +02:00
parent 132159a6b6
commit 5d48dd5c43
5 changed files with 33 additions and 2 deletions

View File

@@ -1,5 +1,25 @@
## grblHAL changelog
<a name="20251005">Build 20251005
Core:
* For developers: added function for getting standardized UART pin descriptions.
Drivers:
* ESP32, iMXRT1062, RP2040: added optional data to `$PORTS` command.
* STM32F1xx: fixed board map causing compilation errors.
* STM32F4xx: changed code that older compiler used by platformio flagged as invalid.
Plugins:
* WebUI: fix for bad refactor of optional authentication code.
---
<a name="20251003">Build 20251003
Core:
@@ -12,7 +32,7 @@ Core:
Drivers:
* ESP32: workaround for crash on MPG switch input changes. Ref. PR [#179](https://github.com/grblHAL/ESP32/pull/179).
* ESP32: workaround for crash on MPG switch input changes. Ref. PR [#179](https://github.com/grblHAL/ESP32/pull/179).
Added new files to CMakeLists.txt.
---

View File

@@ -170,6 +170,12 @@ const char *xbar_fn_to_pinname (pin_function_t fn)
return name ? name : "N/A";
}
// Only returns description for UART groups
const char *xbar_group_to_description ( pin_group_t group)
{
return group >= PinGroup_UART && group <= PinGroup_UART4 ? (const char * const[]){ "UART1", "UART2", "UART3", "UART4" }[group - PinGroup_UART] : NULL;
}
control_signals_t xbar_fn_to_signals_mask (pin_function_t fn)
{
control_signals_t signals;

View File

@@ -809,6 +809,7 @@ limit_signals_t xbar_get_homing_source (void);
limit_signals_t xbar_get_homing_source_from_cycle (axes_signals_t homing_cycle);
axes_signals_t xbar_fn_to_axismask (pin_function_t id);
const char *xbar_fn_to_pinname (pin_function_t id);
const char *xbar_group_to_description ( pin_group_t group);
control_signals_t xbar_fn_to_signals_mask (pin_function_t id);
#endif

View File

@@ -121,10 +121,14 @@ static vfs_file_t *fs_open (const char *filename, const char *mode)
if((file = calloc(sizeof(vfs_file_t) + sizeof(io_stream_t *), 1))) {
io_stream = &device->io_stream;
#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsizeof-pointer-memaccess"
#endif
memcpy(iostream_ptr((io_stream_t *)&file->handle), &io_stream, sizeof(io_stream_t *));
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
}
}

2
grbl.h
View File

@@ -42,7 +42,7 @@
#else
#define GRBL_VERSION "1.1f"
#endif
#define GRBL_BUILD 20251003
#define GRBL_BUILD 20251005
#define GRBL_URL "https://github.com/grblHAL"