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.

[参考译文] AM2434:#39;uint32_t'键入传递&'uint64_t'函数的类型参数

Guru**** 2036780 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1109783/am2434-uint32_t-type-passing-through-uint64_t-type-argument-of-function

器件型号:AM2434

尊敬的香榭丽舍

我的客户发现 'uint32_t'类型正在将'uint64_t'类型 的函数参数传递给 SDK 库函数。 这是可以的吗?

他们发现由 syscfg 生成的 SOC_ModuleClockFrequency 结构的成员'clkRate'类型为'unit32_t'、但它通过了 SDK 中 SOC_moduleSetClockFrequency 的'unit64_t'类型'clkRate'。  

请查看以下内容并澄清这一点吗?

SoC_ModuleClockFrequency 结构定义、SOC_ModuleClockFrequency 结构的成员'gSockModuleClockFrequency'定义

2.使用 gSockModuleClockFrequency 参数调用 SOC_modulesSetClockFrequency 函数。

SoC_modulesSetClockFrequency  

谢谢、此致、

SI

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 SI、

    由于我们要将 uint32_t 传递到 uint64_t、因此它应该是可以的。

    因为 uint32_t 的范围为0至 4、294、967、295。 对于 AM243x、它应该适合所有可能的频率。

    此致、

    Ming