ISF  1.1
Intelligent Sensing Framework
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines
Include/psp/ifr.h
Go to the documentation of this file.
00001 /*
00002  * 
00003  * Copyright (c) 2012, Freescale Semiconductor, Inc.
00004  * 
00005 */
00006 
00007 /** \file  ifr.h
00008  *  \brief Header file describing the placement of the IFR values when copied into RAM.
00009  */
00010 
00011 #ifndef _IFR_H
00012 #define _IFR_H
00013 
00014 
00015 #include "isf_types.h"
00016 
00017 
00018 /***************************** IFR Copy Usage ****************************************************/
00019 
00020 #define IFR_ADDR_OFFSET 0x7C
00021 
00022 #define IFR_ADDR (0x00800000 + IFR_ADDR_OFFSET)
00023 
00024 typedef struct {
00025   uint8  tnvs;
00026   uint8  tnvh;
00027   uint8  tpgs;
00028   uint8  tprog;
00029   uint16 tnvhl;
00030   uint16 tme;
00031   uint16 terase;
00032   uint16 rsvd1;
00033   int16  c0[3]; // fine offset (C0) values
00034   int16  c1[3]; // fine gain (C1) values
00035   int16  toff;
00036   int16  c2[3];
00037   int16  tco1[3];
00038   int16  tco2[3];
00039   int16  raw_off[3];
00040   int16  rsvd2;
00041   int16  c0_8g[3]; // fine offset (C0) values for 8g mode
00042   int16  c0_4g[3]; // fine offset (C0) values for 4g mode
00043   int16  c0_2g[3]; // fine offset (C0) values for 2g mode
00044   int16  rsvd3;
00045   int16  user_offset[3]; // user board mount offsets
00046   int16  rsvd4[3];
00047 } ifr_t;
00048 
00049 extern ifr_t ifr @ IFR_ADDR;
00050 
00051 #define IFR_STR0  0x80007C
00052 #define IFR_STR1  0x800080
00053 #define IFR_STR2  0x800084
00054 #define IFR_STR3  0x800088 //    C0 X    |   C0 Y
00055 #define IFR_STR4  0x80008C //    C0 Z    |   C1 X
00056 #define IFR_STR5  0x800090 //    C1 Y    |   C1 Z
00057 #define IFR_STR6  0x800094 //    TOFF    |   C2 X
00058 #define IFR_STR7  0x800098 //    C2 Y    |   C2 Z
00059 #define IFR_STR8  0x80009C //   TCO1 X   |  TCO1 Y
00060 #define IFR_STR9  0x8000A0 //   TCO1 Z   |  TCO2 X
00061 #define IFR_STR10 0x8000A4 //   TCO2 Y   |  TCO2 Z
00062 #define IFR_STR11 0x8000A8 //    RAW X   |   RAW Y
00063 #define IFR_STR12 0x8000AC //    RAW Z   |   ----
00064 #define IFR_STR13 0x8000B0 //   C08G X   |  C08G Y
00065 #define IFR_STR14 0x8000B4 //   C08G Z   |  C04G X
00066 #define IFR_STR15 0x8000B8 //   C04G Y   |  C04G Z
00067 #define IFR_STR16 0x8000BC //   C02G X   |  C02G Y
00068 #define IFR_STR17 0x8000C0 //   C02G Z   |   ----
00069 #define IFR_STR18 0x8000C4 //   OFFS X   |  OFFS Y
00070 #define IFR_STR19 0x8000C8 //   OFFS Z   |   ----
00071 #define IFR_STR20 0x8000CC //    ----    |   ----
00072 
00073 #endif   /* _IFR_H */