static,const小结

(1)static的作用:“共享”+“专用”

   c语言中:修饰函数里的局部变量-->共享

                  修饰全局变量和全局函数-->专用

   C++中:修饰成员变量-->共享

                修饰成员函数-->专用

(2)const:“只读”

    c语言中:常与*搭配,const函数

    c++中:可修饰成员变量、成员函数、对象

/** Valid 20M channels of 2.4G band */ static const struct clm_channel_comb valid_channels_2g_20m[] = { { 1, 14, 1}, /* 1 - 14 with step of 1 */ }; /** Set of 20M 2.4G valid channels' set */ static const struct clm_channel_comb_set valid_channel_2g_20m_set = { 1, valid_channels_2g_20m }; /** Valid 40M channels of 2.4G band */ static const struct clm_channel_comb valid_channels_2g_40m[] = { { 3, 11, 1}, /* 3 - 11 with step of 1 */ }; /** Set of 40M 2.4G valid channels' set */ static const struct clm_channel_comb_set valid_channel_2g_40m_set = { 1, valid_channels_2g_40m }; /** Valid 20M channels of 5G band */ static const struct clm_channel_comb valid_channels_5g_20m[] = { { 36, 64, 4}, /* 36 - 64 with step of 4 */ {100, 144, 4}, /* 100 - 144 with step of 4 */ {149, 177, 4}, /* 149 - 177 with step of 4 */ }; /** Set of 20M 5G valid channels' set */ static const struct clm_channel_comb_set valid_channel_5g_20m_set = { 3, valid_channels_5g_20m }; /** Valid 40M channels of 5G band */ static const struct clm_channel_comb valid_channels_5g_40m[] = { { 38, 62, 8}, /* 38 - 62 with step of 8 */ {102, 142, 8}, /* 102 - 142 with step of 8 */ {151, 175, 8}, /* 151 - 175 with step of 8 */ }; /** Set of 40M 5G valid channels' set */ static const struct clm_channel_comb_set valid_channel_5g_40m_set = { 3, valid_channels_5g_40m }; /** Valid 80M channels of 5G band */ static const struct clm_channel_comb valid_channels_5g_80m[] = { { 42, 58, 16}, /* 42 - 58 with step of 16 */ {106, 138, 16}, /* 106 - 138 with step of 16 */ {155, 171, 16}, /* 155 - 171 with step of 16 */ }; /** Set of 80M 5G valid channels' set */ static const struct clm_channel_comb_set valid_channel_5g_80m_set = { 3, valid_channels_5g_80m }; /** Valid 160M channels of 5G band */ static const struct clm_channel_comb valid_channels_5g_160m[] = { { 50, 50, 32}, /* 50 - 50 */ {114, 114, 32}, /* 114 - 114 */ {163, 163, 32}, /* 163 - 163 */ }; /** Set of 160M 5G valid channels' set */ static const struct clm_channel_comb_set valid_channel_5g_160m_set = { 3, valid_channels_5g_160m }; /** Valid 20M channels of 6G band */ static const struct clm_channel_comb valid_channels_6g_20m[] = { { 2, 2, 4}, /* 2 - 2 */ { 1, 233, 4}, /* 1 - 233 with step of 4 */ }; /** Set of 20M 6G valid channels' set */ static const struct clm_channel_comb_set valid_channel_6g_20m_set = { 2, valid_channels_6g_20m }; /** Valid 40M channels of 6G band */ static const struct clm_channel_comb valid_channels_6g_40m[] = { { 3, 227, 8}, /* 3 - 227 with step of 8 */ }; /** Set of 40M 6G valid channels' set */ static const struct clm_channel_comb_set valid_channel_6g_40m_set = { 1, valid_channels_6g_40m }; /** Valid 80M channels of 6G band */ static const struct clm_channel_comb valid_channels_6g_80m[] = { { 7, 215, 16}, /* 7 - 215 with step of 16 */ }; /** Set of 80M 6G valid channels' set */ static const struct clm_channel_comb_set valid_channel_6g_80m_set = { 1, valid_channels_6g_80m }; /** Valid 160M channels of 6G band */ static const struct clm_channel_comb valid_channels_6g_160m[] = { { 15, 207, 32}, /* 15 - 207 with step of 32 */ }; /** Set of 160M 6G valid channels' set */ static const struct clm_channel_comb_set valid_channel_6g_160m_set = { 1, valid_channels_6g_160m }; /** Valid 320M channels of 6G band */ static const struct clm_channel_comb valid_channels_6g_320m[] = { { 31, 191, 32}, /* 31 - 191 with step of 32 */ }; /** Set of 320M 6G valid channels' set */ static const struct clm_channel_comb_set valid_channel_6g_320m_set = { 1, valid_channels_6g_320m }; 什么意思
最新发布
10-15
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值