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

Better clock driver documentation

SDK 14.2 API References>Peripheral drivers>...>nrf_drv_clock_lfclk_request

The docs say "p_handler_item A pointer to the event handler structure."

It doesn't say here that the pointer can be NULL (although other discussion in the document, and examples, suggest it can be NULL.) It says "the" which to many readers means "must exist", while "any" means "optional to exist".

Also, the description doesn't say anything more than one can understand by examining the type of the parameter. It might be better to say "A pointer to an optional chain of event handler functions. The pointer can be null if no handlers are needed." It could also say that the only event is "clock started"??

There are newer languages that are rigorous about nullable values. Using C, the documentation should provide such information.

Related