ads1115 only
Fork of mbed by
Diff: semihost_api.h
- Revision:
- 55:d722ed6a4237
- Parent:
- 54:71b101360fb9
- Child:
- 57:0480438fc29c
--- a/semihost_api.h Tue Jan 08 12:46:36 2013 +0000 +++ b/semihost_api.h Wed Jan 16 12:56:34 2013 +0000 @@ -29,6 +29,7 @@ extern "C" { #endif +#if DEVICE_SEMIHOST /* __semihost intrinsic This intrinsic inserts an SVC or BKPT instruction into the instruction stream generated by the compiler. It enables you to make semihosting calls from C or @@ -41,17 +42,13 @@ /* SWI numbers for RDI (Angel) monitors */ #ifdef __thumb__ -#define AngelSWI 0xAB +# define AngelSWI 0xAB +# define AngelSWIInsn "bkpt" +# define AngelSWIAsm bkpt #else -#define AngelSWI 0x123456 -#endif -/* For Thumb-2 code use the BKPT instruction instead of SWI */ -#ifdef __thumb2__ -#define AngelSWIInsn "bkpt" -#define AngelSWIAsm bkpt -#else -#define AngelSWIInsn "swi" -#define AngelSWIAsm swi +# define AngelSWI 0x123456 +# define AngelSWIInsn "swi" +# define AngelSWIAsm swi #endif inline int __semihost(int reason, const void *arg) { @@ -66,7 +63,7 @@ changed by a system call, so they should not be kept in registers. Note: we are assuming the manual is right and Angel is respecting the APCS. */ - + return value; } @@ -95,6 +92,8 @@ int semihost_connected(void); int semihost_disabledebug(void); +#endif + #ifdef __cplusplus } #endif