diff --git a/drivers/include/pcd8544.h b/drivers/include/pcd8544.h index d8733d7382..1428ee29d6 100644 --- a/drivers/include/pcd8544.h +++ b/drivers/include/pcd8544.h @@ -118,9 +118,9 @@ void pcd8544_set_bias(const pcd8544_t *dev, uint8_t bias); * datasheet. * * @param[in] dev device descriptor of display to use - * @param[in] img char array with image data (must be of size := 504) + * @param[in] img uint8_t array with image data (must be of size := 504) */ -void pcd8544_write_img(const pcd8544_t *dev, const char img[]); +void pcd8544_write_img(const pcd8544_t *dev, const uint8_t img[]); /** * @brief Write a single ASCII character to the display diff --git a/drivers/pcd8544/pcd8544.c b/drivers/pcd8544/pcd8544.c index e018df3226..0b545dbaa1 100644 --- a/drivers/pcd8544/pcd8544.c +++ b/drivers/pcd8544/pcd8544.c @@ -133,7 +133,7 @@ static const uint8_t _ascii[][5] = { {0x10, 0x08, 0x08, 0x10, 0x08},/* 7e ~ */ }; -static const char _riot[] = { +static const uint8_t _riot[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -209,12 +209,12 @@ static inline void done(const pcd8544_t *dev) spi_release(dev->spi); } -static void _write(const pcd8544_t *dev, uint8_t is_data, char data) +static void _write(const pcd8544_t *dev, uint8_t is_data, uint8_t data) { /* set command or data mode */ gpio_write(dev->mode, is_data); /* write byte to LCD */ - spi_transfer_bytes(dev->spi, dev->cs, false, (uint8_t *)&data, NULL, 1); + spi_transfer_bytes(dev->spi, dev->cs, false, &data, NULL, 1); } static inline void _set_x(const pcd8544_t *dev, uint8_t x) @@ -307,7 +307,7 @@ void pcd8544_riot(const pcd8544_t *dev) pcd8544_write_img(dev, _riot); } -void pcd8544_write_img(const pcd8544_t *dev, const char img[]) +void pcd8544_write_img(const pcd8544_t *dev, const uint8_t img[]) { /* set initial position */ lock(dev);