Skip to content
This repository
Browse code

Update examples/writing_flash.cpp

lock_flash_programspace() wasn't a good idea.
  • Loading branch information...
commit dc2d83334d8aab6d7263e8bfe4ffe027cffbb46d 1 parent aa05909
Kim Blomqvist kblomqvist authored

Showing 1 changed file with 0 additions and 12 deletions. Show diff stats Hide diff stats

  1. +0 12 examples/writing_flash.cpp
12 examples/writing_flash.cpp
@@ -4,15 +4,6 @@
4 4
5 5 using namespace aery;
6 6
7   -void lock_flash_programspace(void)
8   -{
9   - int i = FLASH_LAST_PAGE;
10   - for (; flashc_page_isempty(i); i--);
11   - for (; i >= 0; i--) {
12   - flashc_lock_page(i);
13   - }
14   -}
15   -
16 7 int main(void)
17 8 {
18 9 int errno;
@@ -22,9 +13,6 @@ int main(void)
22 13 init_board();
23 14 gpio_init_pin(LED, GPIO_OUTPUT);
24 15
25   - /* Lock flash region for the uploaded program. Just to be in safe. */
26   - lock_flash_programspace();
27   -
28 16 /* If page is empty, write "foo". Else read page. */
29 17 if (flashc_page_isempty(page)) {
30 18 strcpy(buf, "foo");

0 comments on commit dc2d833

Please sign in to comment.
Something went wrong with that request. Please try again.