 |
Contiki-NG
|
Loading...
Searching...
No Matches
18#ifndef NRF_802154_PLATFORM_ASSERT_H_
19#define NRF_802154_PLATFORM_ASSERT_H_
21#define NRF_802154_ASSERT(condition) do { \
23 extern void uarte_write(unsigned char c); \
24 uarte_write('A'); uarte_write('!'); uarte_write(' '); \
26 { const char *_f = __FILE__; \
28 const char *_s = _f; \
29 while(*_s) { if(*_s == '/') _f = _s + 1; _s++; } \
30 while(*_f) uarte_write((unsigned char)*_f++); } \
33 { unsigned _l = __LINE__; \
34 char _b[6]; int _i = 0; \
35 if(_l == 0) { uarte_write('0'); } \
36 else { while(_l) { _b[_i++] = '0' + (_l % 10); _l /= 10; } \
37 while(_i--) uarte_write((unsigned char)_b[_i]); } } \
39 for(volatile int _d = 0; _d < 100000; _d++) {} \
41 __asm volatile("dsb 0xF":::"memory"); \
42 *((volatile unsigned long *)0xE000ED0CUL) = 0x05FA0004UL; \
43 __asm volatile("dsb 0xF":::"memory"); \
44 for(;;) { __asm volatile("nop"); } \