Skip to content

Make the CRC Platform Abstraction Layer multi-context-safe#90

Open
parmi93 wants to merge 6 commits into
STMicroelectronics:dev/1.2.0from
parmi93:dev/1.2.0
Open

Make the CRC Platform Abstraction Layer multi-context-safe#90
parmi93 wants to merge 6 commits into
STMicroelectronics:dev/1.2.0from
parmi93:dev/1.2.0

Conversation

@parmi93

@parmi93 parmi93 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor
  • Introduces stse_crc16_context_t struct context.
  • Introduces stse_platform_Crc16_ContextInit() and stse_platform_Crc16_ContextRelease() PAL APIs.
  • Refactors stse_platform_Crc16_Accumulate() PAL API.
  • Removes stse_platform_Crc16_Calculate() PAL API.

These changes resolve issue #65 by allowing users to adapt the CRC16 PAL implementation to scenarios where communication with multiple STSAFE devices takes place concurrently.

Additionally, they make it possible to implement thread-safe CRC16 PAL APIs when CRC computation is performed by a shared hardware peripheral. This ensures that concurrent access from multiple threads can be managed safely, even when those threads are not necessarily communicating with different STSAFE devices.

parmi93 and others added 5 commits May 28, 2026 23:36
Allows users to pass a generic argument (`void *pArg`) to `stse_init()`,
which forwards it to the `stse_platform_xxx_init()` functions. This
enables the porting layer to perform custom initialization based on
the argument's content.
…t to stse_Handle_t

`stse_Handler_t` has been renamed to `stse_Handle_t` to better reflect
its role as a resource/context holder rather than an event handler.

The term "handle" aligns with common conventions (e.g., STM32 HAL) and
avoids confusion with callback or event-handling functions.

This change is purely semantic and does not affect functionality.
Signed-off-by: Benjamin Grolleau <benjamin.grolleau@outlook.com>
Signed-off-by: Benjamin Grolleau <benjamin.grolleau@outlook.com>
@parmi93

parmi93 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

I just realized that this PR targets the main branch instead of dev/1.2.0. I can't find an option to change the target branch on my side, so hopefully one of the maintainers has the necessary permissions to update it.

@nils-cercariolo-st nils-cercariolo-st changed the base branch from main to dev/1.2.0 June 11, 2026 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants