semantic changes

This commit is contained in:
v01d 2016-08-14 16:22:32 -03:00
parent 02a7fd2430
commit 943c853939

View File

@ -115,22 +115,22 @@ void ssd1306_sendbyte(FAR struct ssd1306_dev_s *priv, uint8_t regval)
void ssd1306_sendblk(FAR struct ssd1306_dev_s *priv, uint8_t *data, uint8_t len) void ssd1306_sendblk(FAR struct ssd1306_dev_s *priv, uint8_t *data, uint8_t len)
{ {
struct i2c_msg_s msg[2]; struct i2c_msg_s msg[2];
uint8_t regaddr; uint8_t transfer_mode;
int ret; int ret;
/* 8-bit data read sequence: /* 8-bit data read sequence:
* *
* Start - I2C_Write_Address - SSD1306_Reg_Address - SSD1306_Write_Data - STOP * Start - I2C_Write_Address - Data transfer select - SSD1306_Write_Data - STOP
*/ */
/* Send the SSD1306 register address */ /* Select data transfer */
regaddr = 0x40; transfer_mode = 0x40;
msg[0].frequency = CONFIG_SSD1306_I2CFREQ; /* I2C frequency */ msg[0].frequency = CONFIG_SSD1306_I2CFREQ; /* I2C frequency */
msg[0].addr = priv->addr; /* 7-bit address */ msg[0].addr = priv->addr; /* 7-bit address */
msg[0].flags = 0; /* Write transaction, beginning with START */ msg[0].flags = 0; /* Write transaction, beginning with START */
msg[0].buffer = &regaddr; /* Transfer from this address */ msg[0].buffer = &transfer_mode; /* Transfer mode send */
msg[0].length = 1; /* Send the one byte register address */ msg[0].length = 1; /* Send the one byte register address */
/* Followed by the SSD1306 write data (with no RESTART) */ /* Followed by the SSD1306 write data (with no RESTART) */