This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

C2000WARE中 drivelib和bit-field两个文件加了的工程有什么区别???

Other Parts Discussed in Thread: C2000WARE

首先我看bit-field文件夹里的工程比drivelib中要多一些,他们之间也有些是功能重叠的,另外我觉得他们好像是再用不同的编程理念写的,bit-field是较为传统的直接读写寄存器某些位的方法,而dirvelib是把大部分的读写寄存器操作封装成了函数,通过宏定义一些指针及偏移,再在函数中调用这些指针和偏移来实现对寄存器的读写。

有没有哪位前辈对这个问题比较了解呀,还请指教一二,或者有解决对我这个问题有帮助的文档连接,也都可以。

感谢!!!

  • C2000Ware中的bitfield和driverlib文件夹中的示例在功能上是相同的。这些都是用于访问存储器映射外设寄存器的硬件抽象层方法。

    具体您可以看一下

    www.ti.com/.../spraa85e.pdf

    This application report explores hardware abstraction layer implementations to make programming of peripherals easy using C/C++ on TMS320x28xx and TMS320x28xxx devices. The methods of using bit field structure header files and the C2000™ Peripheral Driver Library are compared to each other and to the traditional #define macro approach.
  • 多谢前辈,另外还有一个问题,我如果想用C2000WARE提供的空工程作为起点搭建我自己的工程,上边这三个选项有什么区别和联系呢?

  • 1是使用driverlib的CPU1的工程
    2是使用driverlib的CPU1&CPU1的双核工程
    3是使用bitfield和driverlib的工程