Logging API — npz_logs.h / npz_logs.c
A debugging utility that reads back the full device configuration from the nPZero G1S IC and prints it
in a structured format via printf.
npz_log_configurations
void npz_log_configurations(npz_device_config_s *device_config);
Brief: Reads and logs the complete nPZero device configuration.
Description:
Reads global settings, peripheral configurations, and ADC settings from the IC registers and prints them.
Use this immediately after npz_device_configure() to verify that all registers were written correctly.
Output goes to the same printf sink as the rest of the driver (typically a UART-backed printf on embedded targets).
Parameters:
| Name | Direction | Description |
|---|---|---|
device_config | in | Pointer to the same npz_device_config_s passed to npz_device_configure(). |
Returns: void.
Example:
npz_device_configure(&device_config);
npz_log_configurations(&device_config);
// Inspect UART output to verify configuration
To use logging, ensure your platform routes printf to a serial output (e.g., UART via _write on STM32, or uart_printf on nRF). The driver uses standard printf with no custom output layer.