请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:TMS320F280025C 主题中讨论的其他器件:C2000WARE
尊敬的先生/女士
我从事 UART/sci 工作。 我正在使用 SCIwritechararray 函数。该函数可以传输字符串和字符值、但不会传输整数值或 hexa 值。
请给我一些建议。 请尽快答复先生/ AM。
您自己的
阿洛克
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.
尊敬的先生/女士
我从事 UART/sci 工作。 我正在使用 SCIwritechararray 函数。该函数可以传输字符串和字符值、但不会传输整数值或 hexa 值。
请给我一些建议。 请尽快答复先生/ AM。
您自己的
阿洛克
您好 Alok!
该函数为: SCI_writeCharArray(uint32_t base, const uint16_t * const array, uint16_t length)
因此、您必须使用无符号16位整数才能使用此函数。 为此、您可以将数据转换为正确的类型;当调用函数时、可在我们的 echoback 示例({C2000Ware}\driverlib\f28002x\examples\sci\sci_ex3_echoback.c)中完成此操作:
SCI_writeCharArray(SCIA_BASE, (uint16_t*)msg, 17);此致、
艾里森