Permalink
Browse files

This commit was generated by cvs2svn to compensate for changes in r4,

which included commits to RCS files with non-trunk default branches.


git-svn-id: https://devkitpro.svn.sourceforge.net/svnroot/devkitpro/trunk/libogc@3 258c5a1a-4f63-435d-9564-e8f6d34ab52c
  • Loading branch information...
0 parents commit 391f2b2940cda2edde4b4827fce455ba38919efe wntrmute committed Aug 3, 2004
Showing with 74,558 additions and 0 deletions.
  1. +201 −0 Makefile
  2. +25 −0 gc/debug.h
  3. +34 −0 gc/gccore.h
  4. +44 −0 gc/gcmodplay.h
  5. +84 −0 gc/gctypes.h
  6. +111 −0 gc/ipv4/lwip/icmp.h
  7. +84 −0 gc/ipv4/lwip/inet.h
  8. +155 −0 gc/ipv4/lwip/ip.h
  9. +141 −0 gc/ipv4/lwip/ip_addr.h
  10. +46 −0 gc/ipv4/lwip/ip_frag.h
  11. +159 −0 gc/lwip/api.h
  12. +94 −0 gc/lwip/api_msg.h
  13. +216 −0 gc/lwip/arch.h
  14. +87 −0 gc/lwip/debug.h
  15. +47 −0 gc/lwip/def.h
  16. +212 −0 gc/lwip/dhcp.h
  17. +70 −0 gc/lwip/err.h
  18. +221 −0 gc/lwip/lwipopts.h
  19. +61 −0 gc/lwip/mem.h
  20. +63 −0 gc/lwip/memp.h
  21. +143 −0 gc/lwip/netif.h
  22. +642 −0 gc/lwip/opt.h
  23. +116 −0 gc/lwip/pbuf.h
  24. +74 −0 gc/lwip/raw.h
  25. +63 −0 gc/lwip/sio.h
  26. +178 −0 gc/lwip/snmp.h
  27. +261 −0 gc/lwip/sockets.h
  28. +158 −0 gc/lwip/stats.h
  29. +183 −0 gc/lwip/sys.h
  30. +533 −0 gc/lwip/tcp.h
  31. +68 −0 gc/lwip/tcpip.h
  32. +104 −0 gc/lwip/udp.h
  33. +49 −0 gc/mad/bit.h
  34. +130 −0 gc/mad/config.h
  35. +92 −0 gc/mad/decoder.h
  36. +486 −0 gc/mad/fixed.h
  37. +119 −0 gc/mad/frame.h
  38. +59 −0 gc/mad/global.h
  39. +68 −0 gc/mad/huffman.h
  40. +31 −0 gc/mad/layer12.h
  41. +30 −0 gc/mad/layer3.h
  42. +948 −0 gc/mad/mad.h
  43. +108 −0 gc/mad/stream.h
  44. +70 −0 gc/mad/synth.h
  45. +102 −0 gc/mad/timer.h
  46. +49 −0 gc/mad/version.h
  47. +16 −0 gc/madplayer.h
  48. +143 −0 gc/modplay.h
  49. +35 −0 gc/modplay/bpmtab.h
  50. +98 −0 gc/modplay/defines.h
  51. +34 −0 gc/modplay/freqtab.h
  52. +36 −0 gc/modplay/inctab.h
  53. +38 −0 gc/modplay/mixer.h
  54. +34 −0 gc/modplay/semitonetab.h
  55. +65 −0 gc/netif/arch/cc.h
  56. +40 −0 gc/netif/arch/cpu.h
  57. +47 −0 gc/netif/arch/init.h
  58. +43 −0 gc/netif/arch/lib.h
  59. +41 −0 gc/netif/arch/perf.h
  60. +54 −0 gc/netif/arch/sys_arch.h
  61. +98 −0 gc/netif/etharp.h
  62. +42 −0 gc/netif/gcif/gcif.h
  63. +39 −0 gc/netif/loopif.h
  64. +239 −0 gc/network.h
  65. +41 −0 gc/ogc/aram.h
  66. +48 −0 gc/ogc/audio.h
  67. +54 −0 gc/ogc/cache.h
  68. +141 −0 gc/ogc/card.h
  69. +47 −0 gc/ogc/cast.h
  70. +24 −0 gc/ogc/cond.h
  71. +50 −0 gc/ogc/context.h
  72. +44 −0 gc/ogc/dsp.h
  73. +19 −0 gc/ogc/dvd.h
  74. +16 −0 gc/ogc/exception.h
  75. +51 −0 gc/ogc/exi.h
  76. +166 −0 gc/ogc/gu.h
  77. +1,037 −0 gc/ogc/gx.h
  78. +30 −0 gc/ogc/gx_struct.h
  79. +95 −0 gc/ogc/irq.h
  80. +36 −0 gc/ogc/lwp.h
  81. +76 −0 gc/ogc/lwp_messages.h
  82. +74 −0 gc/ogc/lwp_mutex.h
  83. +31 −0 gc/ogc/lwp_priority.h
  84. +39 −0 gc/ogc/lwp_queue.h
  85. +42 −0 gc/ogc/lwp_sema.h
  86. +25 −0 gc/ogc/lwp_stack.h
  87. +46 −0 gc/ogc/lwp_states.h
  88. +37 −0 gc/ogc/lwp_threadq.h
  89. +91 −0 gc/ogc/lwp_threads.h
  90. +38 −0 gc/ogc/lwp_tqdata.h
  91. +53 −0 gc/ogc/lwp_watchdog.h
  92. +245 −0 gc/ogc/machine/asm.h
  93. +97 −0 gc/ogc/machine/processor.h
  94. +193 −0 gc/ogc/machine/spinlock.h
  95. +30 −0 gc/ogc/message.h
  96. +24 −0 gc/ogc/mutex.h
  97. +77 −0 gc/ogc/pad.h
  98. +21 −0 gc/ogc/semaphore.h
  99. +25 −0 gc/ogc/sys_state.h
  100. +55 −0 gc/ogc/system.h
  101. +43 −0 gc/ogc/video.h
  102. +58 −0 gc/ogc/video_types.h
  103. +21 −0 gc/ogcsys.h
  104. +1,120 −0 gcsdk.dsp
  105. +29 −0 gcsdk.dsw
  106. +3 −0 install.sh
  107. +533 −0 libdb/debug.c
  108. +155 −0 libdb/debug_handler.S
  109. +607 −0 libmad/D.dat
  110. +237 −0 libmad/bit.c
  111. +582 −0 libmad/decoder.c
  112. +81 −0 libmad/fixed.c
  113. +502 −0 libmad/frame.c
  114. +3,098 −0 libmad/huffman.c
  115. +62 −0 libmad/imdct_s.dat
  116. +510 −0 libmad/layer12.c
  117. +2,502 −0 libmad/layer3.c
  118. +119 −0 libmad/madplayer.c
  119. +77 −0 libmad/qc_table.dat
  120. +8,747 −0 libmad/rq_table.dat
  121. +106 −0 libmad/sf_table.dat
  122. +160 −0 libmad/stream.c
  123. +857 −0 libmad/synth.c
  124. +486 −0 libmad/timer.c
  125. +91 −0 libmad/version.c
  126. +228 −0 libmodplay/bpmtab32.c
  127. +228 −0 libmodplay/bpmtab48.c
  128. +44 −0 libmodplay/freqtab.c
  129. +317 −0 libmodplay/gcmodplay.c
  130. +4,102 −0 libmodplay/inctab32.c
  131. +4,102 −0 libmodplay/inctab48.c
  132. +219 −0 libmodplay/mixer.c
  133. +1,109 −0 libmodplay/modplay.c
  134. +4,129 −0 libmodplay/semitonetab.c
  135. +209 −0 libogc.dox
  136. +107 −0 libogc.prj
  137. +370 −0 libogc/aram.c
  138. +318 −0 libogc/audio.c
  139. +111 −0 libogc/cache.c
  140. +372 −0 libogc/cache_asm.S
  141. +669 −0 libogc/card.c
  142. +128 −0 libogc/cond.c
  143. +38 −0 libogc/decrementer.c
  144. +191 −0 libogc/decrementer_handler.S
  145. +281 −0 libogc/depackrnc.S
  146. +75 −0 libogc/dsp.c
  147. +78 −0 libogc/dvd.c
  148. +153 −0 libogc/exception.c
  149. +148 −0 libogc/exception_handler.S
  150. +526 −0 libogc/exi.c
  151. +32 −0 libogc/exi_asm.S
  152. +592 −0 libogc/gu.c
  153. +588 −0 libogc/gu_psasm.S
  154. +3,801 −0 libogc/gx.c
  155. +418 −0 libogc/irq.c
  156. +191 −0 libogc/irq_handler.S
  157. +167 −0 libogc/lwp.c
  158. +436 −0 libogc/lwp_handler.S
  159. +258 −0 libogc/lwp_messages.c
  160. +56 −0 libogc/lwp_messages.inl
  161. +95 −0 libogc/lwp_mutex.c
  162. +88 −0 libogc/lwp_mutex.inl
  163. +14 −0 libogc/lwp_priority.c
  164. +49 −0 libogc/lwp_priority.inl
  165. +68 −0 libogc/lwp_queue.c
  166. +113 −0 libogc/lwp_queue.inl
  167. +63 −0 libogc/lwp_sema.c
  168. +38 −0 libogc/lwp_sema.inl
  169. +26 −0 libogc/lwp_stack.c
  170. +14 −0 libogc/lwp_stack.inl
  171. +109 −0 libogc/lwp_states.inl
  172. +498 −0 libogc/lwp_threadq.c
  173. +9 −0 libogc/lwp_threadq.inl
  174. +638 −0 libogc/lwp_threads.c
  175. +78 −0 libogc/lwp_threads.inl
  176. +144 −0 libogc/lwp_watchdog.c
  177. +83 −0 libogc/lwp_watchdog.inl
  178. +93 −0 libogc/message.c
  179. +58 −0 libogc/mutex.c
  180. +354 −0 libogc/ogc_crt0.S
  181. +106 −0 libogc/pad.c
  182. +78 −0 libogc/semaphore.c
  183. +3 −0 libogc/sys_state.c
  184. +44 −0 libogc/sys_state.inl
  185. +282 −0 libogc/system.c
  186. +81 −0 libogc/system_asm.S
  187. +349 −0 libogc/video.c
  188. +107 −0 libogc/video_asm.S
  189. +37 −0 libogcsys/close.c
  190. +28 −0 libogcsys/color.h
  191. +191 −0 libogcsys/console.c
  192. +8 −0 libogcsys/console.h
  193. +4,613 −0 libogcsys/console_font.c
  194. +2,565 −0 libogcsys/console_font_8x8.c
  195. +28 −0 libogcsys/fstat.c
  196. +23 −0 libogcsys/getpid.c
  197. +11 −0 libogcsys/iosupp.c
  198. +21 −0 libogcsys/iosupp.h
  199. +12 −0 libogcsys/isatty.c
  200. +26 −0 libogcsys/kill.c
  201. +30 −0 libogcsys/lseek.c
  202. +80 −0 libogcsys/malloc_lock.c
  203. +39 −0 libogcsys/netio_fake.c
  204. +8 −0 libogcsys/netio_fake.h
  205. +81 −0 libogcsys/newlibc.c
  206. +68 −0 libogcsys/open.c
  207. +42 −0 libogcsys/read.c
  208. +48 −0 libogcsys/sbrk.c
  209. +18 −0 libogcsys/sleep.c
  210. +36 −0 libogcsys/stdin_fake.c
  211. +8 −0 libogcsys/stdin_fake.h
  212. +183 −0 libogcsys/timesupp.c
  213. +27 −0 libogcsys/timesupp.h
  214. +18 −0 libogcsys/usleep.c
  215. +41 −0 libogcsys/write.c
  216. +66 −0 lwip/arch/gc/lib_arch.c
  217. +1,110 −0 lwip/arch/gc/netif/gcif.c
  218. +850 −0 lwip/netif/etharp.c
  219. +119 −0 lwip/netif/loopif.c
  220. +302 −0 lwip/netif/skeleton/ethernetif.c
  221. +210 −0 lwip/netif/skeleton/slipif.c
  222. +77 −0 lwip/netio.c
  223. +2,184 −0 lwip/network.c
  224. +348 −0 ogc.ld
  225. +364 −0 specs.ogc
201 Makefile
@@ -0,0 +1,201 @@
+.SUFFIXES:
+
+#---------------------------------------------------------------------------------
+ifeq ($(USERNAME),davem)
+#---------------------------------------------------------------------------------
+export PATH:=/c/devkitPPC_r8/bin:/bin
+PREFIX := powerpc-elf-
+#---------------------------------------------------------------------------------
+else
+#---------------------------------------------------------------------------------
+PREFIX := powerpc-eabi-elf-
+#---------------------------------------------------------------------------------
+endif
+#---------------------------------------------------------------------------------
+
+
+
+CC := $(PREFIX)gcc
+CXX := $(PREFIX)g++
+AS := $(PREFIX)as
+AR := $(PREFIX)ar
+LD := $(PREFIX)ld
+OBJCOPY := $(PREFIX)objcopy
+
+BUILD := build
+#---------------------------------------------------------------------------------
+ifneq ($(BUILD),$(notdir $(CURDIR)))
+#---------------------------------------------------------------------------------
+export BASEDIR := $(CURDIR)
+export BUILDDIR := $(BASEDIR)/$(BUILD)
+export LIBDIR := $(BASEDIR)/lib
+export LWIPDIR := $(BASEDIR)/lwip
+export OGCDIR := $(BASEDIR)/libogc
+export MODDIR := $(BASEDIR)/libmodplay
+export MADDIR := $(BASEDIR)/libmad
+export DBDIR := $(BASEDIR)/libdb
+export GCSYSDIR := $(BASEDIR)/libogcsys
+
+export DEPSDIR := $(BASEDIR)/deps
+export INCDIR := $(BASEDIR)/include
+#---------------------------------------------------------------------------------
+endif
+#---------------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------------
+BBALIB := $(LIBDIR)/libbba
+OGCLIB := $(LIBDIR)/libogc
+MODLIB := $(LIBDIR)/libmodplay
+MADLIB := $(LIBDIR)/libmad
+DBLIB := $(LIBDIR)/libdb
+GCSYSLIB := $(LIBDIR)/libogcsys
+
+#---------------------------------------------------------------------------------
+DEFINCS := -I$(BASEDIR) -I$(BASEDIR)/gc
+INCLUDES := $(DEFINCS) -I$(BASEDIR)/gc/netif -I$(BASEDIR)/gc/ipv4 \
+ -I$(BASEDIR)/gc/ogc -I$(BASEDIR)/gc/ogc/machine -I$(BASEDIR)/gc/modplay -I$(BASEDIR)/gc/mad
+
+MACHDEP := -DGEKKO -mcpu=750 -meabi -msdata=eabi -mhard-float
+CFLAGS := -DGAMECUBE -O2 $(MACHDEP) -Wall $(INCLUDES)
+LDFLAGS :=
+
+#---------------------------------------------------------------------------------
+VPATH := $(LWIPDIR) \
+ $(LWIPDIR)/arch/gc \
+ $(LWIPDIR)/arch/gc/netif \
+ $(LWIPDIR)/core \
+ $(LWIPDIR)/core/ipv4 \
+ $(LWIPDIR)/netif \
+ $(OGCDIR) \
+ $(MODDIR) \
+ $(MADDIR) \
+ $(DBDIR) \
+ $(GCSYSDIR)
+
+
+#---------------------------------------------------------------------------------
+LWIPOBJ := network.o netio.o gcif.o lib_arch.o \
+ inet.o mem.o dhcp.o raw.o \
+ memp.o netif.o pbuf.o stats.o \
+ sys.o tcp.o tcp_in.o tcp_out.o \
+ udp.o icmp.o ip.o ip_frag.o \
+ ip_addr.o etharp.o loopif.o
+
+#---------------------------------------------------------------------------------
+OGCOBJ := lwp_priority.o lwp_queue.o lwp_threadq.o lwp_threads.o lwp_sema.o \
+ lwp_messages.o lwp.o lwp_handler.o lwp_stack.o lwp_mutex.o \
+ lwp_watchdog.o sys_state.o \
+ exception_handler.o exception.o irq.o irq_handler.o semaphore.o \
+ video_asm.o video.o pad.o dvd.o exi.o mutex.o \
+ cache_asm.o system.o exi_asm.o system_asm.o cond.o \
+ gx.o gu.o gu_psasm.o audio.o cache.o decrementer.o \
+ message.o card.o aram.o depackrnc.o decrementer_handler.o \
+ dsp.o ogc_crt0.o
+
+#---------------------------------------------------------------------------------
+MODOBJ := freqtab.o mixer.o modplay.o semitonetab.o gcmodplay.o \
+ bpmtab32.o bpmtab48.o \
+ inctab32.o inctab48.o
+
+#---------------------------------------------------------------------------------
+MADOBJ := bit.o decoder.o fixed.o frame.o huffman.o \
+ layer12.o layer3.o stream.o synth.o timer.o \
+ version.o madplayer.o
+
+#---------------------------------------------------------------------------------
+DBOBJ := debug_handler.o debug.o
+
+#---------------------------------------------------------------------------------
+GCSYSOBJ := newlibc.o sbrk.o open.o write.o close.o \
+ getpid.o kill.o isatty.o fstat.o read.o \
+ lseek.o sleep.o usleep.o timesupp.o \
+ malloc_lock.o console.o console_font.o \
+ console_font_8x8.o iosupp.o netio_fake.o \
+ stdin_fake.o
+
+#---------------------------------------------------------------------------------
+# Build rules:
+#---------------------------------------------------------------------------------
+%.o : %.c
+#---------------------------------------------------------------------------------
+ @echo $(notdir $<)
+ @$(CC) -MMD -MF $(DEPSDIR)/$*.d $(CFLAGS) -c $< -o $@
+
+#---------------------------------------------------------------------------------
+%.o : %.cpp
+#---------------------------------------------------------------------------------
+ @echo $(notdir $<)
+ @$(CC) -MMD -MF $(DEPSDIR)/$*.d $(CFLAGS) -c $< -o $@
+
+#---------------------------------------------------------------------------------
+%.o : %.S
+#---------------------------------------------------------------------------------
+ @echo $(notdir $<)
+ @$(CC) -MMD -MF $(DEPSDIR)/$*.d $(CFLAGS) -D_LANGUAGE_ASSEMBLY -c $< -o $@
+
+#---------------------------------------------------------------------------------
+%.o : %.s
+#---------------------------------------------------------------------------------
+ @echo $(notdir $<)
+ @$(AS) -mppc -Qy $< -o $(OBJDIR)/$@
+
+#---------------------------------------------------------------------------------
+%.a:
+#---------------------------------------------------------------------------------
+ $(AR) -rc $@ $^
+
+#---------------------------------------------------------------------------------
+all:
+#---------------------------------------------------------------------------------
+ @[ -d $(LIBDIR) ] || mkdir -p $(LIBDIR)
+ @[ -d $(DEPSDIR) ] || mkdir -p $(DEPSDIR)
+ @[ -d $(BUILDDIR) ] || mkdir -p $(BUILDDIR)
+ @make libs -C $(BUILDDIR) -f $(CURDIR)/Makefile
+
+#---------------------------------------------------------------------------------
+$(BBALIB).a: $(LWIPOBJ)
+#---------------------------------------------------------------------------------
+$(OGCLIB).a: $(OGCOBJ)
+#---------------------------------------------------------------------------------
+$(MP3LIB).a: $(MP3OBJ)
+#---------------------------------------------------------------------------------
+$(MODLIB).a: $(MODOBJ)
+#---------------------------------------------------------------------------------
+$(MADLIB).a: $(MADOBJ)
+#---------------------------------------------------------------------------------
+$(DBLIB).a: $(DBOBJ)
+#---------------------------------------------------------------------------------
+$(GCSYSLIB).a: $(GCSYSOBJ)
+#---------------------------------------------------------------------------------
+
+.PHONEY: libs install dist
+
+#---------------------------------------------------------------------------------
+install:
+#---------------------------------------------------------------------------------
+ @mkdir -p $(INCDIR)
+ @mkdir -p $(INCDIR)/ogc
+ @mkdir -p $(INCDIR)/modplay
+ @mkdir -p $(INCDIR)/mad
+ cp ./gc/*.h $(INCDIR)
+ cp ./gc/ogc/*.h $(INCDIR)/ogc
+ cp ./gc/modplay/*.h $(INCDIR)/modplay
+ cp ./gc/mad/*.h $(INCDIR)/mad
+
+#---------------------------------------------------------------------------------
+dist:
+#---------------------------------------------------------------------------------
+ tar -cjf libogc.tar.bz2 include lib
+
+#---------------------------------------------------------------------------------
+libs: $(OGCLIB).a $(BBALIB).a $(MODLIB).a $(MADLIB).a $(DBLIB).a $(GCSYSLIB).a
+#---------------------------------------------------------------------------------
+
+#---------------------------------------------------------------------------------
+clean:
+#---------------------------------------------------------------------------------
+ rm -fr $(BUILDDIR)
+ rm -fr $(DEPSDIR)
+ rm -f *.map
+
+-include $(DEPSDIR)/*.d
@@ -0,0 +1,25 @@
+#ifndef __DEBUG_H__
+#define __DEBUG_H__
+
+#include <gctypes.h>
+
+#define GDBSTUB_PORT 2828
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+typedef struct _ptregs {
+ u32 gpr[32];
+ f64 fpr[32];
+ u32 pc, ps, cnd, lr;
+ u32 cnt, xer, mq;
+} pt_regs;
+
+void DEBUG_Init(u32 port);
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif
@@ -0,0 +1,34 @@
+#ifndef __GCCORE_H__
+#define __GCCORE_H__
+
+#include "ogc/aram.h"
+#include "ogc/audio.h"
+#include "ogc/cache.h"
+#include "ogc/card.h"
+#include "ogc/cast.h"
+#include "ogc/exi.h"
+#include "ogc/gu.h"
+#include "ogc/gx.h"
+#include "ogc/gx_struct.h"
+#include "ogc/irq.h"
+#include "ogc/lwp.h"
+#include "ogc/message.h"
+#include "ogc/semaphore.h"
+#include "ogc/pad.h"
+#include "ogc/system.h"
+#include "ogc/video.h"
+#include "ogc/video_types.h"
+
+#define ATTRIBUTE_ALIGN(v) __attribute__((aligned(v)))
+
+#ifdef __cplusplus
+ extern "C" {
+#endif /* __cplusplus */
+
+void depackrnc(void *src,void *dst);
+
+#ifdef __cplusplus
+ }
+#endif /* __cplusplus */
+
+#endif
@@ -0,0 +1,44 @@
+#ifndef __GCMODPLAY_H__
+#define __GCMODPLAY_H__
+
+#include <gctypes.h>
+#include <modplay.h>
+
+#ifdef __cplusplus
+ extern "C" {
+#endif /* __cplusplus */
+
+typedef struct _modsndbuf {
+ u32 freq;
+ u16 fmt;
+ u32 chans;
+ f32 samples;
+ u32 data_len;
+ void *usr_data;
+ void (*callback)(void *,u8 *,u32);
+} MODSNDBUF;
+
+typedef struct _modplay {
+ MOD mod;
+ BOOL playing,paused;
+ BOOL bits,stereo,manual_polling;
+ u32 playfreq,numSFXChans;
+ MODSNDBUF soundBuf;
+} MODPlay;
+
+void MODPlay_Init(MODPlay *mod);
+u32 MODPlay_SetFrequency(MODPlay *mod,u32 freq);
+void MODPlay_SetStereo(MODPlay *mod,BOOL stereo);
+u32 MODPlay_SetMOD(MODPlay *mod,u8 *mem);
+void MODPlay_Unload(MODPlay *mod);
+u32 MODPlay_AllocSFXChannels(MODPlay *mod,u32 sfxchans);
+u32 MODPlay_Start(MODPlay *mod);
+u32 MODPlay_Stop(MODPlay *mod);
+u32 MODPlay_TriggerNote(MODPlay *mod,u32 chan,u8 inst,u16 freq,u8 vol);
+u32 MODPlay_Pause(MODPlay *mod,BOOL);
+
+#ifdef __cplusplus
+ }
+#endif /* __cplusplus */
+
+#endif
@@ -0,0 +1,84 @@
+#ifndef __GCTYPES_H__
+#define __GCTYPES_H__
+/*+----------------------------------------------------------------------------------------------+*/
+// typedef's borrowed from the HAM development kit for Gameboy Advance
+// See www.ngine.de for information about this fantastic devkit!
+/*+----------------------------------------------------------------------------------------------+*/
+
+#ifdef __cplusplus
+ extern "C" {
+#endif /* __cplusplus */
+
+// bool is a standard type in cplusplus, but not in c.
+#ifndef __cplusplus
+typedef unsigned char bool; ///< For c++ compatibility
+#endif
+/*+----------------------------------------------------------------------------------------------+*/
+typedef unsigned char u8; ///< 8bit unsigned integer
+typedef unsigned short u16; ///< 16bit unsigned integer
+typedef unsigned int u32; ///< 32bit unsigned integer
+typedef unsigned long long u64; ///< 64bit unsigned integer
+/*+----------------------------------------------------------------------------------------------+*/
+typedef signed char s8; ///< 8bit signed integer
+typedef signed short s16; ///< 16bit signed integer
+typedef signed int s32; ///< 32bit signed integer
+typedef signed long long s64; ///< 64bit signed integer
+/*+----------------------------------------------------------------------------------------------+*/
+typedef volatile unsigned char vu8; ///< 8bit unsigned volatile't integer
+typedef volatile unsigned short vu16; ///< 16bit unsigned volatile't integer
+typedef volatile unsigned int vu32; ///< 32bit unsigned volatile't integer
+typedef volatile unsigned long long vu64; ///< 64bit unsigned volatile't integer
+/*+----------------------------------------------------------------------------------------------+*/
+typedef volatile signed char vs8; ///< 8bit signed volatile't integer
+typedef volatile signed short vs16; ///< 16bit signed volatile't integer
+typedef volatile signed int vs32; ///< 32bit signed volatile't integer
+typedef volatile signed long long vs64; ///< 64bit signed volatile't integer
+/*+----------------------------------------------------------------------------------------------+*/
+// fixed point math typedefs
+typedef s16 sfp16; ///< 1:7:8 fixed point
+typedef s32 sfp32; ///< 1:19:8 fixed point
+typedef u16 ufp16; ///< 8:8 fixed point
+typedef u32 ufp32; ///< 24:8 fixed point
+/*+----------------------------------------------------------------------------------------------+*/
+typedef float f32;
+typedef double f64;
+/*+----------------------------------------------------------------------------------------------+*/
+typedef volatile float vf32;
+typedef volatile double vf64;
+/*+----------------------------------------------------------------------------------------------+*/
+typedef unsigned int BOOL;
+/*+----------------------------------------------------------------------------------------------+*/
+// alias type typedefs
+#define FIXED s32 ///< Alias type for sfp32
+/*+----------------------------------------------------------------------------------------------+*/
+// boolean defines
+#ifndef boolean
+#define boolean u8
+#endif
+/*+----------------------------------------------------------------------------------------------+*/
+#ifndef TRUE
+#define TRUE 1 ///< True
+#endif
+/*+----------------------------------------------------------------------------------------------+*/
+#ifndef FALSE
+#define FALSE 0 ///< False
+#endif
+/*+----------------------------------------------------------------------------------------------+*/
+#ifndef __cplusplus
+#define true TRUE ///< For c++ compatibility
+#define false FALSE ///< For c++ compatibility
+#endif
+/*+----------------------------------------------------------------------------------------------+*/
+#ifndef NULL
+#define NULL 0 ///< Pointer to 0
+#endif
+/*+----------------------------------------------------------------------------------------------+*/
+
+#ifdef __cplusplus
+ }
+#endif /* __cplusplus */
+
+#endif /* TYPES_H */
+
+
+/* END OF FILE */
Oops, something went wrong.

0 comments on commit 391f2b2

Please sign in to comment.