no-OS
|
Defines common data to be used by ADE7913 example project. More...
#include "ade7913.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_error.h"
#include "maxim_uart.h"
#include "maxim_gpio.h"
#include "maxim_uart_stdio.h"
#include "maxim_pwm.h"
#include "maxim_spi.h"
#include "maxim_irq.h"
Go to the source code of this file.
Classes | |
struct | rms_adc_values |
Macros | |
#define | INITIAL 1024 |
#define | SAMPLES 1024 |
#define | V_MULT (1000ul) |
#define | V_DIVIDER (1001ul) |
Functions | |
int | interface_toggle_led (struct no_os_gpio_desc *gpio_led_desc) |
Toggle LED. More... | |
int | rms_adc_values_read (struct ade7913_dev *dev, struct rms_adc_values *rms) |
Saves the current and voltage values of device 1 in rms_adc structure. More... | |
int | rms_adc_values_read_2 (struct ade7913_dev *dev, struct rms_adc_values *rms) |
Saves the current and voltage values of device 2 in rms_adc structure. More... | |
int | rms_adc_values_read_3 (struct ade7913_dev *dev, struct rms_adc_values *rms) |
Saves the current and voltage values of device 3 in rms_adc structure. More... | |
int64_t | rms_filter_v1 (int32_t sample) |
Compute v1 rms value. More... | |
int64_t | rms_filter_v2 (int32_t sample) |
Compute v2 rms value. More... | |
int64_t | rms_filter_i (int32_t sample) |
Compute i rms value. More... | |
int64_t | rms_filter_v1_2 (int32_t sample) |
Compute v1_2 rms value for device 2. More... | |
int64_t | rms_filter_v2_2 (int32_t sample) |
Compute v2_2 rms value for device 2. More... | |
int64_t | rms_filter_i_2 (int32_t sample) |
Compute i_2 rms value for device 2. More... | |
int64_t | rms_filter_v1_3 (int32_t sample) |
Compute v1_3 rms value for device 3. More... | |
int64_t | rms_filter_v2_3 (int32_t sample) |
Compute v2_3 rms value for device 3. More... | |
int64_t | rms_filter_i_3 (int32_t sample) |
Compute i_3 rms value for device 3. More... | |
int64_t | supply_scale_v (int32_t val) |
Scale V value. More... | |
Variables | |
struct no_os_uart_init_param | uart_ip |
struct no_os_gpio_init_param | gpio_led1_ip |
struct no_os_spi_init_param | ade7913_spi_ip0 |
struct no_os_spi_init_param | ade7913_spi_ip1 |
struct no_os_spi_init_param | ade7913_spi_ip2 |
struct no_os_gpio_init_param | ade7913_gpio_rdy_ip |
Defines common data to be used by ADE7913 example project.
Copyright (c) 2024 Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define INITIAL 1024 |
#define SAMPLES 1024 |
#define V_DIVIDER (1001ul) |
#define V_MULT (1000ul) |
int interface_toggle_led | ( | struct no_os_gpio_desc * | gpio_led_desc | ) |
Toggle LED.
gpio_led_desc | - LED descriptor |
Toggle LED.
gpio_led_desc | - led descriptor |
int rms_adc_values_read | ( | struct ade7913_dev * | dev, |
struct rms_adc_values * | rms | ||
) |
Saves the current and voltage values of device 1 in rms_adc structure.
dev | - device structure |
rms | - structure holding the measurements values |
int rms_adc_values_read_2 | ( | struct ade7913_dev * | dev, |
struct rms_adc_values * | rms | ||
) |
Saves the current and voltage values of device 2 in rms_adc structure.
dev | - device structure |
rms | - structure holding the measurements values |
int rms_adc_values_read_3 | ( | struct ade7913_dev * | dev, |
struct rms_adc_values * | rms | ||
) |
Saves the current and voltage values of device 3 in rms_adc structure.
dev | - device structure |
rms | - structure holding the measurements values |
int64_t rms_filter_i | ( | int32_t | sample | ) |
Compute i rms value.
sample | - i sample |
Compute i rms value.
sample | - i sample dev 1 |
int64_t rms_filter_i_2 | ( | int32_t | sample | ) |
Compute i_2 rms value for device 2.
sample | - i sample dev 2 |
int64_t rms_filter_i_3 | ( | int32_t | sample | ) |
Compute i_3 rms value for device 3.
sample | - i sample dev 3 |
int64_t rms_filter_v1 | ( | int32_t | sample | ) |
Compute v1 rms value.
sample | - v1 sample |
Compute v1 rms value.
sample | - v1 sample dev 1 |
int64_t rms_filter_v1_2 | ( | int32_t | sample | ) |
Compute v1_2 rms value for device 2.
sample | - v1 sample dev 2 |
int64_t rms_filter_v1_3 | ( | int32_t | sample | ) |
Compute v1_3 rms value for device 3.
sample | - v1 sample dev 3 |
int64_t rms_filter_v2 | ( | int32_t | sample | ) |
Compute v2 rms value.
sample | - v2 sample |
Compute v2 rms value.
sample | - v2 sample dev 1 |
int64_t rms_filter_v2_2 | ( | int32_t | sample | ) |
Compute v2_2 rms value for device 2.
sample | - v2 sample dev 2 |
int64_t rms_filter_v2_3 | ( | int32_t | sample | ) |
Compute v2_3 rms value for device 3.
sample | - v2 sample dev 3 |
int64_t supply_scale_v | ( | int32_t | val | ) |
Scale V value.
val | - value to be scaled |
struct no_os_gpio_init_param ade7913_gpio_rdy_ip |
struct no_os_spi_init_param ade7913_spi_ip0 |
struct no_os_spi_init_param ade7913_spi_ip1 |
struct no_os_spi_init_param ade7913_spi_ip2 |
struct no_os_gpio_init_param gpio_led1_ip |
struct no_os_uart_init_param uart_ip |