aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-08-19 11:34:15 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-08-19 11:34:15 +0300
commitfe215faef185c1f32c9fb2b606ac22b0068c34c2 (patch)
treefe61cbd43b4524e3edc4d46e41de56804e9e31ff /Software/Embedded_SW/Embedded/Modules/Control
parentc42c8cfa5201ea01eee9b561f4bb972c1943cab9 (diff)
parentde5d4906184cff4f16f92864d03af9d7c41231d7 (diff)
downloadTango-fe215faef185c1f32c9fb2b606ac22b0068c34c2.tar.gz
Tango-fe215faef185c1f32c9fb2b606ac22b0068c34c2.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.c17
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.h4
2 files changed, 9 insertions, 12 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c
index 6a9735c13..bb7bbaa92 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c
@@ -51,7 +51,7 @@
#include <inc/hw_ints.h>
#include "drivers/adc_sampling/adc.h"
-#include "Drivers/Peripheral_GPIO/GPIO.h"
+
#include "control.h"
#include "MillisecTask.h"
/******************** Definitions ********************************************/
@@ -65,12 +65,10 @@ typedef struct
uint32_t PartId; // the identity of the inspected/controlled part in the Devices enum.
bool ControlActive;
uint32_t Parameter1;
- uint32_t Parameter2;
uint32_t IfIndex;
DataReadCBFunction ControlDataReadPtr;
ControlCBFunction ControlCallbackPtr;
CTRL_TIMING_ENUM ControlTiming;
- uint32_t lastStatus;
}ControlDeviceStruc;
typedef enum
@@ -103,7 +101,7 @@ void OneMilliSecondFunction(UArg arg0);
//**********************************************************************
/******************** CODE ********************************************/
//**********************************************************************
-uint32_t TemplateDataReadCBFunction (uint32_t deviceID, uint32_t Parameter1, uint32_t Parameter2)
+uint32_t TemplateDataReadCBFunction (uint32_t deviceID, uint32_t Parameter1)
{
return 0;
}
@@ -151,7 +149,7 @@ void ControlStop(void)
ControlRestart = false;
ADCAcquireStop();
}
-uint32_t ControlActivityLed( uint32_t Parameter1, uint32_t Parameter2)
+uint32_t ControlActivityLed( uint32_t Parameter1)
{
static bool flag = false;
if (flag==true)
@@ -221,7 +219,6 @@ uint32_t AddControlCallback( ControlCBFunction Callback, CTRL_TIMING_ENUM CtrlF
ControlArray[deviceId].ControlActive = true;
ControlArray[deviceId].ControlDataReadPtr = DriverfPtr;
ControlArray[deviceId].Parameter1 = Parameter1;
- ControlArray[deviceId].Parameter2 = Parameter2;
ControlArray[deviceId].IfIndex = IfIndex;
GateMutex_leave(gateControlDB, key);
@@ -311,7 +308,7 @@ uint32_t ControlLoop(uint32_t tick)
{
case eOneMillisecond:
if(ControlArray[Device_i].ControlDataReadPtr)
- ControlDatalog[Device_i] = ControlArray[Device_i].ControlDataReadPtr( ControlArray[Device_i].Parameter1,ControlArray[Device_i].Parameter2);
+ ControlDatalog[Device_i] = ControlArray[Device_i].ControlDataReadPtr( ControlArray[Device_i].Parameter1);
else
LOG_ERROR (Device_i, "Invalid callback ptr");
if(ControlArray[Device_i].ControlCallbackPtr)
@@ -323,7 +320,7 @@ uint32_t ControlLoop(uint32_t tick)
if (Ten_msTick)
{
if(ControlArray[Device_i].ControlDataReadPtr)
- ControlDatalog[Device_i] = ControlArray[Device_i].ControlDataReadPtr( ControlArray[Device_i].Parameter1,ControlArray[Device_i].Parameter2);
+ ControlDatalog[Device_i] = ControlArray[Device_i].ControlDataReadPtr( ControlArray[Device_i].Parameter1);
else
LOG_ERROR (Device_i, "Invalid callback ptr");
if(ControlArray[Device_i].ControlCallbackPtr)
@@ -337,7 +334,7 @@ uint32_t ControlLoop(uint32_t tick)
{
//there is a need to trigger the data collection from FPGA, from I2C or from ADC 1.5 milliseconds to collect the data
if(ControlArray[Device_i].ControlDataReadPtr)
- ControlDatalog[Device_i] = ControlArray[Device_i].ControlDataReadPtr( ControlArray[Device_i].Parameter1,ControlArray[Device_i].Parameter2);
+ ControlDatalog[Device_i] = ControlArray[Device_i].ControlDataReadPtr( ControlArray[Device_i].Parameter1);
else
LOG_ERROR (Device_i, "Invalid callback ptr");
}
@@ -354,7 +351,7 @@ uint32_t ControlLoop(uint32_t tick)
if (Tick998)
{
if(ControlArray[Device_i].ControlDataReadPtr)
- ControlDatalog[Device_i] = ControlArray[Device_i].ControlDataReadPtr( ControlArray[Device_i].Parameter1,ControlArray[Device_i].Parameter2);
+ ControlDatalog[Device_i] = ControlArray[Device_i].ControlDataReadPtr( ControlArray[Device_i].Parameter1);
else
LOG_ERROR (Device_i, "Invalid callback ptr");
}
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.h b/Software/Embedded_SW/Embedded/Modules/Control/control.h
index 97b0e16a1..d032c7bd1 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.h
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.h
@@ -12,7 +12,7 @@
//typedef uint32_t (* DeviceDataFunction)(uint32_t deviceID, uint32_t *Value);
typedef uint32_t (* ControlCBFunction)(uint32_t IfIndex, uint32_t ReadValue);
-typedef uint32_t (* DataReadCBFunction)( uint32_t Parameter1, uint32_t Parameter2);
+typedef uint32_t (* DataReadCBFunction)( uint32_t Parameter1);
typedef enum {
eNoControl = 0,
eOneMillisecond = 1,
@@ -38,7 +38,7 @@ void ControlStop(void);
void ControlStart(void);
uint32_t AddControlCallback( ControlCBFunction Callback, CTRL_TIMING_ENUM CtrlFrequency, DataReadCBFunction DriverfPtr, uint32_t IfIndex, uint32_t Parameter1, uint32_t Parameter2 );
int RemoveControlCallback(uint32_t deviceId, ControlCBFunction Callback );
-uint32_t TemplateDataReadCBFunction (uint32_t deviceId, uint32_t Parameter1, uint32_t Parameter2);
+uint32_t TemplateDataReadCBFunction (uint32_t deviceId, uint32_t Parameter1);
extern Task_Handle Control_Task_Handle;