1
0
Fork 0

Consolidate send_string implementations. (#24817)

This commit is contained in:
Nick Brassel 2025-01-21 08:24:39 +11:00 committed by GitHub
parent 47575d4af1
commit a6a0dc8039
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 64 additions and 102 deletions

View file

@ -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);
/** \} */