You've already forked hackerlibultra
mirror of
https://github.com/HackerN64/hackerlibultra.git
synced 2026-01-21 10:37:53 -08:00
* set build options * remove COMPARE and MDOERN_* switches * remove tools makefile * AR patching is gone too since we want a fullly decomped version * AR is modern * remove cwd changes * edit my own tool to fix compile errors * compile files generated with my own tool instead of the originals * inline modern_gcc makefile * port mips toolchain detection logic * add util.mk for find-command * remove forced AR order and strip/mdebug removal commands * add -mabi=32 to as flags * formatting changes * add clang format files * formatting changes * make libgultra CI work * install mips gcc too * add format check tools * Add formatting to CI * Add CI (#4) * make libgultra CI work * install mips gcc too * remove make setup --------- Co-authored-by: someone2639 <someone2639@gmail.com> * we don't use clang-tidy * use 120 width for formatting * a * address clang-tidy messing up * test * align consecutive macros and declarations * only align macros for now * SpaceAfterCStyleCast: false * format headers too * remove cast space switch because its false by default * pointers on left * AlignConsecutiveBitFields: true * install clang-format and clang-tidy on gh actions * and clang-tools * show diff in format check tool * make CI work --------- Co-authored-by: someone2639 <someone2639@gmail.com> 🙏
41 lines
953 B
C
41 lines
953 B
C
#ifndef _OS_INTERNAL_FLASH_H_
|
|
#define _OS_INTERNAL_FLASH_H_
|
|
|
|
#include "os_message.h"
|
|
#include "os_flash.h"
|
|
|
|
#define FLASH_BLOCK_SIZE 128
|
|
|
|
/**
|
|
* Flash commands
|
|
*/
|
|
#define FLASH_CMD_REG 0x10000
|
|
|
|
/* set whole chip erase mode */
|
|
#define FLASH_CMD_CHIP_ERASE 0x3C000000
|
|
/* set sector erase mode */
|
|
#define FLASH_CMD_SECTOR_ERASE 0x4B000000
|
|
/* do erasure */
|
|
#define FLASH_CMD_EXECUTE_ERASE 0x78000000
|
|
/* program selected page */
|
|
#define FLASH_CMD_PROGRAM_PAGE 0xA5000000
|
|
/* set page program mode */
|
|
#define FLASH_CMD_PAGE_PROGRAM 0xB4000000
|
|
/* set status mode */
|
|
#define FLASH_CMD_STATUS 0xD2000000
|
|
/* set silicon id mode */
|
|
#define FLASH_CMD_ID 0xE1000000
|
|
/* set read mode */
|
|
#define FLASH_CMD_READ_ARRAY 0xF0000000
|
|
|
|
extern OSIoMesg __osFlashMsg;
|
|
extern OSMesgQueue __osFlashMessageQ;
|
|
extern OSPiHandle __osFlashHandler;
|
|
extern OSMesg __osFlashMsgBuf[1];
|
|
extern s32 __osFlashVersion;
|
|
extern u32 __osFlashID[4];
|
|
|
|
u32 __osFlashGetAddr(u32 page_num);
|
|
|
|
#endif
|