nes-proj/cpu/stm32w108/hal/micro/cortexm3/memmap-fat.h
Adam Dunkels a5046e83c7 Cleanup and refactoring of the STM32w port
This is a general cleanup of things like code style issues and code structure of the STM32w port to make it more like the rest of Contiki is structured.
2013-03-18 13:31:26 +01:00

52 lines
2.0 KiB
C

/** @file hal/micro/cortexm3/memmap-fat.h
* @brief STM32W108 series memory map fixed address table definition
*
* <!--(C) COPYRIGHT 2010 STMicroelectronics. All rights reserved. -->
*/
#ifndef __MEMMAP_FAT_H__
#define __MEMMAP_FAT_H__
#ifndef __MEMMAP_TABLES_H__
// if we weren't included via memmap-tables.h, define a dummy type for the BAT
typedef void HalBootloaderAddressTableType;
#endif
#include "hal/micro/cortexm3/bootloader/fib-bootloader.h"
// ****************************************************************************
// If any of these address table definitions ever need to change, it is highly
// desirable to only add new entries, and only add them on to the end of an
// existing address table... this will provide the best compatibility with
// any existing code which may utilize the tables, and which may not be able to
// be updated to understand a new format (example: bootloader which reads the
// application address table)
// Description of the Fixed Address Table (FAT)
typedef struct {
HalBaseAddressTableType baseTable;
void *CustomerInformationBlock;
HalBootloaderAddressTableType *bootloaderAddressTable;
void *startOfUnusedRam;
// ** pointers to shared functions **
FibStatus (* fibFlashWrite)(uint32_t address, uint8_t *data,
uint32_t writeLength, uint32_t verifyLength);
FibStatus (* fibFlashErase)(FibEraseType eraseType, uint32_t address);
} HalFixedAddressTableType;
extern const HalFixedAddressTableType halFixedAddressTable;
#define FIXED_ADDRESS_TABLE_TYPE (0x0FA7)
// The current versions of the address tables.
// Note that the major version should be updated only when a non-backwards
// compatible change is introduced (like removing or rearranging fields)
// adding new fields is usually backwards compatible, and their presence can
// be indicated by incrementing only the minor version
#define FAT_VERSION (0x0003)
#define FAT_MAJOR_VERSION (0x0000)
#define FAT_MAJOR_VERSION_MASK (0xFF00)
#endif //__MEMMAP_FAT_H__