/* : this displays a string on the frame buffer but not refresh  */
void iot_epaper_draw_string(epaper_handle_t dev, int x, int y, const char *text, epaper_font_t *font, int colored)
/* : this displays a string on the frame buffer but not refresh  */
void iot_epaper_draw_string(epaper_handle_t dev, int x, int y, const char *text, epaper_font_t *font, int colored)
{
    const char* p_text = text;
    unsigned int counter = 0;
    int refcolumn = x;
    epaper_dev_t* device = (epaper_dev_t*) dev;
    xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY);
    while (*p_text != 0) {
        iot_epaper_draw_char(dev, refcolumn, y, *p_text, font, colored);
        refcolumn += font->width;
        p_text++;
        counter++;
    }
    xSemaphoreGiveRecursive(device->spi_mux);
}