mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
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:
@@ -356,7 +356,7 @@ static ssize_t at24c_bwrite(FAR struct mtd_dev_s *dev, off_t startblock, size_t
|
||||
|
||||
while (blocksleft-- > 0)
|
||||
{
|
||||
#if AT24XX_ADDRSIZE
|
||||
#if AT24XX_ADDRSIZE == 2
|
||||
uint16_t offset = startblock * priv->pagesize;
|
||||
buf[1] = offset & 0xff;
|
||||
buf[0] = (offset >> 8) & 0xff;
|
||||
|
||||
Reference in New Issue
Block a user