mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/pcd8544: replace char by uint8_t for bytes
This commit is contained in:
parent
0911ddfe07
commit
827868a7a0
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user