flash_bsl: fix error with large block sizes.

This commit is contained in:
Daniel Beer 2012-07-16 10:05:46 +12:00
parent 3cc5f47304
commit eae3026f5a
1 changed files with 4 additions and 2 deletions

View File

@ -37,7 +37,10 @@ struct flash_bsl_device {
int long_password; int long_password;
}; };
#define MAX_PACKET 256 #define MAX_BLOCK 256
/* This should be at least MAX_BLOCK + 4 */
#define MAX_PACKET 512
/* adapted from TI's published BSL source code */ /* adapted from TI's published BSL source code */
#define CRC_INIT 0xffff #define CRC_INIT 0xffff
@ -263,7 +266,6 @@ static void flash_bsl_perror(uint8_t code) {
} }
} }
#define MAX_BLOCK 256
static int flash_bsl_readmem(device_t dev_base, static int flash_bsl_readmem(device_t dev_base,
address_t addr, uint8_t *mem, address_t len) address_t addr, uint8_t *mem, address_t len)
{ {