SmartCar-V1/Code/library/public_diy.h

30 lines
414 B
C

#ifndef __PUBLIC_DIY_H__
#define __PUBLIC_DIY_H__
#ifndef RET_OK
#define RET_OK (0u)
#endif
#ifndef RET_ERROR
#define RET_ERROR (1u)
#endif
#ifndef TRUE
#define TRUE (1u)
#endif
#ifndef FALSE
#define FALSE (0u)
#endif
/* 开关全局中断的宏 */
#define ENABLE_INT() __set_PRIMASK(0) /* 使能全局中断 */
#define DISABLE_INT() __set_PRIMASK(1) /* 禁止全局中断 */
#endif