Skip to content

Conversation

jmswu
Copy link

@jmswu jmswu commented Aug 28, 2025

subsys: modem:

Add a macro MODEM_CHAT_MATCH_WILDCARD_DEFINE, it's complementary to MODEM_CHAT_MATCH_DEFINE

Example:

MODEM_CHAT_MATCH_DEFINE(ok_match, "OK", "", NULL); MODEM_CHAT_MATCH_WILDCARD_DEFINE(version_match, "\"?.?.?-???\"", "", ublox_match_sw_version_callback);

MODEM_CHAT_SCRIPT_CMDS_DEFINE(script_cmds,
                            MODEM_CHAT_SCRIPT_CMD_RESP("AT", ok_match),
                            MODEM_CHAT_SCRIPT_CMD_RESP("AT+VER?", version_match),
                         );

Old PR for ref: #94992

Signed-off-by: James Wu [email protected]

Add a macro MODEM_CHAT_MATCH_WILDCARD_DEFINE, it's complementary to
MODEM_CHAT_MATCH_DEFINE.

Example:

MODEM_CHAT_MATCH_DEFINE(ok_match, "OK", "", NULL);
MODEM_CHAT_MATCH_WILDCARD_DEFINE(version_match, "\"?.?.?-???", "",
                                 ublox_match_sw_version_callback);

MODEM_CHAT_SCRIPT_CMDS_DEFINE(script_cmds,
                              MODEM_CHAT_SCRIPT_CMD_RESP("AT", ok_match),
                              MODEM_CHAT_SCRIPT_CMD_RESP("AT+VER?",
			                                 version_match));

Signed-off-by: James Wu <[email protected]>
Copy link
Contributor

@tomi-font tomi-font left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You didn't need to close the old PR, though I don't know whether you did that intentionally. Feel free to join the Zephyr Discord and ask for help (for example on #pr-help) if needed.

I force pushed your branch now to fix the commit title/message as well as the alignment on one line.
It shoud now make CI happy.

@tomi-font tomi-font changed the title subsys: modem: add micro MODEM_CHAT_MATCH_WILDCARD_DEFINE subsys: modem: add macro MODEM_CHAT_MATCH_WILDCARD_DEFINE Aug 28, 2025
Copy link

@jmswu
Copy link
Author

jmswu commented Aug 28, 2025

You didn't need to close the old PR, though I don't know whether you did that intentionally. Feel free to join the Zephyr Discord and ask for help (for example on #pr-help) if needed.

I force pushed your branch now to fix the commit title/message as well as the alignment on one line. It shoud now make CI happy.

Thanks for the help, will hit up #pr-help next time. I have no idea why the PR was closed, maybe I hit the wrong button somewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants