Contiki 2.5
memmap-fat.h
Go to the documentation of this file.
1 /** @file hal/micro/cortexm3/memmap-fat.h
2  * @brief STM32W108 series memory map fixed address table definition
3  *
4  * <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved. -->
5  */
6 #ifndef __MEMMAP_FAT_H__
7 #define __MEMMAP_FAT_H__
8 
9 #ifndef __MEMMAP_TABLES_H__
10  // if we weren't included via memmap-tables.h, define a dummy type for the BAT
11  typedef void HalBootloaderAddressTableType;
12 #endif
13 
15 
16 // ****************************************************************************
17 // If any of these address table definitions ever need to change, it is highly
18 // desirable to only add new entries, and only add them on to the end of an
19 // existing address table... this will provide the best compatibility with
20 // any existing code which may utilize the tables, and which may not be able to
21 // be updated to understand a new format (example: bootloader which reads the
22 // application address table)
23 
24 
25 // Description of the Fixed Address Table (FAT)
26 typedef struct {
27  HalBaseAddressTableType baseTable;
28  void *CustomerInformationBlock;
29  HalBootloaderAddressTableType *bootloaderAddressTable;
30  void *startOfUnusedRam;
31  // ** pointers to shared functions **
32  FibStatus (* fibFlashWrite)(int32u address, int8u *data,
33  int32u writeLength, int32u verifyLength);
34  FibStatus (* fibFlashErase)(FibEraseType eraseType, int32u address);
35 } HalFixedAddressTableType;
36 
37 extern const HalFixedAddressTableType halFixedAddressTable;
38 
39 #define FIXED_ADDRESS_TABLE_TYPE (0x0FA7)
40 
41 // The current versions of the address tables.
42 // Note that the major version should be updated only when a non-backwards
43 // compatible change is introduced (like removing or rearranging fields)
44 // adding new fields is usually backwards compatible, and their presence can
45 // be indicated by incrementing only the minor version
46 #define FAT_VERSION (0x0003)
47 #define FAT_MAJOR_VERSION (0x0000)
48 #define FAT_MAJOR_VERSION_MASK (0xFF00)
49 
50 
51 #endif //__MEMMAP_FAT_H__