Subversion Repositories pentevo

Rev

Rev 179 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed | ?url?

  1. #ifndef __VERSION_H__
  2. #define __VERSION_H__
  3.  
  4. /**
  5.  * @file
  6.  * @brief Base configuration and bootloader version out support.
  7.  * @author http://www.nedopc.com
  8.  *
  9.  * Getting base configuration and bootloader version.
  10.  *
  11.  * Version data is 16 bytes [indexes 0x00..0x0F]. Data format:
  12.  * - 0x00..0x0B [12 bytes]: version name string, may be zero ended if name shoter then 12 bytes;
  13.  * - 0x0C..0x0D [2 bytes]: revision date and officiality bit;
  14.  * - 0x0E..0x0F [2 bytes]: CRC value of bootloader or base configuration code.
  15.  *
  16.  * Revision date and officiality bit format:
  17.  * - 7 bit of 0x0D: officiality bit (0 - test version, 1 - official release);
  18.  * - 6..1 bits of 0x0D: year (value 0..63 means 2000..2063 year);
  19.  * - 0 bit of 0x0D and 7..5 bits of 0x0C: month (value 1..12);
  20.  * - 4..0 bits of 0x0C: day (value 1..31).
  21.  *
  22.  * Example:
  23.  * 50 65 6E 74 31 6D 00 00 00 00 00 00 7B 14 3C B1
  24.  * 50 65 6E 74 31 6D 00 00 00 00 00 00 = name string: "Pent1m";
  25.  * 7B 14 = non official, 10 year, 03 month, 27 day: release date "27.03.2010";
  26.  * 3C B1 = CRC.
  27.  *
  28.  * Recommend type next strings on display:
  29.  * "Pent1m 27.03.2010 beta" - name and release date (officiality bit is not set);
  30.  * "Pent1m 27.03.2010" - name and release date (officiality bit is set).
  31.  */
  32.  
  33. /**
  34.  * Get version byte.
  35.  * @return version byte
  36.  * @param index [in] - index of byte (0x00..0x0F)
  37.  */
  38. UBYTE GetVersionByte(UBYTE index);
  39.  
  40. /**
  41.  * Set version type.
  42.  * @param type [in] - 0: base configuration, 1: bootloader
  43.  */
  44. void SetVersionType(UBYTE type);
  45.  
  46. #endif //__VERSION_H__
  47.