目的：
示範如何用 C 語言來存取儲存在快閃記憶體 (Flash) 中的參數。

注意：必須先在 params.h ，定義好參數的結構 (struct) ，如下所示。

typedef struct
{
    unsigned char ucSequenceNum;
    unsigned char ucCRC;
    unsigned char ucVersion;
    
    //PRESERVE ABOVE THREE PARAMETERS FOR FLASH READ/WRITE

    int counts;

    //
    // Padding to ensure the whole structure is 64 bytes long.
    //
    unsigned char ucReserved[57];
}
tParameters;

注意，結構 (struct) 的前三個成員，ucSequenceNum, ucCRC, ucVersion，是不能更改的。
結構 (struct) 在記憶體中的長度必須是 64 位元，所以最末必須宣告一個 ucReserved 陣列，讓整個結構 (struct)總共 64 位元。上例中，counts 是使用者自行定義的，也可以定義不同類別，超過一個數量的變數作為結構 (struct) 的成員，但是各成員長度加總後必須是 64 位元。


================================================================================

Goal:
Demonstrate how to use C language to load/store parameters in flash.

Note that be sure to define parameters as members of struct in params.h as follows:

typedef struct
{
    unsigned char ucSequenceNum;
    unsigned char ucCRC;
    unsigned char ucVersion;
    
    //PRESERVE ABOVE THREE PARAMETERS FOR FLASH READ/WRITE

    int counts;

    //
    // Padding to ensure the whole structure is 64 bytes long.
    //
    unsigned char ucReserved[57];
}
tParameters;

Note that the former three members, ucSequenceNum, ucCRC, ucVersion, are not allowed to changed.
The total length in memory of the struct is 64 bytes. To keep the length of the struct as 64 bytes, add an array of ucReserved of specified length. In above example, counts is user-defined and user can define even more varibales and in more data types as long as the whole length of struct is 64 bytes.

