diff --git a/configs/hymini-stm32v/src/stm32_r61505u.c b/configs/hymini-stm32v/src/stm32_r61505u.c index 1aeab883e2..443f469f06 100644 --- a/configs/hymini-stm32v/src/stm32_r61505u.c +++ b/configs/hymini-stm32v/src/stm32_r61505u.c @@ -1,7 +1,7 @@ /************************************************************************************ * configs/hymini-stm32v/src/stm32_r61505u.c * - * Copyright (C) 2009, 2011, 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2009, 2011, 2013, 2018 Gregory Nutt. All rights reserved. * Authors: Gregory Nutt * Laurent Latil * C. Faure 2013-05-15 @@ -924,13 +924,13 @@ int board_lcd_initialize(void) /* Check model id */ - id=read_reg(0x0); + id = read_reg(0x0); if (id != LCD_ID) { /* Not a R61505U ? */ lcderr("ERROR: board_lcd_initialize: LCD ctrl is not a R61505U"); - return ERROR; + return -ENXIO; } /* Configure and enable LCD */ diff --git a/configs/mikroe-stm32f4/src/stm32_appinit.c b/configs/mikroe-stm32f4/src/stm32_appinit.c index 18028def31..67eced68d1 100644 --- a/configs/mikroe-stm32f4/src/stm32_appinit.c +++ b/configs/mikroe-stm32f4/src/stm32_appinit.c @@ -376,11 +376,10 @@ int board_app_initialize(uintptr_t arg) syslog(LOG_INFO, "Initializing TFT LCD module\n"); ret = board_lcd_initialize(); - if (ret != OK) + if (ret < 0) { syslog(LOG_ERR, "ERROR: Failed to initialize TFT LCD module\n"); } - #endif #ifdef CONFIG_SENSORS_QENCODER diff --git a/configs/stm32f103-minimum/src/stm32_lcd.c b/configs/stm32f103-minimum/src/stm32_lcd.c index 22e345b3f0..6833d644b7 100644 --- a/configs/stm32f103-minimum/src/stm32_lcd.c +++ b/configs/stm32f103-minimum/src/stm32_lcd.c @@ -103,13 +103,13 @@ int board_lcd_initialize(void) if (!g_spidev) { lcderr("ERROR: Failed to initialize SPI port %d\n", LCD_SPI_PORTNO); - return 0; + return -ENODEV; } stm32_gpiowrite(STM32_LCD_RST, 0); up_mdelay(1); stm32_gpiowrite(STM32_LCD_RST, 1); - return 1; + return OK; } /**************************************************************************** diff --git a/configs/stm32f103-minimum/src/stm32_max7219.c b/configs/stm32f103-minimum/src/stm32_max7219.c index f905557afd..5ac211ebc0 100644 --- a/configs/stm32f103-minimum/src/stm32_max7219.c +++ b/configs/stm32f103-minimum/src/stm32_max7219.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32f103-minimum/src/stm32_max7219.c * - * Copyright (C) 2017 Gregory Nutt. All rights reserved. + * Copyright (C) 2017-2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -88,10 +88,10 @@ int board_lcd_initialize(void) if (!g_spidev) { lcderr("ERROR: Failed to initialize SPI port %d\n", LCD_SPI_PORTNO); - return 0; + return -ENODEV; } - return 1; + return OK; } /**************************************************************************** diff --git a/configs/stm32f103-minimum/src/stm32_pcd8544.c b/configs/stm32f103-minimum/src/stm32_pcd8544.c index 3093a539b5..ead1b2dc2f 100644 --- a/configs/stm32f103-minimum/src/stm32_pcd8544.c +++ b/configs/stm32f103-minimum/src/stm32_pcd8544.c @@ -1,7 +1,7 @@ /**************************************************************************** * config/stm32f103-minimum/src/stm32_pcd8544.c * - * Copyright (C) 2011, 2013, 2015 Gregory Nutt. All rights reserved. + * Copyright (C) 2011, 2013, 2015, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -95,13 +95,13 @@ int board_lcd_initialize(void) if (!g_spidev) { lcderr("ERROR: Failed to initialize SPI port %d\n", LCD_SPI_PORTNO); - return 0; + return -ENODEV; } stm32_gpiowrite(STM32_LCD_RST, 0); up_mdelay(10); stm32_gpiowrite(STM32_LCD_RST, 1); - return 1; + return OK; } /**************************************************************************** diff --git a/configs/stm32f103-minimum/src/stm32_ssd1306.c b/configs/stm32f103-minimum/src/stm32_ssd1306.c index 0bd49bf03a..da1048cdfa 100644 --- a/configs/stm32f103-minimum/src/stm32_ssd1306.c +++ b/configs/stm32f103-minimum/src/stm32_ssd1306.c @@ -88,10 +88,10 @@ int board_lcd_initialize(void) if (!g_i2c) { lcderr("ERROR: Failed to initialize I2C port %d\n", OLED_I2C_PORT); - return 0; + return -ENODEV; } - return 1; + return OK; } /**************************************************************************** diff --git a/configs/stm32f4discovery/src/stm32_st7567.c b/configs/stm32f4discovery/src/stm32_st7567.c index e1f9d0262f..fa60ae7ffa 100644 --- a/configs/stm32f4discovery/src/stm32_st7567.c +++ b/configs/stm32f4discovery/src/stm32_st7567.c @@ -103,13 +103,13 @@ int board_lcd_initialize(void) if (!g_spidev) { lcderr("ERROR: Failed to initialize SPI port %d\n", LCD_SPI_PORTNO); - return 0; + return -ENODEV; } stm32_gpiowrite(STM32_LCD_RST, 0); up_mdelay(1); stm32_gpiowrite(STM32_LCD_RST, 1); - return 1; + return OK; } /**************************************************************************** diff --git a/configs/zkit-arm-1769/src/lpc17_lcd.c b/configs/zkit-arm-1769/src/lpc17_lcd.c index a998c7e4fb..8ae4bfbce0 100644 --- a/configs/zkit-arm-1769/src/lpc17_lcd.c +++ b/configs/zkit-arm-1769/src/lpc17_lcd.c @@ -6,7 +6,7 @@ * * Based on configs/lm3s6965-ek/src/up_oled.c * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012, 2018 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -91,13 +91,13 @@ int board_lcd_initialize(void) if (!g_spidev) { lcderr("ERROR: Failed to initialize SSP port 0\n"); - return 0; + return -ENODEV; } lpc17_gpiowrite(ZKITARM_OLED_RST, 0); up_mdelay(1); lpc17_gpiowrite(ZKITARM_OLED_RST, 1); - return 1; + return OK; } /****************************************************************************