added ifndefs to header files

This commit is contained in:
Robin Jones 2017-10-11 16:53:18 +01:00
parent 0c34a482e9
commit 7586104ffc
16 changed files with 52 additions and 16 deletions

View File

@ -3,6 +3,9 @@
// See LICENSE file in the project root for full license information.
//
#ifndef _DEBUG_H
#define _DEBUG_H
#ifdef DEBUG
#define TRACEF(disp, text, ...) dbg_printf(disp, text, __VA_ARGS__);
#define TRACE(disp, text) printText(text, 3, -1, disp);
@ -27,4 +30,7 @@ void dbg_printf(display_context_t disp, const char *fmt, ...)
u8 tmp[32];
sprintf(tmp, "%s", buf);
printText(tmp, 3, -1, disp);
}
}
#endif

View File

@ -23,6 +23,4 @@ void diskSetInterface(u32 interface);
#define DISK_IFACE_SD 1
#endif /* _DISK_H */

View File

@ -65,5 +65,5 @@
#define SD_INIT_ERROR 80
#endif /* _ERRORS_H */
#endif /* _ERRORS_H */

View File

@ -121,5 +121,6 @@ u8 evd_mmcOpenRead(u32 addr);
u8 evd_mmcReadNextBlock(void *dat);
void evd_mmcCloseRW();
*/
#endif /* _EVERDRIVE_H */
#endif /* _EVERDRIVE_H */

View File

@ -119,5 +119,6 @@ u8 fatGetFullName(u8 *name, u32 dir_entry, u32 rec_entry);
u8 fatOpenDirByName(u8 *name);
void fatInitRam();
void fatSortRecords();
#endif /* _FAT_H */
#endif /* _FAT_H */

View File

@ -4,6 +4,9 @@
// See LICENSE file in the project root for full license information.
//
#ifndef _HASHTABLE_H
#define _HASHTABLE_H
typedef struct hashtable hashtable;
void hashtable_destroy(hashtable *t);
typedef struct hashtable_entry hashtable_entry;
@ -23,4 +26,6 @@ struct hashtable {
struct hashtable_entry {
char* key;
void* value;
};
};
#endif

View File

@ -3,6 +3,8 @@
// Portions (c) 2013 saturnu (Alt64) based on libdragon, Neo64Menu, ED64IO, libn64-hkz, libmikmod
// See LICENSE file in the project root for full license information.
//
#ifndef MAIN_H
#define MAIN_H
//TODO: some of these should probably be includes not protos in main
void bootRom(display_context_t disp, int silent);
@ -39,3 +41,5 @@ void drawTextInput(display_context_t disp,char *msg);
* @return An aligned address guaranteed to be >= the unaligned address
*/
//#define ALIGN_16BYTE(x) ((void *)(((uint32_t)(x)+15) & 0xFFFFFFF0))
#endif

View File

@ -6,6 +6,7 @@
#ifndef _MEM_H
#define _MEM_H
#include "types.h"
#define SPI_SPEED_INIT 2

View File

@ -4,6 +4,9 @@
// See LICENSE file in the project root for full license information.
//
#ifndef _ROM_H
#define _ROM_H
/*
*
0000h (1 byte): initial PI_BSB_DOM1_LAT_REG value (0x80)
@ -159,4 +162,6 @@ int is_valid_rom(unsigned char *buffer);
void swap_header(unsigned char* header, int loadlength);
u8 getCicType(u8 bios_cic);
int get_cic(unsigned char *buffer);
int get_cic(unsigned char *buffer);
#endif

View File

@ -2,9 +2,13 @@
// Copyright (c) 2017 The Altra64 project contributors
// See LICENSE file in the project root for full license information.
//
#ifndef _SOUND_H
#define _SOUND_H
void sndInit(void);
void sndPlayBGM(char* filename);
void sndStopAll(void);
void sndPlaySFX(char* filename);
void sndUpdate(void);
void sndUpdate(void);
#endif

View File

@ -4,6 +4,9 @@
// See LICENSE file in the project root for full license information.
//
#ifndef _SRAM_H
#define _SRAM_H
#include <stdlib.h>
#include <stdint.h>
#include "types.h"
@ -35,3 +38,5 @@ void *safe_malloc(size_t size);
void safe_free(void *ptr);
void *safe_memset(void *s, int c, size_t n);
void *safe_memcpy(void *dest, const void *src, size_t n);
#endif

View File

@ -4,7 +4,8 @@
// See LICENSE file in the project root for full license information.
//
#ifndef STRLIB_H_
#ifndef _STRLIB_H
#define _STRLIB_H
#include "types.h"
@ -40,4 +41,5 @@ u8 streq(u8 *str1, u8 *str2);
u8 streql(u8 *str1, u8 *str2, u8 len);
u16 strContain(u8 *target, u8 *str);
#endif

View File

@ -6,6 +6,7 @@
#ifndef _SYS_H
#define _SYS_H
#include "types.h"
#include "utils.h"
#include <libdragon.h>
@ -51,5 +52,5 @@ typedef struct {
extern Options_st options;
extern u32 asm_date;
#endif /* _TOOLS_H */
#endif /* _SYS_H */

View File

@ -32,4 +32,3 @@ typedef uint64_t sim_u64;
#endif /* _TYPES_H */

View File

@ -4,12 +4,11 @@
// See LICENSE file in the project root for full license information.
//
#ifndef _FIFO_H
#define _FIFO_H
#ifndef _USB_H
#define _USB_H
#include "types.h"
u8 usbListener();
#endif /* _FIFO_H */
#endif /* _USB_H */

View File

@ -4,6 +4,9 @@
// See LICENSE file in the project root for full license information.
//
#ifndef _UTILS_H
#define _UTILS_H
// rom.h
// rom tools - header inspect
#include <stdint.h>
@ -67,3 +70,5 @@ int setSRAM128( uint8_t *buffer);
int setEeprom4k( uint8_t *buffer);
int setEeprom16k( uint8_t *buffer);
int setFlashRAM( uint8_t *buffer);
#endif