...
首页> 外文期刊>C - C++ Users Journal >Register Access in C++
【24h】

Register Access in C++

机译:在C ++中注册访问

获取原文
获取原文并翻译 | 示例

摘要

Embedded programmers traditionally use C as their language of choice. And why not? It's lean and efficient, and lets you get as close to the metal as you want. Of course C++, used properly, provides the same level of efficiency as the best C code. Moreover, you can also leverage powerful C++ features to write cleaner, safer, more elegant low-level code. In this article, I present a C++ scheme for accessing hardware registers in an optimal way. Most embedded code needs to service hardware directly. This seemingly magical act is not that hard. Some kinds of registers need a little more fiddling to get at than others, but you certainly don't need an eye-of-newt or any voodoo dances.
机译:传统上,嵌入式程序员使用C作为他们选择的语言。那么为何不?它轻巧高效,可以让您尽可能接近金属。当然,正确使用C ++可以提供与最佳C代码相同水平的效率。此外,您还可以利用强大的C ++功能编写更干净,更安全,更优雅的低级代码。在本文中,我提出了一种以最佳方式访问硬件寄存器的C ++方案。大多数嵌入式代码需要直接为硬件服务。这种看似神奇的行为并不难。某些收音器需要比其他收音器多一些摆弄,但是您当然不需要an目结舌或任何伏都教舞蹈。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号