Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update examples/writing_flash.cpp

lock_flash_programspace() wasn't a good idea.
  • Loading branch information...
commit dc2d83334d8aab6d7263e8bfe4ffe027cffbb46d 1 parent aa05909
@kblomqvist kblomqvist authored
Showing with 0 additions and 12 deletions.
  1. +0 −12 examples/writing_flash.cpp
View
12 examples/writing_flash.cpp
@@ -4,15 +4,6 @@
using namespace aery;
-void lock_flash_programspace(void)
-{
- int i = FLASH_LAST_PAGE;
- for (; flashc_page_isempty(i); i--);
- for (; i >= 0; i--) {
- flashc_lock_page(i);
- }
-}
-
int main(void)
{
int errno;
@@ -22,9 +13,6 @@ int main(void)
init_board();
gpio_init_pin(LED, GPIO_OUTPUT);
- /* Lock flash region for the uploaded program. Just to be in safe. */
- lock_flash_programspace();
-
/* If page is empty, write "foo". Else read page. */
if (flashc_page_isempty(page)) {
strcpy(buf, "foo");
Please sign in to comment.
Something went wrong with that request. Please try again.