Documentation fixes and additions#373
Merged
Merged
Conversation
- core_mqtt.h: fix MQTT_InitRetransmits example (remove phantom publishClearAllCallback so example matches the 3-callback signature); fix MQTT_InitStatefulQoS docstring (@p pBuffer -> @p pAckPropsBuf); complete the truncated MQTTStatusNotConnected return-value sentence in MQTT_CheckConnectStatus. - Replace C99 compound literals (&(uint8_t){ MQTT_PACKET_TYPE_* }) in all doc examples with the C90-compatible MQTT_PROP_VALIDATE_* macros across core_mqtt.h (5), core_mqtt_serializer.h (1), MigrationGuide.md (26), and MQTTv5Guide.md (9). The one PUBREL case, which has no matching MQTT_PROP_VALIDATE_* macro, uses MQTT_PROP_NO_VALIDATE. - README.md: add Thread Safety section documenting the MQTT_PRE_STATE_UPDATE_HOOK / MQTT_POST_STATE_UPDATE_HOOK extension points, with a non-recursive FreeRTOS mutex example (verified: the library does not re-enter a hook-protected region). - core_mqtt_serializer.h: add an explanatory comment block above the MQTT_PACKET_TYPE_*_VAL file-scope statics explaining why they exist and why the MISRA C:2012 Rule 2.2 / 2.8 deviations are accepted (macros cannot be addressed, MQTT_PROP_VALIDATE_* needs a typed const uint8_t *). - Add source/include/core_mqtt_config_template.h: a commented-out starter template users can copy as core_mqtt_config.h, covering every tunable documented in core_mqtt_config_defaults.h plus the thread-safety hooks.
7bc9f70 to
4da631f
Compare
archigup
approved these changes
May 6, 2026
patrzhan
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
core_mqtt.h: fix MQTT_InitRetransmits example (remove phantom publishClearAllCallback so example matches the 3-callback signature); fix MQTT_InitStatefulQoS docstring (@p pBuffer -> @p pAckPropsBuf); complete the truncated MQTTStatusNotConnected return-value sentence in MQTT_CheckConnectStatus.
Replace C99 compound literals (&(uint8_t){ MQTT_PACKET_TYPE_* }) in all doc examples with the C90-compatible MQTT_PROP_VALIDATE_* macros across core_mqtt.h (5), core_mqtt_serializer.h (1), MigrationGuide.md (26), and MQTTv5Guide.md (9). The one PUBREL case, which has no matching MQTT_PROP_VALIDATE_* macro, uses MQTT_PROP_NO_VALIDATE.
README.md: add Thread Safety section documenting the MQTT_PRE_STATE_UPDATE_HOOK / MQTT_POST_STATE_UPDATE_HOOK extension points, with a non-recursive FreeRTOS mutex example (verified: the library does not re-enter a hook-protected region).
core_mqtt_serializer.h: add an explanatory comment block above the MQTT_PACKET_TYPE_VAL file-scope statics explaining why they exist and why the MISRA C:2012 Rule 2.2 / 2.8 deviations are accepted (macros cannot be addressed, MQTT_PROP_VALIDATE needs a typed const uint8_t *).
Add source/include/core_mqtt_config_template.h: a commented-out starter template users can copy as core_mqtt_config.h, covering every tunable documented in core_mqtt_config_defaults.h plus the thread-safety hooks.
Description
Test Steps
Checklist:
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.