Subversion Repositories EDIS_Ignition

Rev

Rev 9 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9 Rev 10
Line 1... Line 1...
1
/*
1
/*
2
 * nvram.h
2
 * nvram.h
3
 *
3
 *
4
 *  Created on: 4 Jun 2017
4
 *  Created on: 4 Jun 2017, modified for STM32F1 series using 2 pages of Flash rather than NVRAM
5
 *      Author: Mike
5
 *      Author: Mike
-
 
6
 *
-
 
7
 * The design stores 8 bit data with an 8 bit tag value : this allows up to 253 different tags to be used (0x00 and 0xFF are reserved)
-
 
8
 *
-
 
9
 * In the application here, each element in a 10x10 ignition timing map is given its own tag, along with the rpm and vacuum axis values,
-
 
10
 * and an overall timing correction tag.
-
 
11
 *
6
 */
12
 */
7
#include "libPLX/plx.h"
-
 
8
 
13
 
9
#pragma once
-
 
10
 
14
 
-
 
15
#pragma once
-
 
16
#include "stdint.h"
11
 
17
 
12
#if defined __cplusplus
18
#if defined __cplusplus
13
extern "C"
19
extern "C"
14
{
20
{
15
#endif
21
#endif
16
#pragma pack(push, 1)
22
#pragma pack(push, 1)
17
 
23
 
18
    ///\brief State of item
24
    ///\brief State of item
19
    /// this is expected to be packed into 32 bits 
25
    /// this is expected to be packed into 16 bits 
20
    typedef union
26
    typedef union
21
    {
27
    {
22
        struct
28
        struct
23
        {
29
        {
24
            unsigned tag : 8;
30
            unsigned tag : 8;