Skip to content

Commit ab00842

Browse files
Bjarki AAcarlescufi
authored andcommitted
drivers/modem: add user_data to modem_cmd_handler_data
added user_data field to modem_cmd_handler_data this allows for multiple instances of modem drivers which use the modem cmd handler. currently, the only identifiable parameter passed to the modem command handlers is the modem_cmd_handler_data struct. The added user_data variable allows for the a modem driver to pass its dev or data pointer to the modem_cmd_handler_data struct to be retrieved from within the modem command callbacks. Signed-off-by: Bjarki AA <[email protected]>
1 parent b26ea8b commit ab00842

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/modem/modem_cmd_handler.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ struct modem_cmd_handler_data {
118118
/* locks */
119119
struct k_sem sem_tx_lock;
120120
struct k_sem sem_parse_lock;
121+
122+
/* user data */
123+
void *user_data;
121124
};
122125

123126
/**

0 commit comments

Comments
 (0)