/* : this draws a horizontal line on the frame buffer  */
void iot_epaper_draw_horizontal_line(epaper_handle_t dev, int x, int y, int width, int colored)
/* : this draws a horizontal line on the frame buffer  */
void iot_epaper_draw_horizontal_line(epaper_handle_t dev, int x, int y, int width, int colored)
{
    int i;
    epaper_dev_t* device = (epaper_dev_t*) dev;
    xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY);
    for (i = x; i < x + width; i++) {
        iot_epaper_draw_pixel(dev, i, y, colored);
    }
    xSemaphoreGiveRecursive(device->spi_mux);
}