Skip to content

Commit

Permalink
changed bootloader test
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Marinescu committed Jan 30, 2011
1 parent 87df2d7 commit db70666
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ static u32 fpsize;

#define BL_VERSION_MAJOR 2
#define BL_VERSION_MINOR 1
#define BL_MKVER( major, minor ) ( ( major ) * 256 + ( minor ) )
#define BL_MINVERSION BL_MKVER( BL_VERSION_MAJOR, BL_VERSION_MINOR )

#define CHIP_ID 0x0414

// ****************************************************************************
Expand Down Expand Up @@ -89,7 +92,7 @@ int main( int argc, const char **argv )
else
{
printf( "Found bootloader version: %d.%d\n", major, minor );
if( major != BL_VERSION_MAJOR || minor != BL_VERSION_MINOR )
if( BL_MKVER( major, minor ) < BL_MINVERSION )
{
fprintf( stderr, "Unsupported bootloader version" );
exit( 1 );
Expand Down

0 comments on commit db70666

Please sign in to comment.