26 #ifndef PIOS_FLASH_PRIV_H_
27 #define PIOS_FLASH_PRIV_H_
39 int32_t (*
erase_sector)(uintptr_t chip_id, uint32_t chip_sector, uint32_t chip_offset);
40 int32_t (*
write_data)(uintptr_t chip_id, uint32_t chip_offset,
const uint8_t *
data, uint16_t len);
41 int32_t (*
read_data)(uintptr_t chip_id, uint32_t chip_offset, uint8_t *
data, uint16_t len);
42 void *(*get_pointer)(uintptr_t chip_id, uint32_t chip_offset);
91 #define FLASH_SECTOR_1KB ( 1 * 1024)
92 #define FLASH_SECTOR_2KB ( 2 * 1024)
93 #define FLASH_SECTOR_4KB ( 4 * 1024)
94 #define FLASH_SECTOR_8KB ( 8 * 1024)
95 #define FLASH_SECTOR_16KB ( 16 * 1024)
96 #define FLASH_SECTOR_32KB ( 32 * 1024)
97 #define FLASH_SECTOR_64KB ( 64 * 1024)
98 #define FLASH_SECTOR_128KB (128 * 1024)
104 uint8_t partition_table_len,
int32_t(* read_data)(uintptr_t chip_id, uint32_t chip_offset, uint8_t *data, uint16_t len)
const struct pios_flash_sector_range * sector_blocks
int32_t(* erase_sector)(uintptr_t chip_id, uint32_t chip_sector, uint32_t chip_offset)
const struct pios_flash_chip * chip_desc
uint8_t data[XFER_BYTES_PER_PACKET]
int32_t(* end_transaction)(uintptr_t chip_id)
void PIOS_FLASH_fixup_partitions_for_capacity(struct pios_flash_partition *partition_table, uint8_t partition_table_len, const struct pios_flash_chip *descriptor, struct pios_flash_sector_range *sectors, uint32_t num_bytes)
int32_t(* write_data)(uintptr_t chip_id, uint32_t chip_offset, const uint8_t *data, uint16_t len)
void PIOS_FLASH_register_partition_table(const struct pios_flash_partition partition_table[], uint8_t num_partitions)
pios_flash_partition_labels
const struct pios_flash_driver * driver
enum pios_flash_partition_labels label
int32_t(* start_transaction)(uintptr_t chip_id)