aconno flash API for nrf52832. (Modified mbed flash API)

Revision:
1:954ac9003e99
Parent:
0:eb5ed8411c6f
Child:
2:e5390f8eab8c
diff -r eb5ed8411c6f -r 954ac9003e99 aconno_flash.cpp
--- a/aconno_flash.cpp	Tue May 22 17:23:33 2018 +0200
+++ b/aconno_flash.cpp	Tue May 22 17:41:01 2018 +0200
@@ -77,7 +77,7 @@
 #endif
 
 
-int32_t flash_init(flash_t *obj)
+int32_t aconno_flash_init(flash_t *obj)
 {
     (void)(obj);
 
@@ -92,14 +92,14 @@
     return 0;
 }
 
-int32_t flash_free(flash_t *obj)
+int32_t aconno_flash_free(flash_t *obj)
 {
     (void)(obj);
 
     return 0;
 }
 
-int32_t flash_erase_sector(flash_t *obj, uint32_t address)
+int32_t aconno_flash_erase_sector(flash_t *obj, uint32_t address)
 {
     (void)(obj);
 
@@ -135,7 +135,7 @@
     return (result == NRF_SUCCESS) ? 0 : -1;
 }
 
-int32_t flash_program_page(flash_t *obj, uint32_t address, const uint8_t *data, uint32_t size)
+int32_t aconno_flash_program_page(flash_t *obj, uint32_t address, const uint8_t *data, uint32_t size)
 {
     (void)(obj);
 
@@ -157,11 +157,6 @@
                 /* Read timeout timer. */
                 now_us = lp_ticker_read();
         }
-        if(result != NRF_SUCCESS)
-        {
-            printf("Greska kod pisanja: %d\n", result);
-        }
-
     }
     else
     {
@@ -175,7 +170,7 @@
     return (result == NRF_SUCCESS) ? 0 : -1;
 }
 
-uint32_t flash_get_size(const flash_t *obj)
+uint32_t aconno_flash_get_size(const flash_t *obj)
 {
     (void)(obj);
 
@@ -183,7 +178,7 @@
     return NRF_FICR->CODESIZE * NRF_FICR->CODEPAGESIZE;
 }
 
-uint32_t flash_get_sector_size(const flash_t *obj, uint32_t address)
+uint32_t aconno_flash_get_sector_size(const flash_t *obj, uint32_t address)
 {
     (void)(obj);
 
@@ -196,7 +191,7 @@
     return MBED_FLASH_INVALID_SIZE;
 }
 
-uint32_t flash_get_page_size(const flash_t *obj)
+uint32_t aconno_flash_get_page_size(const flash_t *obj)
 {
     (void)(obj);
     /* Return minimum writeable size. Note that this is
@@ -204,7 +199,7 @@
     return 4;
 }
 
-uint32_t flash_get_start_address(const flash_t *obj)
+uint32_t aconno_flash_get_start_address(const flash_t *obj)
 {
     (void)(obj);