Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
osie
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Martin Manchev
osie
Commits
44461f71
Commit
44461f71
authored
Mar 16, 2022
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move to proper place.
parent
76d6da7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
22 deletions
+21
-22
coupler/opc-ua-server/mod_io_i2c.h
coupler/opc-ua-server/mod_io_i2c.h
+21
-0
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+0
-22
No files found.
coupler/opc-ua-server/mod_io_i2c.h
View file @
44461f71
...
...
@@ -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
);
}
}
}
coupler/opc-ua-server/server.c
View file @
44461f71
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment