no-OS
Macros | Functions | Variables
app.c File Reference

EIT application source. More...

#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
#include "no_os_delay.h"
#include "no_os_uart.h"
#include "no_os_spi.h"
#include "no_os_gpio.h"
#include "bia_measurement.h"
#include "mux_board.h"
#include "app.h"
#include "parameters.h"
Include dependency graph for app.c:

Macros

#define APPBUFF_SIZE   100
 

Functions

int ADG2128_SwRst (struct ad5940_dev *dev)
 
uint32_t GetMCUIntFlag (void)
 
uint32_t ClrMCUIntFlag (void)
 
void configMeasurement (struct measurement_config *oldCfg, struct measurement_config newCfg)
 
void ParseResultMode (struct measurement_config *pMeasCfg)
 
int32_t ParseConfig (char *pStr, struct eit_config *pEitCfg, struct measurement_config *pMeasCfg)
 
int32_t ParseQuery (char *pStr, struct electrode_combo *pElCmb, struct measurement_config *pMeasCfg)
 
void SendResultUint32 (uint32_t *pData, uint32_t nDataCount)
 
void SendResultFloat32 (float *data, uint32_t DataCount)
 
void SendResultIeee754 (float *data, uint32_t DataCount)
 
void SendResult (uint32_t *pData, uint16_t len, bool bImpedanceReadMode, bool bMagnitudeMode)
 
void MuxSupportedElectrodeCounts ()
 
void AD5940BiaStructInit (void)
 
uint16_t generateSwitchCombination (struct eit_config eitCfg, struct electrode_combo *swSeq)
 
int app_main (struct no_os_i2c_desc *i2c, struct ad5940_init_param *ad5940_ip)
 

Variables

struct no_os_uart_descuart
 
uint32_t AppBuff [APPBUFF_SIZE]
 
struct electrode_combo swComboSeq [256]
 
float SinFreqVal = 0.0
 
unsigned int SinFreqValUINT = 0
 
unsigned int runningCmd = 0
 
volatile uint32_t ucInterrupted = 0
 
volatile unsigned char szInSring [32]
 

Detailed Description

EIT application source.

Author
Kister Jimenez (kiste.nosp@m.r.ji.nosp@m.menez.nosp@m.@ana.nosp@m.log.c.nosp@m.om)
Darius Berghe (dariu.nosp@m.s.be.nosp@m.rghe@.nosp@m.anal.nosp@m.og.co.nosp@m.m)

Copyright 2022(c) Analog Devices, Inc.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Analog Devices, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

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.

Macro Definition Documentation

◆ APPBUFF_SIZE

#define APPBUFF_SIZE   100

Function Documentation

◆ AD5940BiaStructInit()

void AD5940BiaStructInit ( void  )
Todo:
add checker in function
Here is the caller graph for this function:

◆ ADG2128_SwRst()

int ADG2128_SwRst ( struct ad5940_dev *  dev)
Here is the caller graph for this function:

◆ app_main()

int app_main ( struct no_os_i2c_desc i2c,
struct ad5940_init_param *  ad5940_ip 
)

◆ ClrMCUIntFlag()

uint32_t ClrMCUIntFlag ( void  )
Here is the caller graph for this function:

◆ configMeasurement()

void configMeasurement ( struct measurement_config oldCfg,
struct measurement_config  newCfg 
)
Here is the caller graph for this function:

◆ generateSwitchCombination()

uint16_t generateSwitchCombination ( struct eit_config  eitCfg,
struct electrode_combo swSeq 
)
Here is the caller graph for this function:

◆ GetMCUIntFlag()

uint32_t GetMCUIntFlag ( void  )
Here is the caller graph for this function:

◆ MuxSupportedElectrodeCounts()

void MuxSupportedElectrodeCounts ( )
Here is the caller graph for this function:

◆ ParseConfig()

int32_t ParseConfig ( char *  pStr,
struct eit_config pEitCfg,
struct measurement_config pMeasCfg 
)
Here is the caller graph for this function:

◆ ParseQuery()

int32_t ParseQuery ( char *  pStr,
struct electrode_combo pElCmb,
struct measurement_config pMeasCfg 
)
Here is the caller graph for this function:

◆ ParseResultMode()

void ParseResultMode ( struct measurement_config pMeasCfg)
Here is the caller graph for this function:

◆ SendResult()

void SendResult ( uint32_t *  pData,
uint16_t  len,
bool  bImpedanceReadMode,
bool  bMagnitudeMode 
)
Here is the caller graph for this function:

◆ SendResultFloat32()

void SendResultFloat32 ( float *  data,
uint32_t  DataCount 
)

◆ SendResultIeee754()

void SendResultIeee754 ( float *  data,
uint32_t  DataCount 
)
Here is the caller graph for this function:

◆ SendResultUint32()

void SendResultUint32 ( uint32_t *  pData,
uint32_t  nDataCount 
)
Here is the caller graph for this function:

Variable Documentation

◆ AppBuff

uint32_t AppBuff[APPBUFF_SIZE]

◆ runningCmd

unsigned int runningCmd = 0

◆ SinFreqVal

float SinFreqVal = 0.0

◆ SinFreqValUINT

unsigned int SinFreqValUINT = 0

◆ swComboSeq

struct electrode_combo swComboSeq[256]

◆ szInSring

volatile unsigned char szInSring[32]

◆ uart

struct no_os_uart_desc* uart

◆ ucInterrupted

volatile uint32_t ucInterrupted = 0