Module Name: src
Committed By: hkenken
Date: Fri Nov 29 04:59:15 UTC 2019
Modified Files:
src/sys/dev/i2c: at24cxx.c
Log Message:
Support more than 128Kbit model.
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/dev/i2c/at24cxx.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/i2c/at24cxx.c
diff -u src/sys/dev/i2c/at24cxx.c:1.32 src/sys/dev/i2c/at24cxx.c:1.33
--- src/sys/dev/i2c/at24cxx.c:1.32 Sun Oct 27 19:10:38 2019
+++ src/sys/dev/i2c/at24cxx.c Fri Nov 29 04:59:15 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: at24cxx.c,v 1.32 2019/10/27 19:10:38 jmcneill Exp $ */
+/* $NetBSD: at24cxx.c,v 1.33 2019/11/29 04:59:15 hkenken Exp $ */
/*
* Copyright (c) 2003 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.32 2019/10/27 19:10:38 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.33 2019/11/29 04:59:15 hkenken Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -67,7 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v
#define AT24CXX_ADDR 0x50
#define AT24CXX_WRITE_CYCLE_MS 10
-#define AT24CXX_ADDR_HI(a) (((a) >> 8) & 0x1f)
+#define AT24CXX_ADDR_HI(a) (((a) >> 8) & 0xff)
#define AT24CXX_ADDR_LO(a) ((a) & 0xff)
#include "seeprom.h"