将菜单的架构改成 MVP,并且进一步优化视图层和模型层的逻辑
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef __TYPES__H__
|
||||
#define __TYPES__H__
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define uint8_t unsigned char
|
||||
#define uint16_t unsigned short
|
||||
#define uint32_t unsigned int
|
||||
@@ -15,4 +17,18 @@
|
||||
typedef int (*FUNCPTR) ( );
|
||||
|
||||
|
||||
// 调试模式断言
|
||||
#ifdef DEBUG
|
||||
#define ASSERT(expr) \
|
||||
do { \
|
||||
if (expr) { \
|
||||
printf("Assertion failed: %s, file %s, line %d\n", \
|
||||
#expr, __FILE__, __LINE__); \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
#define ASSERT(expr) ((void)0) // 发布模式禁用断言
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user