Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rust-card10
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arist
rust-card10
Commits
84c8a998
Commit
84c8a998
authored
5 years ago
by
Arist
Browse files
Options
Downloads
Patches
Plain Diff
apply fmt
parent
3bbb354a
No related branches found
No related tags found
No related merge requests found
Pipeline
#4522
failed
5 years ago
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
card10-l0dable/src/lib.rs
+1
-1
1 addition, 1 deletion
card10-l0dable/src/lib.rs
card10-l0dable/src/max86150.rs
+3
-7
3 additions, 7 deletions
card10-l0dable/src/max86150.rs
with
4 additions
and
8 deletions
card10-l0dable/src/lib.rs
+
1
−
1
View file @
84c8a998
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
mod
os
;
mod
os
;
pub
use
os
::
*
;
pub
use
os
::
*
;
mod
display
;
mod
display
;
pub
use
display
::{
Color
,
Display
,
Font
,
FillStyle
,
LineStyle
};
pub
use
display
::{
Color
,
Display
,
FillStyle
,
Font
,
LineStyle
};
mod
buttons
;
mod
buttons
;
pub
mod
framebuffer
;
pub
mod
framebuffer
;
pub
use
buttons
::
Buttons
;
pub
use
buttons
::
Buttons
;
...
...
This diff is collapsed.
Click to expand it.
card10-l0dable/src/max86150.rs
+
3
−
7
View file @
84c8a998
...
@@ -4,11 +4,7 @@ pub struct MAX86150 {
...
@@ -4,11 +4,7 @@ pub struct MAX86150 {
stream_id
:
i32
,
stream_id
:
i32
,
}
}
use
core
::{
use
core
::{
mem
::
size_of
,
mem
::
MaybeUninit
};
mem
::
size_of
,
// fmt::Write,
mem
::
MaybeUninit
,
};
use
card10_sys
::
*
;
use
card10_sys
::
*
;
...
@@ -24,7 +20,8 @@ impl MAX86150 {
...
@@ -24,7 +20,8 @@ impl MAX86150 {
ppg_sample_rate
:
200
,
ppg_sample_rate
:
200
,
};
};
let
stream_id
=
unsafe
{
epic_max86150_enable_sensor
(
&
mut
cfg
,
size_of
::
<
max86150_sensor_config
>
())
};
let
stream_id
=
unsafe
{
epic_max86150_enable_sensor
(
&
mut
cfg
,
size_of
::
<
max86150_sensor_config
>
())
};
if
stream_id
<
0
{
if
stream_id
<
0
{
let
error
=
match
-
stream_id
{
let
error
=
match
-
stream_id
{
...
@@ -57,7 +54,6 @@ impl MAX86150 {
...
@@ -57,7 +54,6 @@ impl MAX86150 {
errno
::
EBUSY
=>
Error
::
CouldNotAcquireLock
,
errno
::
EBUSY
=>
Error
::
CouldNotAcquireLock
,
_
=>
Error
::
Unknown
(
packet_count
),
_
=>
Error
::
Unknown
(
packet_count
),
};
};
// writeln!(crate::UART, "error: {}\r", packet_count).ok();
return
Err
(
error
);
return
Err
(
error
);
}
}
...
...
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