Consolidate send_string implementations. (#24817)
This commit is contained in:
parent
47575d4af1
commit
a6a0dc8039
4 changed files with 64 additions and 102 deletions
|
@ -161,4 +161,12 @@ void send_string_with_delay_P(const char *string, uint8_t interval);
|
|||
*/
|
||||
#define SEND_STRING_DELAY(string, interval) send_string_with_delay_P(PSTR(string), interval)
|
||||
|
||||
/**
|
||||
* \brief Actual implementation function that iterates and sends the string returned by the getter function.
|
||||
*
|
||||
* The getter assumes that the next byte is available to be read, and returns it. `arg` is passed in and can be whatever
|
||||
* makes most sense for the getter -- each invocation of `getter` must advance its position in the source.
|
||||
*/
|
||||
void send_string_with_delay_impl(char (*getter)(void *), void *arg, uint8_t interval);
|
||||
|
||||
/** \} */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue