📄 hal_export_funct.3hal
字号:
.TH hal_export_funct "3hal" "2006-10-12" "EMC Documentation" "HAL".SH NAMEhal_export_funct \- create a realtime function callable from a thread.SH SYNTAX.HPtypedef void(*hal_funct_t)(void * \fIarg\fR, long \fIperiod\fR).HPint hal_export_funct(char *\fIname\fR, hal_funct_t \fIfunct\fR, void *\fIarg\fR, int \fIuses_fp\fR, int \fIreentrant\fR, int \fIcomp_id\fR).SH ARGUMENTS.IP \fIname\fRThe name of the function..IP \fIfunct\fRThe pointer to the function.IP \fIarg\fRThe argument to be passed as the first parameter of \fIfunct\fR.IP \fIuses_fp\fRNonzero if the function uses floating-point operations, including assignmentof floating point values with "="..IP \fIreentrant\fRIf reentrant is non-zero, the function may be preempted and called againbefore the first call completes. Otherwise, it may only be added to onethread..IP \fIcomp_id\fRA HAL component identifier returned by an earlier call to \fBhal_init\fR..SH DESCRIPTION\fBhal_export_funct\fR makes a realtime function provided by a componentavailable to the system. A subsequent call to \fBhal_add_funct_to_thread\fRcan be used to schedule the execution of the function as needed by the system.When this function is placed on a HAL thread, and HAL threads are started,\fIfunct\fR is called repeatedly with two arguments: \fIvoid *arg\fR is thesame value that was given to \fBhal_export_funct\fR, and \fIlong period\fR isthe interval between calls in nanoseconds.Each call to the function should do a small amount of work and return..SH RETURN VALUEReturns a HAL status code..SH SEE ALSO\fBhal_create_thread(3hal)\fR, \fBhal_add_funct_to_thread(3hal)\fR
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -