1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

Revert earlier patch on filesystem for Revolution. Need to make erase command

and positioning of filesystem dependent on board type.

Reverted 99123372d0c5054e8a96112deb2d58a9acc556da
This commit is contained in:
James Cotton 2012-01-24 16:09:35 -06:00
parent 4b3dcc4cc2
commit 587ec5a615
2 changed files with 9 additions and 12 deletions

View File

@ -38,9 +38,9 @@
#define W25X_READ_DATA 0x03
#define W25X_FAST_READ 0x0b
#define W25X_DEVICE_ID 0x90
#define W25X_SECTOR_ERASE 0xD8
#define W25X_SECTOR_ERASE 0x20
#define W25X_PAGE_WRITE 0x02
#define W25X_CHIP_ERASE 0xC7
#define W25X_CHIP_ERASE 0x60
#define W25X_STATUS_BUSY 0x01
#define W25X_STATUS_WRITEPROTECT 0x02
@ -254,8 +254,7 @@ int32_t PIOS_Flash_W25X_EraseSector(uint32_t addr)
PIOS_Flash_W25X_ReleaseBus();
// Keep polling when bus is busy too
while(PIOS_Flash_W25X_Busy() != 0) {
}
while(PIOS_Flash_W25X_Busy() != 0);
return 0;
}
@ -286,8 +285,7 @@ int32_t PIOS_Flash_W25X_EraseChip()
PIOS_Flash_W25X_ReleaseBus();
// Keep polling when bus is busy too
while(PIOS_Flash_W25X_Busy() != 0) {
}
while(PIOS_Flash_W25X_Busy() != 0);
return 0;
}
@ -340,8 +338,7 @@ int32_t PIOS_Flash_W25X_WriteData(uint32_t addr, uint8_t * data, uint16_t len)
PIOS_Flash_W25X_ReleaseBus();
// Keep polling while bus is busy too
while(PIOS_Flash_W25X_Busy() != 0) {
}
while(PIOS_Flash_W25X_Busy() != 0);
return 0;
}

View File

@ -56,11 +56,11 @@ struct fileHeader {
} __attribute__((packed));
#define OBJECT_TABLE_MAGIC 0x85FB3D35
#define OBJ_MAGIC 0x3015A371
#define OBJECT_TABLE_MAGIC 0x85FB3C35
#define OBJ_MAGIC 0x3015AE71
#define OBJECT_TABLE_START 0x00000010
#define OBJECT_TABLE_END 0x00010000
#define SECTOR_SIZE 0x00010000
#define OBJECT_TABLE_END 0x00001000
#define SECTOR_SIZE 0x00001000
#define MAX_BADMAGIC 1000
/**