7181|7

71

帖子

0

TA的资源

一粒金砂(初级)

楼主
 

请问cosmic有没有类似keil的sbit这样的定义位操作的指令 [复制链接]

                                 请问cosmic有没有类似keil的sbit这样的定义位操作的指令
此帖出自stm32/stm8论坛

最新回复

                                 COSMIC自带文件Clanguage中很明确提到。忙不是理由啊 Absolute Addressing The COSMIC compiler allows an object to be declared along with its address when it is known at compile time (I/O registers). The address is specified just after the declaration and is replacing the initialization part. It is prefixed by the @ character: volatile char PORTB @0x10; Such a declaration is in fact equivalent to an extern declaration so it is not possible to initialize such a variable. This can also be applied to a function declaration if such a function already exists at a known address in the application. This cannot be used to locate a function defined in the application at a predefined address. A bit variable can also be declared at an absolute location by defining its byte address followed by a colon character and the bit position: _Bool PB3 @0x10:3 or, if the variable PORTB has been previously declared as before: _Bool PB3 @PORTB:3  详情 回复 发表于 2010-12-1 21:29
点赞 关注
 

回复
举报

79

帖子

0

TA的资源

一粒金砂(初级)

沙发
 

如:sbit USER1_6 = USER1^6;

                                 sbit USER1_6 = USER1^6;
此帖出自stm32/stm8论坛
 
 

回复

74

帖子

0

TA的资源

一粒金砂(初级)

板凳
 

没有

                                 详情请看相关手册。
此帖出自stm32/stm8论坛
 
 

回复

75

帖子

0

TA的资源

一粒金砂(初级)

4
 

谢谢香版

                                 二月底的st7项目,三月份要出成品,cosmic环境刚刚才建立,谢谢版主了
此帖出自stm32/stm8论坛
 
 
 

回复

75

帖子

0

TA的资源

一粒金砂(初级)

5
 
                                 _Bool
此帖出自stm32/stm8论坛
 
 
 

回复

77

帖子

0

TA的资源

一粒金砂(初级)

6
 
                                 LS怎么把两年前的贴子翻出来了
此帖出自stm32/stm8论坛
 
 
 

回复

71

帖子

0

TA的资源

一粒金砂(初级)

7
 
                                 应该有
此帖出自stm32/stm8论坛
 
 
 

回复

79

帖子

0

TA的资源

一粒金砂(初级)

8
 
COSMIC自带文件Clanguage中很明确提到。忙不是理由啊

Absolute Addressing
The COSMIC compiler allows an object to be declared along with its
address when it is known at compile time (I/O registers). The address is
specified just after the declaration and is replacing the initialization
part. It is prefixed by the @ character:
volatile char PORTB @0x10;
Such a declaration is in fact equivalent to an extern declaration so it is
not possible to initialize such a variable. This can also be applied to a
function declaration if such a function already exists at a known address
in the application. This cannot be used to locate a function defined in
the application at a predefined address.
A bit variable can also be declared at an absolute location by defining
its byte address followed by a colon character and the bit position:
_Bool PB3 @0x10:3
or, if the variable PORTB has been previously declared as before:
_Bool PB3 @PORTB:3
此帖出自stm32/stm8论坛
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/10 下一条
有奖直播:当AI遇见仿真,会有什么样的电子行业革新之路?
首场直播:Simcenter AI 赋能电子行业研发创新
直播时间:04月15日14:00-14:50

查看 »

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

 
机器人开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网 7

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表