Mercurial > ecos
comparison packages/devs/flash/intel/strata/current/src/flash_program_buf.c @ 171:42f843b391aa
Merge from eCos master repository on 2001-07-18-03:13:25-BST
| author | jlarmour |
|---|---|
| date | Wed, 18 Jul 2001 11:38:39 +0000 |
| parents | 0d2b193a635f |
| children | f62680ef1804 |
comparison
equal
deleted
inserted
replaced
| 170:f664e0b5f88b | 171:42f843b391aa |
|---|---|
| 83 // Write any big chunks first | 83 // Write any big chunks first |
| 84 while (len >= buffer_size) { | 84 while (len >= buffer_size) { |
| 85 wc = buffer_size; | 85 wc = buffer_size; |
| 86 if (wc > len) wc = len; | 86 if (wc > len) wc = len; |
| 87 len -= wc; | 87 len -= wc; |
| 88 wc = wc / (CYGNUM_FLASH_DEVICES*2); // Word count | 88 // convert 'wc' in bytes to 'wc' in 'flash_t' |
| 89 wc = wc / sizeof(flash_t); // Word count | |
| 89 *BA = FLASH_Write_Buffer; | 90 *BA = FLASH_Write_Buffer; |
| 90 timeout = 5000000; | 91 timeout = 5000000; |
| 91 while(((stat = ROM[0]) & FLASH_Status_Ready) != FLASH_Status_Ready) { | 92 while(((stat = ROM[0]) & FLASH_Status_Ready) != FLASH_Status_Ready) { |
| 92 if (--timeout == 0) { | 93 if (--timeout == 0) { |
| 93 goto bad; | 94 goto bad; |
