From b4d53ad560646d127a558059d9a43b5d322af216 Mon Sep 17 00:00:00 2001 From: Glenn Ruben Bakke Date: Thu, 26 Jan 2017 22:08:39 +0100 Subject: [PATCH] nrf5/drivers: Updating display objects to use new SPI pin configuration in print function. --- nrf5/drivers/display/epaper_sld00200p_obj.c | 14 +++++++------- nrf5/drivers/display/lcd_ili9341_obj.c | 13 ++++++------- nrf5/drivers/display/lcd_ls0xxb7dxxx_obj.c | 9 ++++----- nrf5/drivers/display/oled_ssd1305_obj.c | 13 ++++++------- nrf5/drivers/display/oled_ssd1306_obj.c | 13 ++++++------- 5 files changed, 29 insertions(+), 33 deletions(-) diff --git a/nrf5/drivers/display/epaper_sld00200p_obj.c b/nrf5/drivers/display/epaper_sld00200p_obj.c index b2d02c4375..df2d5d6d98 100644 --- a/nrf5/drivers/display/epaper_sld00200p_obj.c +++ b/nrf5/drivers/display/epaper_sld00200p_obj.c @@ -84,13 +84,13 @@ STATIC void epaper_sld00200_print(const mp_print_t *print, mp_obj_t o, mp_print_ epaper_sld00200p_obj_t *self = o; mp_printf(print, "SLD00200(SPI(mosi=(port=%u, pin=%u), miso=(port=%u, pin=%u), clk=(port=%u, pin=%u)),\n", - self->spi->pyb->spi->init.mosi_pin_port, - self->spi->pyb->spi->init.mosi_pin, - self->spi->pyb->spi->init.miso_pin_port, - self->spi->pyb->spi->init.miso_pin, - self->spi->pyb->spi->init.clk_pin_port, - self->spi->pyb->spi->init.clk_pin - ); + self->spi->pyb->spi->init.mosi_pin->port, + self->spi->pyb->spi->init.mosi_pin->pin, + self->spi->pyb->spi->init.miso_pin->port, + self->spi->pyb->spi->init.miso_pin->pin, + self->spi->pyb->spi->init.clk_pin->port, + self->spi->pyb->spi->init.clk_pin->pin); + mp_printf(print, " PWM(pwm_pin=%u),\n", self->pwm->pyb->pwm->init.pwm_pin); diff --git a/nrf5/drivers/display/lcd_ili9341_obj.c b/nrf5/drivers/display/lcd_ili9341_obj.c index facd8b8728..968b3bf858 100644 --- a/nrf5/drivers/display/lcd_ili9341_obj.c +++ b/nrf5/drivers/display/lcd_ili9341_obj.c @@ -74,13 +74,12 @@ STATIC void lcd_ili9341_print(const mp_print_t *print, mp_obj_t o, mp_print_kind lcd_ili9341_obj_t *self = o; mp_printf(print, "ILI9341(SPI(mosi=(port=%u, pin=%u), miso=(port=%u, pin=%u), clk=(port=%u, pin=%u)),\n", - self->spi->pyb->spi->init.mosi_pin_port, - self->spi->pyb->spi->init.mosi_pin, - self->spi->pyb->spi->init.miso_pin_port, - self->spi->pyb->spi->init.miso_pin, - self->spi->pyb->spi->init.clk_pin_port, - self->spi->pyb->spi->init.clk_pin - ); + self->spi->pyb->spi->init.mosi_pin->port, + self->spi->pyb->spi->init.mosi_pin->pin, + self->spi->pyb->spi->init.miso_pin->port, + self->spi->pyb->spi->init.miso_pin->pin, + self->spi->pyb->spi->init.clk_pin->port, + self->spi->pyb->spi->init.clk_pin->pin); mp_printf(print, " cs=(port=%u, pin=%u), dc=(port=%u, pin=%u),\n", self->pin_cs->port, diff --git a/nrf5/drivers/display/lcd_ls0xxb7dxxx_obj.c b/nrf5/drivers/display/lcd_ls0xxb7dxxx_obj.c index 63a48eb3d1..afbc1f6203 100644 --- a/nrf5/drivers/display/lcd_ls0xxb7dxxx_obj.c +++ b/nrf5/drivers/display/lcd_ls0xxb7dxxx_obj.c @@ -76,11 +76,10 @@ STATIC void lcd_ls0xxb7dxxx_print(const mp_print_t *print, mp_obj_t o, mp_print_ lcd_ls0xxb7dxxx_obj_t *self = o; mp_printf(print, "LS0XXB7DXXX(SPI(mosi=(port=%u, pin=%u), clk=(port=%u, pin=%u)),\n", - self->spi->pyb->spi->init.mosi_pin_port, - self->spi->pyb->spi->init.mosi_pin, - self->spi->pyb->spi->init.clk_pin_port, - self->spi->pyb->spi->init.clk_pin - ); + self->spi->pyb->spi->init.mosi_pin->port, + self->spi->pyb->spi->init.mosi_pin->pin, + self->spi->pyb->spi->init.clk_pin->port, + self->spi->pyb->spi->init.clk_pin->pin); mp_printf(print, " cs=(port=%u, pin=%u), disp=(port=%u, pin=%u), extcomin=(port=%u, pin=%u),\n", self->pin_cs->port, diff --git a/nrf5/drivers/display/oled_ssd1305_obj.c b/nrf5/drivers/display/oled_ssd1305_obj.c index 84874b6e70..59b52ee277 100644 --- a/nrf5/drivers/display/oled_ssd1305_obj.c +++ b/nrf5/drivers/display/oled_ssd1305_obj.c @@ -73,13 +73,12 @@ STATIC void oled_ssd1305_print(const mp_print_t *print, mp_obj_t o, mp_print_kin oled_ssd1305_obj_t *self = o; mp_printf(print, "SSD1305(SPI(mosi=(port=%u, pin=%u), miso=(port=%u, pin=%u), clk=(port=%u, pin=%u)),\n", - self->spi->pyb->spi->init.mosi_pin_port, - self->spi->pyb->spi->init.mosi_pin, - self->spi->pyb->spi->init.miso_pin_port, - self->spi->pyb->spi->init.miso_pin, - self->spi->pyb->spi->init.clk_pin_port, - self->spi->pyb->spi->init.clk_pin - ); + self->spi->pyb->spi->init.mosi_pin->port, + self->spi->pyb->spi->init.mosi_pin->pin, + self->spi->pyb->spi->init.miso_pin->port, + self->spi->pyb->spi->init.miso_pin->pin, + self->spi->pyb->spi->init.clk_pin->port, + self->spi->pyb->spi->init.clk_pin->pin); mp_printf(print, " cs=(port=%u, pin=%u), dc=(port=%u, pin=%u), reset=(port=%u, pin=%u),\n", self->pin_cs->port, diff --git a/nrf5/drivers/display/oled_ssd1306_obj.c b/nrf5/drivers/display/oled_ssd1306_obj.c index c6410bcd8a..55e5094996 100644 --- a/nrf5/drivers/display/oled_ssd1306_obj.c +++ b/nrf5/drivers/display/oled_ssd1306_obj.c @@ -73,13 +73,12 @@ STATIC void oled_ssd1306_print(const mp_print_t *print, mp_obj_t o, mp_print_kin oled_ssd1306_obj_t *self = o; mp_printf(print, "SSD1306(SPI(mosi=(port=%u, pin=%u), miso=(port=%u, pin=%u), clk=(port=%u, pin=%u)),\n", - self->spi->pyb->spi->init.mosi_pin_port, - self->spi->pyb->spi->init.mosi_pin, - self->spi->pyb->spi->init.miso_pin_port, - self->spi->pyb->spi->init.miso_pin, - self->spi->pyb->spi->init.clk_pin_port, - self->spi->pyb->spi->init.clk_pin - ); + self->spi->pyb->spi->init.mosi_pin->port, + self->spi->pyb->spi->init.mosi_pin->pin, + self->spi->pyb->spi->init.miso_pin->port, + self->spi->pyb->spi->init.miso_pin->pin, + self->spi->pyb->spi->init.clk_pin->port, + self->spi->pyb->spi->init.clk_pin->pin); mp_printf(print, " cs=(port=%u, pin=%u), dc=(port=%u, pin=%u), reset=(port=%u, pin=%u),\n", self->pin_cs->port,