什么是枚举值? [英] What is the value in the enum ?
本文介绍了什么是枚举值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于显示在以下code,就是0和CVMX_FAU_REG_64_ADDR之间的差值(0)在cvmx_fau_reg_64_t?
的#define CVMX_FAU_REG_64_ADDR(X)((X LT; 3;)+ CVMX_FAU_REG_64_START)
的typedef枚举
{
CVMX_FAU_REG_64_START = 0,
CVMX_FAU_REG_64_END = CVMX_FAU_REG_64_ADDR(0),
} cvmx_fau_reg_64_t;
解决方案
在书面的code,这两个值== 0,没有实际价值没有区别。
As show in the following code, what is the difference between 0 and CVMX_FAU_REG_64_ADDR(0) in the cvmx_fau_reg_64_t?
#define CVMX_FAU_REG_64_ADDR(x) ((x <<3) + CVMX_FAU_REG_64_START)
typedef enum
{
CVMX_FAU_REG_64_START = 0,
CVMX_FAU_REG_64_END = CVMX_FAU_REG_64_ADDR(0),
} cvmx_fau_reg_64_t;
解决方案
In the code as written, both values == 0. There is no difference in the actual value.
这篇关于什么是枚举值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文