📄 hal_pin_new.3hal
字号:
.TH hal_pin_new "3hal" "2006-10-12" "EMC Documentation" "HAL".SH NAMEhal_pin_new \- Create a HAL pin.SH SYNTAX.HP int hal_pin_bit_new(char *\fIname\fR, hal_pin_dir_t \fIdir\fR, hal_bit_t ** \fIdata_ptr_addr\fR, int \fIcomp_id\fR).HP int hal_pin_float_new(char *\fIname\fR, hal_pin_dir_t \fIdir\fR, hal_float_t ** \fIdata_ptr_addr\fR, int \fIcomp_id\fR).HP int hal_pin_u32_new(char *\fIname\fR, hal_pin_dir_t \fIdir\fR, hal_u32_t ** \fIdata_ptr_addr\fR, int \fIcomp_id\fR).HP int hal_pin_s32_new(char *\fIname\fR, hal_pin_dir_t \fIdir\fR, hal_s32_t ** \fIdata_ptr_addr\fR, int \fIcomp_id\fR).HP int hal_pin_bit_newf(hal_pin_dir_t \fIdir\fR, hal_bit_t ** \fIdata_ptr_addr\fR, int \fIcomp_id\fR).HP int hal_pin_float_newf(hal_pin_dir_t \fIdir\fR, hal_float_t ** \fIdata_ptr_addr\fR, int \fIcomp_id\fR).HP int hal_pin_u32_newf(hal_pin_dir_t \fIdir\fR, hal_u32_t ** \fIdata_ptr_addr\fR, int \fIcomp_id\fR, char *\fIfmt\fR, \fI...\fR).HP int hal_pin_s32_newf(hal_pin_dir_t \fIdir\fR, hal_s32_t ** \fIdata_ptr_addr\fR, int \fIcomp_id\fR, char *\fIfmt\fR, \fI...\fR).HP int hal_pin_new(char *\fIname\fR, hal_type_t \fItype\fR, hal_in_dir_t \fIdir\fR, void **\fIdata_ptr_addr\fR, int \fIcomp_id\fR).SH ARGUMENTS.IP \fIname\fRThe name of the pin.IP \fIdir\fRThe direction of the pin, from the viewpoint of the component. It may be oneof \fBHAL_IN\fR, \fBHAL_OUT\fR, or \fBHAL_IO\fR. Any number of \fBHAL_IN\fR or\fBHAL_IO\fR pins may be connected to the same signal, but at most one\fBHAL_OUT\fR pin is permitted. A component may assign a value to a pin thatis \fBHAL_OUT\fR or \fBHAL_IO\fR, but may not assign a value to a pin that is\fBHAL_IN\fR..IP \fIdata_ptr_addr\fRThe address of the pointer-to-data, which must lie within memory allocated by\fBhal_malloc\fR..IP \fIcomp_id\fRA HAL component identifier returned by an earlier call to \fBhal_init\fR..IP \fIfmt, ...\fRA printf-style format string and arguments.IP \fItype\fRThe type of the param, as specified in \fBhal_type_t(3hal)\fR..SH DESCRIPTIONThe \fBhal_pin_new\fR family of functions create a new \fIpin\fR object. Oncea pin has been created, it can be linked to a signal object using\fBhal_link\fR. A pin contains a pointer, and the component that owns the pincan dereference the pointer to access whatever signal is linked to the pin.(If no signal is linked, it points to a dummy signal.)There are functions for each of the data types that the HAL supports. Pins mayonly be linked to signals of the same type..SH RETURN VALUEReturns a HAL status code..SH SEE ALSO\fBhal_type_t(3hal)\fR, \fBhal_link(3hal)\fR
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -