Correct #if to #ifdef when the macro can be undefined. Fix bug in AT24XX driver: it should compare AT24XX_ADDRSIZE to 2.

This commit is contained in:
Paul A. Patience
2015-09-01 09:04:09 -04:00
parent bb385c242f
commit 3b89eabd50
24 changed files with 79 additions and 79 deletions
+2 -2
View File
@@ -811,7 +811,7 @@ static int ovr2640_chipid(FAR struct i2c_dev_s *i2c)
{
uint8_t pidl;
uint8_t pidh;
#if CONFIG_DEBUG_GRAPHICS
#ifdef CONFIG_DEBUG_GRAPHICS
uint8_t midh;
uint8_t midl;
#endif
@@ -829,7 +829,7 @@ static int ovr2640_chipid(FAR struct i2c_dev_s *i2c)
pidl = ov2640_getreg(i2c, 0x0a); /* Product ID (MS) */
pidh = ov2640_getreg(i2c, 0x0b); /* Product ID (LS) */
#if CONFIG_DEBUG_GRAPHICS
#ifdef CONFIG_DEBUG_GRAPHICS
midh = ov2640_getreg(i2c, 0x1c); /* Manufacturer ID (high) = 0x7f */
midl = ov2640_getreg(i2c, 0x1d); /* Manufacturer ID (low) = 0xa2 */
#endif