File syn_power.c¶
FileList > src > syntropic > system > syn_power.c
Go to the source code of this file
Power / voltage monitor implementation.
#include "../util/syn_assert.h"#include "syn_power.h"#include <string.h>
Public Functions¶
| Type | Name |
|---|---|
| void | syn_power_init (SYN_Power * pwr, const SYN_Power_Config * cfg) Initialize power monitor. |
| void | syn_power_set_errlog (SYN_Power * pwr, SYN_ErrLog * errlog) Attach error log for brownout events. |
| void | syn_power_set_stats (SYN_Power * pwr, SYN_Signal * stats) Attach signal stats window. |
| void | syn_power_update (SYN_Power * pwr) Update — read ADC and check thresholds. |
Public Functions Documentation¶
function syn_power_init¶
Initialize power monitor.
Parameters:
pwrPower monitor instance.cfgConfiguration.
function syn_power_set_errlog¶
Attach error log for brownout events.
Parameters:
pwrPower monitor.errlogError log instance.
function syn_power_set_stats¶
Attach signal stats window.
Parameters:
pwrPower monitor.statsInitialized SYN_Signal, or NULL to detach.
function syn_power_update¶
Update — read ADC and check thresholds.
Call from your main loop or scheduler task.
Parameters:
pwrPower monitor.
The documentation for this class was generated from the following file src/syntropic/system/syn_power.c