Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
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
Esteban Blanc
proview
Commits
b687bdec
Commit
b687bdec
authored
Oct 30, 2007
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bitwise objects added
parent
e69382ff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
2 deletions
+54
-2
src/lib/rt/src/rt_plc_arithm.c
src/lib/rt/src/rt_plc_arithm.c
+47
-1
src/lib/rt/src/rt_plc_macro_div.h
src/lib/rt/src/rt_plc_macro_div.h
+7
-1
No files found.
src/lib/rt/src/rt_plc_arithm.c
View file @
b687bdec
/*
* Proview $Id: rt_plc_arithm.c,v 1.
8 2007-10-16 06:39:09
claes Exp $
* Proview $Id: rt_plc_arithm.c,v 1.
9 2007-10-30 07:29:48
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -1188,6 +1188,52 @@ void Min_exec(
o
->
ActVal
=
result
;
}
/*_*
BwShiftLeft Bitwise shift left.
@aref bwshiftleft BwShiftLeft
*/
void
BwShiftLeft_exec
(
plc_sThread
*
tp
,
pwr_sClass_BwShiftLeft
*
o
)
{
o
->
Out
=
(
*
o
->
InP
)
<<
(
*
o
->
NumP
);
}
/*_*
BwShiftRight Bitwise shift right.
@aref bwshiftright BwShiftRight
*/
void
BwShiftRight_exec
(
plc_sThread
*
tp
,
pwr_sClass_BwShiftRight
*
o
)
{
o
->
Out
=
(
*
o
->
InP
)
>>
(
*
o
->
NumP
);
}
/*_*
BwRotateRight Bitwise rotate right.
@aref bwrotateright BwRotateRight
*/
void
BwRotateRight_exec
(
plc_sThread
*
tp
,
pwr_sClass_BwRotateRight
*
o
)
{
o
->
Out
=
((
unsigned
int
)(
*
o
->
InP
)
<<
(
32
-
*
o
->
NumP
))
|
((
unsigned
int
)(
*
o
->
InP
)
>>
(
*
o
->
NumP
));
}
/*_*
BwRotateLeft Bitwise rotate left.
@aref bwrotateleft BwRotateLeft
*/
void
BwRotateLeft_exec
(
plc_sThread
*
tp
,
pwr_sClass_BwRotateLeft
*
o
)
{
o
->
Out
=
((
unsigned
int
)(
*
o
->
InP
)
>>
(
32
-
*
o
->
NumP
))
|
((
unsigned
int
)(
*
o
->
InP
)
<<
(
*
o
->
NumP
));
}
...
...
src/lib/rt/src/rt_plc_macro_div.h
View file @
b687bdec
/*
* Proview $Id: rt_plc_macro_div.h,v 1.
5 2006-05-23 13:53:47
claes Exp $
* Proview $Id: rt_plc_macro_div.h,v 1.
6 2007-10-30 07:29:48
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -156,6 +156,12 @@
#define BwOr_exec(t, o)\
o->Status = *o->In1P | *o->In2P;
/*_*
@aref bwand BwInv
*/
#define BwInv_exec(t, o)\
o->Out = ~(*o->InP);
/*_*
@aref getdatap GetDatap
*/
...
...
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