This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

don't understand the code

hi sitting and looking at the light demo example through and looking at

where I do not quite understand what p_args is used to, so someone can explain that thanks: D

  • Maybe you could give the full context of the light demo example that you're referring to?

    Having a search around I only found a Thingy52 light demo but the code I examined didn't have that function.

    The code snippet appears to be setting a callback. In general, callback functions often take an argument of your choice to help your code to process the event - perhaps identifying a particular instance when several items use the same callback. The void* type allows anything to be passed in.

  • ups my mistake it is not act_set_cb but instead handle_set_cb and it is from the server