30 #if USE_DYNAMIC_MEMORY 53 #if !USE_DYNAMIC_MEMORY 82 if(!device_read || !device_read_interval || index >= 4)
88 if(!
device_read(0x01be + index * 0x10, buffer,
sizeof(buffer)))
97 #if USE_DYNAMIC_MEMORY 98 new_partition = malloc(
sizeof(*new_partition));
102 new_partition = partition_handles;
111 if(i >= PARTITION_COUNT)
115 memset(new_partition, 0,
sizeof(*new_partition));
125 new_partition->
type = buffer[4];
131 new_partition->
type = 0xff;
134 return new_partition;
155 #if USE_DYNAMIC_MEMORY uint8_t(* device_write_t)(offset_t offset, const uint8_t *buffer, uintptr_t length)
device_read_t device_read
uint8_t(* device_read_t)(offset_t offset, uint8_t *buffer, uintptr_t length)
SD-Card Reader Bibliothek von Roland Riegel. Common SD-reader configuration used by all modules (lice...
SD-Card Reader Bibliothek von Roland Riegel.
device_read_interval_t device_read_interval
uint8_t(* device_read_interval_t)(offset_t offset, uint8_t *buffer, uintptr_t interval, uintptr_t length, device_read_callback_t callback, void *p)
uint32_t read32(const uint8_t *p)
uint8_t partition_close(struct partition_struct *partition)
struct partition_struct * partition_open(device_read_t device_read, device_read_interval_t device_read_interval, device_write_t device_write, device_write_interval_t device_write_interval, int8_t index)
SD-Card Reader Bibliothek von Roland Riegel.
device_write_interval_t device_write_interval
device_write_t device_write
uint8_t(* device_write_interval_t)(offset_t offset, uint8_t *buffer, uintptr_t length, device_write_callback_t callback, void *p)
SD-Card Reader Bibliothek von Roland Riegel.
#define PARTITION_TYPE_FREE