Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cortex-m-fork
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
Model registry
Operate
Environments
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
Per Lindgren
cortex-m-fork
Commits
b7a627cd
"examples/paths.rs" did not exist on "ef1c8a7913ba73b6d1de0f7e2c11919b5c05fcba"
Commit
b7a627cd
authored
7 years ago
by
Jorge Aparicio
Browse files
Options
Downloads
Patches
Plain Diff
fix tests
parent
9bab4175
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
ci/install.sh
+1
-1
1 addition, 1 deletion
ci/install.sh
ci/script.sh
+1
-1
1 addition, 1 deletion
ci/script.sh
src/peripheral/mod.rs
+1
-0
1 addition, 0 deletions
src/peripheral/mod.rs
src/peripheral/test.rs
+11
-11
11 additions, 11 deletions
src/peripheral/test.rs
with
14 additions
and
13 deletions
ci/install.sh
+
1
−
1
View file @
b7a627cd
set
-e
x
set
-e
uxo
pipefail
main
()
{
case
$TARGET
in
...
...
This diff is collapsed.
Click to expand it.
ci/script.sh
+
1
−
1
View file @
b7a627cd
set
-e
x
set
-e
uxo
pipefail
main
()
{
case
$TARGET
in
...
...
This diff is collapsed.
Click to expand it.
src/peripheral/mod.rs
+
1
−
0
View file @
b7a627cd
...
...
@@ -69,6 +69,7 @@ static mut CORE_PERIPHERALS: bool = false;
impl
Peripherals
{
/// Returns all the core peripherals *once*
#[inline(always)]
pub
fn
take
()
->
Option
<
Self
>
{
interrupt
::
free
(|
_
|
{
if
unsafe
{
CORE_PERIPHERALS
}
{
...
...
This diff is collapsed.
Click to expand it.
src/peripheral/test.rs
+
11
−
11
View file @
b7a627cd
#[test]
fn
cpuid
()
{
let
cpuid
=
unsafe
{
&*
::
peripheral
::
CPUID
.get
()
};
let
cpuid
=
unsafe
{
&*
::
peripheral
::
CPUID
::
ptr
()
};
assert_eq!
(
address
(
&
cpuid
.base
),
0xE000_ED00
);
assert_eq!
(
address
(
&
cpuid
.pfr
),
0xE000_ED40
);
...
...
@@ -16,7 +16,7 @@ fn cpuid() {
#[test]
fn
dcb
()
{
let
dcb
=
unsafe
{
&*
::
peripheral
::
DCB
.get
()
};
let
dcb
=
unsafe
{
&*
::
peripheral
::
DCB
::
ptr
()
};
assert_eq!
(
address
(
&
dcb
.dhcsr
),
0xE000_EDF0
);
assert_eq!
(
address
(
&
dcb
.dcrsr
),
0xE000_EDF4
);
...
...
@@ -26,7 +26,7 @@ fn dcb() {
#[test]
fn
dwt
()
{
let
dwt
=
unsafe
{
&*
::
peripheral
::
DWT
.get
()
};
let
dwt
=
unsafe
{
&*
::
peripheral
::
DWT
::
ptr
()
};
assert_eq!
(
address
(
&
dwt
.ctrl
),
0xE000_1000
);
assert_eq!
(
address
(
&
dwt
.cyccnt
),
0xE000_1004
);
...
...
@@ -48,7 +48,7 @@ fn dwt() {
#[test]
fn
fpb
()
{
let
fpb
=
unsafe
{
&*
::
peripheral
::
FPB
.get
()
};
let
fpb
=
unsafe
{
&*
::
peripheral
::
FPB
::
ptr
()
};
assert_eq!
(
address
(
&
fpb
.ctrl
),
0xE000_2000
);
assert_eq!
(
address
(
&
fpb
.remap
),
0xE000_2004
);
...
...
@@ -60,7 +60,7 @@ fn fpb() {
#[test]
fn
fpu
()
{
let
fpu
=
unsafe
{
&*
::
peripheral
::
FPU
.get
()
};
let
fpu
=
unsafe
{
&*
::
peripheral
::
FPU
::
ptr
()
};
assert_eq!
(
address
(
&
fpu
.fpccr
),
0xE000_EF34
);
assert_eq!
(
address
(
&
fpu
.fpcar
),
0xE000_EF38
);
...
...
@@ -72,7 +72,7 @@ fn fpu() {
#[test]
fn
itm
()
{
let
itm
=
unsafe
{
&*
::
peripheral
::
ITM
.get
()
};
let
itm
=
unsafe
{
&*
::
peripheral
::
ITM
::
ptr
()
};
assert_eq!
(
address
(
&
itm
.stim
),
0xE000_0000
);
assert_eq!
(
address
(
&
itm
.ter
),
0xE000_0E00
);
...
...
@@ -84,7 +84,7 @@ fn itm() {
#[test]
fn
mpu
()
{
let
mpu
=
unsafe
{
&*
::
peripheral
::
MPU
.get
()
};
let
mpu
=
unsafe
{
&*
::
peripheral
::
MPU
::
ptr
()
};
assert_eq!
(
address
(
&
mpu
._type
),
0xE000ED90
);
assert_eq!
(
address
(
&
mpu
.ctrl
),
0xE000ED94
);
...
...
@@ -101,7 +101,7 @@ fn mpu() {
#[test]
fn
nvic
()
{
let
nvic
=
unsafe
{
&*
::
peripheral
::
NVIC
.get
()
};
let
nvic
=
unsafe
{
&*
::
peripheral
::
NVIC
::
ptr
()
};
assert_eq!
(
address
(
&
nvic
.iser
),
0xE000E100
);
assert_eq!
(
address
(
&
nvic
.iser
[
7
]),
0xE000E11C
);
...
...
@@ -119,7 +119,7 @@ fn nvic() {
#[test]
fn
scb
()
{
let
scb
=
unsafe
{
&*
::
peripheral
::
SCB
.get
()
};
let
scb
=
unsafe
{
&*
::
peripheral
::
SCB
::
ptr
()
};
assert_eq!
(
address
(
&
scb
.icsr
),
0xE000_ED04
);
assert_eq!
(
address
(
&
scb
.vtor
),
0xE000_ED08
);
...
...
@@ -140,7 +140,7 @@ fn scb() {
#[test]
fn
syst
()
{
let
syst
=
unsafe
{
&*
::
peripheral
::
SYST
.get
()
};
let
syst
=
unsafe
{
&*
::
peripheral
::
SYST
::
ptr
()
};
assert_eq!
(
address
(
&
syst
.csr
),
0xE000_E010
);
assert_eq!
(
address
(
&
syst
.rvr
),
0xE000_E014
);
...
...
@@ -151,7 +151,7 @@ fn syst() {
#[test]
fn
tpiu
()
{
let
tpiu
=
unsafe
{
&*
::
peripheral
::
TPIU
.get
()
};
let
tpiu
=
unsafe
{
&*
::
peripheral
::
TPIU
::
ptr
()
};
assert_eq!
(
address
(
&
tpiu
.sspsr
),
0xE004_0000
);
assert_eq!
(
address
(
&
tpiu
.cspsr
),
0xE004_0004
);
...
...
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