СИНОПСИС
#include <hal.h>
int hal_ready(int comp_id);
int hal_unready(int comp_id);
ARGUMENTS
- comp_id
-
A HAL component identifier returned by an earlier call to hal_init(3).
ОПИСАНИЕ
Calling hal_ready(3) indicates that the component is ready for operation. Creation of pins, parameters, and functions is not allowed when the component is ready. This must be called in any realtime HAL component before its rtapi_app_main(3) exits. In any non-realtime component it should be called before it enters its main loop.
You can call hal_unready(3) to again allow modifications of pins, params and functions. This should only be done in non real-time applications. After the modifications are done, you must call hal_ready(3) again.
RETURN VALUE
Returns zero (0) on success, or a negative errno value to indicate the error.