mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-11-25 03:56:54 +01:00
fix warnings
This commit is contained in:
parent
5099642e3a
commit
3036513094
@ -37,13 +37,11 @@ static flashcart_err_t ed64_init (void) {
|
||||
FIL lrp_fil;
|
||||
UINT lrp_br;
|
||||
TCHAR lrp_path[1024];
|
||||
lrp_path[0] = '\0';
|
||||
|
||||
if (f_open(&lrp_fil, LAST_SAVE_FILE_PATH, FA_READ) != FR_OK) {
|
||||
return FLASHCART_ERR_LOAD;
|
||||
}
|
||||
|
||||
if (f_read(&lrp_fil, lrp_path, 1024, &lrp_br) != FR_OK) {
|
||||
if (f_read(&lrp_fil, lrp_path, sizeof(&lrp_fil) + 1, &lrp_br) != FR_OK) {
|
||||
f_close(&lrp_fil);
|
||||
return FLASHCART_ERR_LOAD;
|
||||
}
|
||||
|
@ -215,22 +215,22 @@ void PI_SafeDMAFromCart(void *dest, void *src, u32 size) {
|
||||
#include "types.h"
|
||||
|
||||
int getSRAM( uint8_t *buffer, int size){
|
||||
while (dma_busy()) ;
|
||||
dma_wait();
|
||||
|
||||
IO_WRITE(PI_BSD_DOM2_LAT_REG, 0x05);
|
||||
IO_WRITE(PI_BSD_DOM2_PWD_REG, 0x0C);
|
||||
IO_WRITE(PI_BSD_DOM2_PGS_REG, 0x0D);
|
||||
IO_WRITE(PI_BSD_DOM2_RLS_REG, 0x02);
|
||||
|
||||
while (dma_busy()) ;
|
||||
dma_wait();
|
||||
|
||||
PI_Init();
|
||||
|
||||
while (dma_busy()) ;
|
||||
dma_wait();
|
||||
|
||||
PI_DMAFromSRAM(buffer, 0, size) ;
|
||||
|
||||
while (dma_busy()) ;
|
||||
dma_wait();
|
||||
|
||||
IO_WRITE(PI_BSD_DOM2_LAT_REG, 0x40);
|
||||
IO_WRITE(PI_BSD_DOM2_PWD_REG, 0x12);
|
||||
@ -263,7 +263,7 @@ int setSRAM( uint8_t *buffer, int size){
|
||||
PI_Init();
|
||||
|
||||
data_cache_hit_writeback_invalidate(buffer,size);
|
||||
while (dma_busy());
|
||||
dma_wait();
|
||||
PI_DMAToSRAM(buffer, 0, size);
|
||||
data_cache_hit_writeback_invalidate(buffer,size);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user