[tuxdroid-svn] r669 - firmware/tuxdefs
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2007-11-09 16:30:27
|
Author: jaguarondi Date: 2007-11-09 15:27:05 +0100 (Fri, 09 Nov 2007) New Revision: 669 Modified: firmware/tuxdefs/api.h firmware/tuxdefs/defines.h Log: * Added a new member to the revision_t structure for the release type. The point is to be able to differentiate a released from an unreleased version. * Updated comments. Modified: firmware/tuxdefs/api.h =================================================================== --- firmware/tuxdefs/api.h 2007-11-09 09:19:07 UTC (rev 668) +++ firmware/tuxdefs/api.h 2007-11-09 14:27:05 UTC (rev 669) @@ -118,8 +118,8 @@ * - all major and minor numbers should be equal; * - the higher update number of all CPUs will be the update number of the * release package; - * - when increasing the update number, use the highest update number among all - * CPUs + 1. + * - when increasing the update number, use the highest update number among + * all CPUs + 1. */ /** * Return the CPU number and the firmware version in major.minor.update @@ -129,8 +129,8 @@ * structure. * * Parameters: - * - 1 - 3 lower bits are the CPU number, - * 5 higher bits are the major version number. + * - 1 - 3 lower bits are the CPU number, + * 5 higher bits are the major version number. * - 2 - minor version number. * - 3 - update version number. */ @@ -147,7 +147,10 @@ * Parameters: * - 1 - LSB of the revision number. * - 2 - MSB of the revision number. - * - 3 - undefined. + * - 3 - Release type coded as a bit field with the following values: + * - Bit 0: set if local modifications found. + * - Bit 1: set if mixed update revisions found. + * - Bit 2: set for a tagged and original release. */ #define REVISION_CMD 0xC9 Modified: firmware/tuxdefs/defines.h =================================================================== --- firmware/tuxdefs/defines.h 2007-11-09 09:19:07 UTC (rev 668) +++ firmware/tuxdefs/defines.h 2007-11-09 14:27:05 UTC (rev 669) @@ -53,6 +53,8 @@ FUXRF_CPU_NUM = 3, /** 'fuxusb' is the USB CPU inside the dongle. */ FUXUSB_CPU_NUM = 4, + /** We use '-1' to indicate an invalid CPU number. */ + INVALID_CPU_NUM = -1, }; /** @@ -103,6 +105,8 @@ * This version_t type should be used to send the bytes over a channel such as * USB or TCP-IP. Use the macros to set or retrieve values of the cpu_ver_maj * byte. + * + * See also VERSION_CMD. */ typedef struct { @@ -125,13 +129,20 @@ #define CPU_VER_MAJ(cpu_ver_maj) ((cpu_ver_maj & 0xF8) >> 3) /** - * Revision number of the firmware from the subversion repository. + * Revision information from the subversion repository. + * + * See also REVISION_CMD. */ typedef struct { uint8_t revision_cmd; + /** Revision number. */ uint16_t revision; - uint8_t _undefined_; + /** Release type coded as a bit field with the following values: + * - Bit 0: set if local modifications found. + * - Bit 1: set if mixed update revisions found. + * - Bit 2: set for a tagged and original release. */ + uint8_t release_type; } revision_t; /** |