aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Modules/Control/control.c
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-10-31 10:16:10 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-10-31 10:16:10 +0200
commitcd18fb27a2499072f18cb0320ddeb85a0500a93e (patch)
treeb1bf1984813bc70ea4784e0e956497fd4fd35805 /Software/Embedded_SW/Embedded/Modules/Control/control.c
parent4aca8247565596d6c12ba73242d599dc42887625 (diff)
downloadTango-cd18fb27a2499072f18cb0320ddeb85a0500a93e.tar.gz
Tango-cd18fb27a2499072f18cb0320ddeb85a0500a93e.zip
version 1.4.6.0 - going forward
Diffstat (limited to 'Software/Embedded_SW/Embedded/Modules/Control/control.c')
-rw-r--r--Software/Embedded_SW/Embedded/Modules/Control/control.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/Software/Embedded_SW/Embedded/Modules/Control/control.c b/Software/Embedded_SW/Embedded/Modules/Control/control.c
index 80afb7ac6..b7d117efe 100644
--- a/Software/Embedded_SW/Embedded/Modules/Control/control.c
+++ b/Software/Embedded_SW/Embedded/Modules/Control/control.c
@@ -71,6 +71,7 @@ typedef struct
DataReadCBFunction ControlDataReadPtr;
ControlCBFunction ControlCallbackPtr;
uint32_t ControlTiming;
+ char *Name;
}ControlDeviceStruc;
typedef enum
@@ -132,6 +133,7 @@ void ControlInit(void)
ControlArray[Device_i].ControlCallbackPtr = NULL;
ControlArray[Device_i].ControlDataReadPtr = NULL;
ControlArray[Device_i].ControlTiming = eNoControl;
+ ControlArray[Device_i].Name = NULL;
}
gateControlDB = GateMutex_create(NULL, &eb);
if (gateControlDB == NULL)
@@ -166,7 +168,10 @@ uint32_t ControlActivityLed( uint32_t Parameter1)
COMM_RED_LED_ON;
ACTIVITY_RED_LED_OFF; // Heaters indication - all the Heaters OFF
if(FPGA_WD_Occurred == true)
+ {
ACTIVITY_GREEN_LED_ON;
+ HWConfigurationInit();
+ }
if(power.color == fastBILNK)
Pannel_Leds(POWER_ON_OFF,MODE_OFF);
@@ -298,7 +303,7 @@ void ControlStart(void)
TimerEnable(Control_timerBase, TIMER_A);
ADCAcquireStart(0,1);
- AddControlCallback( ControlEmptyCBFunction, eHundredMillisecond, ControlActivityLed,0, 0, 0 );
+ AddControlCallback("ControlActivityLed", ControlEmptyCBFunction, eHundredMillisecond, ControlActivityLed,0, 0, 0 );
SysCtlDelay(12000000);
MillisecStart();
@@ -313,7 +318,7 @@ void ControlStart(void)
* both these callbacks can be removed. if a new call is arriving, it invalidates the previous one (no dual control or data)
*
***************************************************************************************************************************************************/
-uint32_t AddControlCallback( ControlCBFunction Callback, uint32_t CtrlFrequency, DataReadCBFunction DriverfPtr, uint16_t IfIndex, uint32_t Parameter1, uint32_t Parameter2 )
+uint32_t AddControlCallback(char* Name, ControlCBFunction Callback, uint32_t CtrlFrequency, DataReadCBFunction DriverfPtr, uint16_t IfIndex, uint32_t Parameter1, uint32_t Parameter2 )
{
assert(Callback);
assert(DriverfPtr);
@@ -364,6 +369,7 @@ uint32_t AddControlCallback( ControlCBFunction Callback, uint32_t CtrlFrequency
ControlArray[deviceId].Parameter1 = Parameter1;
ControlArray[deviceId].IfIndex = IfIndex;
ControlArray[deviceId].StartTick = millisecondCounter;
+ ControlArray[deviceId].Name = Name;
GateMutex_leave(gateControlDB, key);
//LOG_ERROR(deviceId, "Add Callback");