Files
luban-lite/bsp/peripheral/wireless/asr/wifidrv/inc/edrv/ipc_compat.h
刘可亮 803cac77d5 V1.0.6
2024-09-03 11:16:08 +08:00

45 lines
1.3 KiB
C

/**
****************************************************************************************
*
* @file ipc_compat.h
*
* Copyright (C) ASR
*
****************************************************************************************
*/
#ifndef _IPC_H_
#define _IPC_H_
#ifdef THREADX
#include "uart.h"
#else
// #include <kernel.h>
#endif
#define __INLINE static __attribute__((__always_inline__)) inline
#define __ALIGN4 __aligned(4)
#ifdef THREADX
#define ASSERT_ERR(condition) \
do { \
if ((!(condition))) { \
uart_printf("%s:%d:ASSERT_ERR(" #condition ")\n", __FILE__, __LINE__); \
while(1); \
} \
} while(0)
#else
#define ASSERT_ERR(condition) \
do { \
if ((!(condition))) { \
while(1); \
} \
} while(0)
#endif
#endif /* _IPC_H_ */