N64FlashcartMenu
Loading...
Searching...
No Matches
flashcart_utils.h
Go to the documentation of this file.
1
7#ifndef FLASHCART_UTILS_H__
8#define FLASHCART_UTILS_H__
9
10#include <stdbool.h>
11#include <stddef.h>
12#include <stdint.h>
13
14#include <fatfs/ff.h>
15
16#define SAVE_WRITEBACK_MAX_SECTORS (256)
17
25
33void pi_dma_read_data (void *src, void *dst, size_t length);
34
42void pi_dma_write_data (void *src, void *dst, size_t length);
43
49void fatfs_fix_file_size (FIL *fil);
50
60bool fatfs_get_file_sectors (char *path, uint32_t *address, address_type_t address_type, uint32_t max_sectors);
61
62#endif /* FLASHCART_UTILS_H__ */
address_type_t
Address types for DMA operations.
Definition flashcart_utils.h:21
@ ADDRESS_TYPE_MEM
Definition flashcart_utils.h:22
@ ADDRESS_TYPE_PI
Definition flashcart_utils.h:23
bool fatfs_get_file_sectors(char *path, uint32_t *address, address_type_t address_type, uint32_t max_sectors)
Get the file sectors in the FAT filesystem.
Definition flashcart_utils.c:64
void fatfs_fix_file_size(FIL *fil)
Fix the file size in the FAT filesystem.
Definition flashcart_utils.c:48
void pi_dma_write_data(void *src, void *dst, size_t length)
Perform a DMA write operation to the PI (Peripheral Interface).
Definition flashcart_utils.c:33
void pi_dma_read_data(void *src, void *dst, size_t length)
Perform a DMA read operation from the PI (Peripheral Interface).
Definition flashcart_utils.c:20