CAPS Universe documentation  1.0.4
All you need to know to be successful
Callback init()

It is called very early while initializing the framework.

  • parameter you get
    • framework handle
    • a pointer to your own private data (on demand via caps_drv_run(), for configuation options for example)
      Attention
      This pointer differs from the pointer of all other callback functions.
  • you can expect as already done
    • command line arguments are already processed (but its up to you when you call caps_arg_parser_process())
    • nothing else. This is really internal only.
  • what you can do
    • you can allocate your private memory and register it as a hint for the other callbacks via caps_drv_private_set()
  • what you must do
    • nothing
  • values you should return
    • 0 everything is okay, the framework can continue
    • -EINVAL Something really bad happened in your initialisation and the framework should terminate
Note
This callback is optional.