flatmush / dingoo-sdk

Automatically exported from code.google.com/p/dingoo-sdk
2 stars 3 forks source link

Please add a #define'd symbol to identify the platform #56

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Having a special symbol defined only in Dingoo native SDK will help 
cross-platform code to make decisions.

Sure, it's always possible to define own symbols, but this way it will be 100% 
bullet-proof.

For a list of predefined symbols for other platforms see e.g. here: 
http://predef.sourceforge.net/preos.html

Original issue reported on code.google.com by rcl.rs....@gmail.com on 26 Oct 2010 at 12:54

GoogleCodeExporter commented 9 years ago
Proposed patch :)

Index: include/dingoo/ucos2.h
===================================================================
--- include/dingoo/ucos2.h  (revision 271)
+++ include/dingoo/ucos2.h  (working copy)
@@ -8,6 +8,9 @@

 #include <stdint.h>

+// system id
+#define DINGOO_UCOS2
+
 #define OS_TICKS_PER_SEC 100

 #define OS_DEL_NO_PEND 0

Original comment by rcl.rs....@gmail.com on 27 Oct 2010 at 11:41

GoogleCodeExporter commented 9 years ago
I usually just define these things in the makefile. Also if someone builds a 
minimal app like the hello world sample, ucos2.h won't be included.

So I'm not sure this will give much.

Original comment by hart...@gmail.com on 14 Nov 2010 at 6:53