no-OS
Loading...
Searching...
No Matches
main.c File Reference

Main function of ADE9039 example. More...

#include <stdio.h>
#include "no_os_uart.h"
#include "no_os_pwm.h"
#include "no_os_delay.h"
#include "no_os_gpio.h"
#include "no_os_spi.h"
#include "no_os_print_log.h"
#include "no_os_units.h"
#include "no_os_util.h"
#include "no_os_alloc.h"
#include "no_os_error.h"
#include "maxim_uart.h"
#include "maxim_gpio.h"
#include "maxim_uart_stdio.h"
#include "maxim_pwm.h"
#include "maxim_spi.h"
#include "ade9039.h"
#include "platform.h"
Include dependency graph for main.c:

Macros

#define POWER_MAX_VALUE   20694066
 
#define ENERGY_ACCUMULATION_FACTOR   3515.625f
 
#define NOMINAL_FREQ   50
 

Functions

float convert_power_type (int32_t power, float scale)
 
float convert_energy_type (int32_t energy_hi, float scale)
 
int main (void)
 

Detailed Description

Main function of ADE9039 example.

Author
REtz (radu..nosp@m.etz@.nosp@m.analo.nosp@m.g.co.nosp@m.m)

Copyright 2026(c) Analog Devices, Inc.

SPDX-License-Identifier: BSD-3-Clause

Macro Definition Documentation

◆ ENERGY_ACCUMULATION_FACTOR

#define ENERGY_ACCUMULATION_FACTOR   3515.625f

◆ NOMINAL_FREQ

#define NOMINAL_FREQ   50

◆ POWER_MAX_VALUE

#define POWER_MAX_VALUE   20694066

Function Documentation

◆ convert_energy_type()

float convert_energy_type ( int32_t energy_hi,
float scale )

◆ convert_power_type()

float convert_power_type ( int32_t power,
float scale )

◆ main()

int main ( void )