The first version that was demonstrated to get an IPv6 address
[firmerware] / include / bottom / grandstream.h
index 6a199a4..ea6ac9f 100644 (file)
@@ -1,4 +1,22 @@
-/* Grandstream-specific definitions, split up per model where needed */
+/* Grandstream-specific definitions, split up per model where needed
+ *
+ * This file is part of 0cpm Firmerware.
+ *
+ * 0cpm Firmerware is Copyright (c)2011 Rick van Rein, OpenFortress.
+ *
+ * 0cpm Firmerware is free software: you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation, version 3.
+ *
+ * 0cpm Firmerware is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with 0cpm Firmerware.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 
 #ifndef HEADER_GRANDSTREAM
 #define HEADER_GRANDSTREAM
@@ -32,7 +50,7 @@
 
 #pragma FAR(kbdisp)
 extern volatile uint8_t kbdisp;
-asm ("_kbdisp .set 0x666666");
+asm ("_kbdisp .set 0x666CDA");
 
 /* The network interface KSZ8842-16 is booted without EEPROM, so it
  * has no knowledge of anything -- specifically, no MAC address.
@@ -67,13 +85,22 @@ inline void ksz_memset16 (uint16_t ksz, uint8_t *mem) {
        mem [1] = ksz & 0xff;
 }
 
-
 #pragma FAR(flash_16)
-extern volatile uint16_t flash_16 [];
+extern volatile uint32_t flash_16 [];
 asm ("_flash_16 .set 0x200000");
 
-#endif
+#endif /* CONFIG_TARGET_GRANDSTREAM_BT20x || CONFIG_TARGET_GRANDSTREAM_BT10x */
+
+#if defined CONFIG_TARGET_GRANDSTREAM_BT20x
 
+#define HAVE_FLASH_PARTITIONS 1
+
+/* The MAC address is stored at byte offset 0x014006 */
+#define flash_offset_mymac 0x00a003
+
+void bottom_flash_get_mac (uint8_t mac [6]);
+
+#endif
 
 #endif