我正在使用Xilinx UARTPS数据表来编写功能以禁用和启用UART的流量控制。我发现了数据表中定义的适当的位掩码,但是我不确定我应该使用此掩码来调用哪个内置功能,以便将此掩码传递给。
我认为最初可能是这个功能,
然而,经过仔细检查,它将U16作为一个参数,而我要使用的位掩码是U20。任何熟悉此库的人,我都会称呼哪个函数,以启用流量控制,
也就是指向数据表的链接。
I am using the Xilinx uartps data sheet in order to write functions to disable and enable Flow Control For UART. I found the appropriate bitmask defined in the data sheet, however I am not sure which built in function I should call with this mask in order to pass this bit mask to.

I thought initially it may be this function,

However upon closer inspection, it takes a u16 as an argument and the bitmask I want to use is a u20. Anyone familiar with this library, what function do I call with the bit mask in order enable flow control
Here is a link to the datasheet as well.
https://xilinx.github.io/embeddedsw.github.io/uartps/doc/html/api/group__uartps__v3__11.html#gad74cdb596f414bee06ebd9159f496cef
发布评论
评论(1)
您的使用方式正确。面具比它们应该代表的16倍多的十六进制“ 0”,但是如果您查看选项,则永远不会使用此位。
配置选项
#define xuartps_option_set_break 0x0080u
这些常数指定可以使用驱动程序设置或检索的选项,每个选项都是唯一的位掩码,因此可以指定多个选项。
这意味着您在使用此类标志时可能会受到警告,但是无论如何您都会得到所需的结果。
You are correct in what you are using. The masks have a hex "0" more than the 16bits they should represent, but if you look at the options, this bit is never used.
Configuration options
#define XUARTPS_OPTION_SET_BREAK 0x0080U
These constants specify the options that may be set or retrieved with the driver, each is a unique bit mask such that multiple options may be specified.
This means that you might get a warning when using such flags, but you'll get the result you want anyway.