#ifdef _IAR_
u8 membanks[MEM_BANKS_CNT][MEM_BANK_SIZE] @ "eeprom_zone"=
#else
EEPROM u8 membanks[MEM_BANKS_CNT][MEM_BANK_SIZE]=
#endif
{
// memory bank 0 - according specification
{
(MEM_BANK_SIZE-1) , // 0x00 address of last accessible memory location factory burn in read-only
(u8)(0 - (MEM_BANKS_CNT-1) - 0 - 1 - 2 - 3 - 4 - 5 - 1 - 0 - 0 - 0 - 0 - 1 - 'S' - 'T' - 'M' - '8' - 'D' - 'A' - 'L' - 'I' - ' ' - 'l' - 'i' - 'b' - 'r' - 'a' - 'r' - 'y' - '.')
, // 0x01 checksum of memory bank 0 factory burn in read-only
(MEM_BANKS_CNT-1) , // 0x02 number of last accessible memory bank factory burn in read-only
0 , // 0x03 GTIN byte 0 (MSB) factory burn in read-only
1 , // 0x04 GTIN byte 1 factory burn in read-only
2 , // 0x05 GTIN byte 2 factory burn in read-only
3 , // 0x06 GTIN byte 3 factory burn in read-only
4 , // 0x07 GTIN byte 4 factory burn in read-only
5 , // 0x08 GTIN byte 5 factory burn in read-only
1 , // 0x09 control gear firmware version (major) factory burn in read-only
0 , // 0x0A control gear firmware version (minor) factory burn in read-only
0 , // 0x0B serial number byte 1 (MSB) factory burn in read-only
0 , // 0x0C serial number byte 2 factory burn in read-only
0 , // 0x0D serial number byte 3 factory burn in read-only
1 , // 0x0E serial number byte 4 factory burn in read-only
'S','T','M','8','D','A','L','I',' ','l','i','b','r','a','r','y','.' // 0x0F- ... additional control gear information
}
,
// memory bank 1 - according specification
{
(MEM_BANK_SIZE-1) , // 0x00 address of last accessible memory location factory burn in read-only
30 , // 0x01 checksum of memory bank 1 read-only
0xFF , // 0x02 memory bank 1 lock byte (read-only if not 0x55) 0xFF read / write
0xFF , // 0x03 OEM GTIN byte 0 (MSB) 0xFF read / write (lockable)
0xFF , // 0x04 OEM GTIN byte 1 0xFF read / write (lockable)
0xFF , // 0x05 OEM GTIN byte 2 0xFF read / write (lockable)
0xFF , // 0x06 OEM GTIN byte 3 0xFF read / write (lockable)
0xFF , // 0x07 OEM GTIN byte 4 0xFF read / write (lockable)
0xFF , // 0x08 OEM GTIN byte 5 0xFF read / write (lockable)
0xFF , // 0x09 OEM serial number byte 1 (MSB) 0xFF read / write (lockable)
0xFF , // 0x0A OEM serial number byte 2 0xFF read / write (lockable)
0xFF , // 0x0B OEM serial number byte 3 0xFF read / write (lockable)
0xFF , // 0x0C OEM serial number byte 4 (LSB) 0xFF read / write (lockable)
0xFF , // 0x0D Subsystem (bit 4 to bit 7) Device number (bit 0 to bit 3) 0xFF read / write (lockable)
0xFF , // 0x0E Lamp type number (lockable) c 0xFF read / write (lockable)
0xFF , // 0x0F Lamp type number 0xFF read / write
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF // 0x10- ... additional OEM information
}
};
上面是ST官方DALI 2.0 库定义EEPROM数组方法,不明白eeprom_zone目的,以及如何设置。 |
|