Commit 44461f71 authored by Ivan Tyagov's avatar Ivan Tyagov

Move to proper place.

parent 76d6da7c
......@@ -181,3 +181,24 @@ static int getAnalogInputStateAIN(int i2c_addr, int **analog_input, uint8_t read
}
close(file);
}
void safeShutdownI2CSlaveList()
{
/*
* Perform a safe shutdown of all known I2C slaves
*/
int i;
int length;
int addr;
length = sizeof(I2C_SLAVE_ADDR_LIST) / sizeof(int);
for (i = 0; i < length; i++)
{
addr = I2C_SLAVE_ADDR_LIST[i];
if (addr != 0)
{
// properly initialized from CLI
setRelayState(0x00, addr);
}
}
}
......@@ -100,28 +100,6 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state)
static struct argp argp = {options, parse_opt, args_doc, doc, 0, 0, 0};
void safeShutdownI2CSlaveList()
{
/*
* Perform a safe shutdown of all known I2C slaves
*/
int i;
int length;
int addr;
length = sizeof(I2C_SLAVE_ADDR_LIST) / sizeof(int);
for (i = 0; i < length; i++)
{
addr = I2C_SLAVE_ADDR_LIST[i];
if (addr != 0)
{
// properly initialized from CLI
setRelayState(0x00, addr);
}
}
}
static volatile UA_Boolean running = true;
static void stopHandler(int sign)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment