diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-06-23 14:39:56 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-06-23 14:39:56 -0600 |
commit | 9d4f3f645e606d812e3bec76a10940691b30b5ff (patch) | |
tree | ec970f690586d7ce93d937df8d6389bc1ecbdf57 /nuttx/include | |
parent | 333edc2da8d4bad41a3ea553bf635cbad5119427 (diff) | |
download | px4-nuttx-9d4f3f645e606d812e3bec76a10940691b30b5ff.tar.gz px4-nuttx-9d4f3f645e606d812e3bec76a10940691b30b5ff.tar.bz2 px4-nuttx-9d4f3f645e606d812e3bec76a10940691b30b5ff.zip |
Add support for the UG-2843HHSWEG04 OLED and for the SAM4L Xplained Pro OLED module that uses that OLED.
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/assert.h | 40 | ||||
-rw-r--r-- | nuttx/include/nuttx/lcd/ssd1306.h (renamed from nuttx/include/nuttx/lcd/ug-2864hsweg01.h) | 29 |
2 files changed, 39 insertions, 30 deletions
diff --git a/nuttx/include/assert.h b/nuttx/include/assert.h index 2159ea868..8934d4d55 100644 --- a/nuttx/include/assert.h +++ b/nuttx/include/assert.h @@ -63,43 +63,51 @@ # define VERIFY(f) \ { if ((f) < 0) up_assert((const uint8_t *)__FILE__, (int)__LINE__); } +# define PANIC() \ + up_assert((const uint8_t *)__FILE__, (int)__LINE__) + # ifdef CONFIG_DEBUG + # define DEBUGASSERT(f) \ { if (!(f)) up_assert((const uint8_t *)__FILE__, (int)__LINE__); } + # define DEBUGVERIFY(f) \ { if ((f) < 0) up_assert((const uint8_t *)__FILE__, (int)__LINE__); } + +# define DEBUGPANIC() \ + up_assert((const uint8_t *)__FILE__, (int)__LINE__) + # else + # define DEBUGASSERT(f) # define DEBUGVERIFY(f) ((void)(f)) -# endif /* CONFIG_DEBUG */ +# define DEBUGPANIC() -# define PANIC() \ - up_assert((const uint8_t *)__FILE__, (int)__LINE__) +# endif /* CONFIG_DEBUG */ #else -# define ASSERT(f) \ - { if (!(f)) up_assert(); } -# define VERIFY(f) \ - { if ((f) < 0) up_assert(); } +# define ASSERT(f) { if (!(f)) up_assert(); } +# define VERIFY(f) { if ((f) < 0) up_assert(); } +# define PANIC() up_assert() # ifdef CONFIG_DEBUG -# define DEBUGASSERT(f) \ - { if (!(f)) up_assert(); } -# define DEBUGVERIFY(f) \ - { if ((f) < 0) up_assert(); } + +# define DEBUGASSERT(f) { if (!(f)) up_assert(); } +# define DEBUGVERIFY(f) { if ((f) < 0) up_assert(); } +# define DEBUGPANIC() up_assert() + # else + # define DEBUGASSERT(f) # define DEBUGVERIFY(f) ((void)(f)) -# endif /* CONFIG_DEBUG */ - -# define PANIC(code) \ - up_assert() +# define DEBUGPANIC() +# endif /* CONFIG_DEBUG */ #endif #ifndef assert -#define assert ASSERT +# define assert ASSERT #endif /**************************************************************************** diff --git a/nuttx/include/nuttx/lcd/ug-2864hsweg01.h b/nuttx/include/nuttx/lcd/ssd1306.h index e38741967..fee758b9d 100644 --- a/nuttx/include/nuttx/lcd/ug-2864hsweg01.h +++ b/nuttx/include/nuttx/lcd/ssd1306.h @@ -1,16 +1,18 @@ /************************************************************************************** * include/nuttx/lcd/ug-2864hsweg01.h * - * Driver for Univision UG-2864HSWEG01 OLED display (wih SSD1306 controller) in SPI - * mode + * Driver for Univision UG-2864HSWEG01 OLED display or UG-2832HSWEG04 both with the + * Univision SSD1306 controller in SPI mode * - * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * References: * 1. Product Specification (Preliminary), Part Name: OEL Display Module, Part ID: * UG-2864HSWEG01, Doc No: SAS1-9046-B, Univision Technology Inc. - * 2. SSD1306, 128 X 64 Dot Matrix OLED/PLED, Preliminary Segment/Common Driver with + * 2. Product Specification, Part Name: OEL Display Module, Part ID: UG-2832HSWEG04, + * Doc No.: SAS1-B020-B, Univision Technology Inc. + * 3. SSD1306, 128 X 64 Dot Matrix OLED/PLED, Preliminary Segment/Common Driver with * Controller, Solomon Systech * * Redistribution and use in source and binary forms, with or without @@ -42,8 +44,8 @@ * **************************************************************************************/ -#ifndef __INCLUDE_NUTTX_UG_8264HSWEG01_H -#define __INCLUDE_NUTTX_UG_8264HSWEG01_H +#ifndef __INCLUDE_NUTTX_SSD1306_H +#define __INCLUDE_NUTTX_SSD1306_H /************************************************************************************** * Included Files @@ -55,7 +57,7 @@ #include <nuttx/arch.h> -#ifdef CONFIG_LCD_UG2864HSWEG01 +#ifdef CONFIG_LCD_SSD1306 /************************************************************************************** * Pre-processor Definitions @@ -196,7 +198,7 @@ extern "C" **************************************************************************************/ /************************************************************************************** - * Name: ug2864hsweg01_initialize + * Name: ssd1306initialize * * Description: * Initialize the UG-2864HSWEG01 video hardware. The initial state of the @@ -218,11 +220,10 @@ extern "C" struct lcd_dev_s; /* See include/nuttx/lcd/lcd.h */ struct spi_dev_s; /* See include/nuttx/spi.h */ -FAR struct lcd_dev_s *ug2864hsweg01_initialize(FAR struct spi_dev_s *spi, - unsigned int devno); +FAR struct lcd_dev_s *ssd1306_initialize(FAR struct spi_dev_s *spi, unsigned int devno); /************************************************************************************************ - * Name: ug2864hsweg01_fill + * Name: ssd1306_fill * * Description: * This non-standard method can be used to clear the entire display by writing one @@ -236,11 +237,11 @@ FAR struct lcd_dev_s *ug2864hsweg01_initialize(FAR struct spi_dev_s *spi, * **************************************************************************************/ -void ug2864hsweg01_fill(FAR struct lcd_dev_s *dev, uint8_t color); +void ssd1306_fill(FAR struct lcd_dev_s *dev, uint8_t color); #ifdef __cplusplus } #endif -#endif /* CONFIG_LCD_UG2864HSWEG01 */ -#endif /* __INCLUDE_NUTTX_UG_8264HSWEG01_H */ +#endif /* CONFIG_LCD_SSD1306 */ +#endif /* __INCLUDE_NUTTX_SSD1306_H */ |