You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/11/06 13:40:26 UTC

[GitHub] kasjer commented on a change in pull request #1505: hw/drivers: Add display driver SSD1673

kasjer commented on a change in pull request #1505: hw/drivers: Add display driver SSD1673
URL: https://github.com/apache/mynewt-core/pull/1505#discussion_r231124050
 
 

 ##########
 File path: hw/drivers/display/ssd1673/src/ssd1673.c
 ##########
 @@ -298,36 +306,40 @@ static int ssd1673_write(const struct device *dev, const u16_t x,
 		return -1;
 	}
 
-	gpio_pin_write(driver->dc, CONFIG_SSD1673_DC_PIN, 0);
-	if (spi_write(driver->spi_dev, &driver->spi_config, &buf_set)) {
+	hal_gpio_write(CONFIG_SSD1673_DC_PIN, 0);
+	hal_gpio_write(CONFIG_SSD1673_CS_PIN, 0);
+
+	if (hal_spi_txrx(CONFIG_SSD1673_SPI_DEV, &cmd, NULL, sizeof(cmd))) {
+		hal_gpio_write(CONFIG_SSD1673_CS_PIN, 1);
 		return -1;
 	}
 
-	gpio_pin_write(driver->dc, CONFIG_SSD1673_DC_PIN, 1);
+	hal_gpio_write(CONFIG_SSD1673_DC_PIN, 1);
 	/* clear unusable page */
 	if (driver->scan_mode == SSD1673_DATA_ENTRY_XDYIY) {
-		sbuf.buf = dummy_page;
-		sbuf.len = sizeof(dummy_page);
-		if (spi_write(driver->spi_dev, &driver->spi_config, &buf_set)) {
+		if (hal_spi_txrx(CONFIG_SSD1673_SPI_DEV, &dummy_page,
 
 Review comment:
   usually & is not added in this type of usage

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services