Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
e3da-public
contiki-ng
Commits
8b930bfa
Commit
8b930bfa
authored
Oct 12, 2017
by
Niclas Finne
Browse files
energest: removed energest types for reading/writing flash
parent
68a8a0c4
Changes
2
Hide whitespace changes
Inline
Side-by-side
arch/platform/sky/dev/xmem.c
View file @
8b930bfa
...
...
@@ -170,8 +170,6 @@ xmem_pread(void *_p, int size, unsigned long offset)
wait_ready
();
ENERGEST_ON
(
ENERGEST_TYPE_FLASH_READ
);
s
=
splhigh
();
SPI_FLASH_ENABLE
();
...
...
@@ -191,8 +189,6 @@ xmem_pread(void *_p, int size, unsigned long offset)
SPI_FLASH_DISABLE
();
splx
(
s
);
ENERGEST_OFF
(
ENERGEST_TYPE_FLASH_READ
);
return
size
;
}
/*---------------------------------------------------------------------------*/
...
...
@@ -231,8 +227,6 @@ xmem_pwrite(const void *_buf, int size, unsigned long addr)
const
unsigned
long
end
=
addr
+
size
;
unsigned
long
i
,
next_page
;
ENERGEST_ON
(
ENERGEST_TYPE_FLASH_WRITE
);
for
(
i
=
addr
;
i
<
end
;)
{
next_page
=
(
i
|
0xff
)
+
1
;
if
(
next_page
>
end
)
{
...
...
@@ -242,8 +236,6 @@ xmem_pwrite(const void *_buf, int size, unsigned long addr)
i
=
next_page
;
}
ENERGEST_OFF
(
ENERGEST_TYPE_FLASH_WRITE
);
return
size
;
}
/*---------------------------------------------------------------------------*/
...
...
os/sys/energest.h
View file @
8b930bfa
...
...
@@ -54,8 +54,6 @@ enum energest_type {
ENERGEST_TYPE_TRANSMIT
,
ENERGEST_TYPE_LISTEN
,
ENERGEST_TYPE_FLASH_READ
,
ENERGEST_TYPE_FLASH_WRITE
,
ENERGEST_TYPE_SENSORS
,
...
...
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