Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
multipass
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
multipass
Commits
618972e9
Commit
618972e9
authored
6 years ago
by
Birte Kristina Friesel
Browse files
Options
Downloads
Patches
Plain Diff
Add LM75 DFA model
parent
8abe98e1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/driver/lm75.h
+2
-0
2 additions, 0 deletions
include/driver/lm75.h
model/driver/lm75.dfa
+35
-0
35 additions, 0 deletions
model/driver/lm75.dfa
src/driver/lm75.cc
+14
-0
14 additions, 0 deletions
src/driver/lm75.cc
with
51 additions
and
0 deletions
include/driver/lm75.h
+
2
−
0
View file @
618972e9
...
@@ -16,6 +16,8 @@ class LM75 {
...
@@ -16,6 +16,8 @@ class LM75 {
unsigned
int
getHyst
();
unsigned
int
getHyst
();
void
setOS
(
unsigned
char
os
);
void
setOS
(
unsigned
char
os
);
void
setHyst
(
unsigned
char
hyst
);
void
setHyst
(
unsigned
char
hyst
);
void
init
();
void
shutdown
();
};
};
extern
LM75
lm75
;
extern
LM75
lm75
;
...
...
This diff is collapsed.
Click to expand it.
model/driver/lm75.dfa
0 → 100644
+
35
−
0
View file @
618972e9
instance: lm75
parameters:
- os
- hyst
states:
- UNINITIALIZED
- POWEROFF
- ACTIVE
transition:
shutdown:
src: [UNINITIALIZED, POWEROFF, ACTIVE]
dst: POWEROFF
init:
src: [UNINITIALIZED, POWEROFF, ACTIVE]
dst: ACTIVE
getTemp:
src: [ACTIVE]
dst: ACTIVE
setOS:
src: [ACTIVE]
dst: ACTIVE
arguments:
- name: os
values: [30, 90]
parameter: os
setHyst:
src: [ACTIVE]
dst: ACTIVE
arguments:
- name: hyst
values: [29, 60]
parameter: hyst
This diff is collapsed.
Click to expand it.
src/driver/lm75.cc
+
14
−
0
View file @
618972e9
...
@@ -49,4 +49,18 @@ void LM75::setHyst(unsigned char hyst)
...
@@ -49,4 +49,18 @@ void LM75::setHyst(unsigned char hyst)
i2c
.
xmit
(
address
,
3
,
txbuf
,
0
,
rxbuf
);
i2c
.
xmit
(
address
,
3
,
txbuf
,
0
,
rxbuf
);
}
}
void
LM75
::
init
()
{
txbuf
[
0
]
=
0x01
;
txbuf
[
1
]
=
0x00
;
i2c
.
xmit
(
address
,
2
,
txbuf
,
0
,
rxbuf
);
}
void
LM75
::
shutdown
()
{
txbuf
[
0
]
=
0x01
;
txbuf
[
1
]
=
0x01
;
i2c
.
xmit
(
address
,
2
,
txbuf
,
0
,
rxbuf
);
}
LM75
lm75
(
0x48
);
LM75
lm75
(
0x48
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment