aconno flash API for nrf52832. (Modified mbed flash API)
Diff: aconno_flash.h
- Revision:
- 1:954ac9003e99
- Parent:
- 0:eb5ed8411c6f
--- a/aconno_flash.h Tue May 22 17:23:33 2018 +0200 +++ b/aconno_flash.h Tue May 22 17:41:01 2018 +0200 @@ -23,8 +23,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#ifndef MBED_FLASH_API_H -#define MBED_FLASH_API_H +#ifndef ACONNO_FLASH_API_H +#define ACONNO_FLASH_API_H #include "device.h" #include <stdint.h> @@ -53,14 +53,14 @@ * @param obj The flash object * @return 0 for success, -1 for error */ -int32_t flash_init(flash_t *obj); +int32_t aconno_flash_init(flash_t *obj); /** Uninitialize the flash peripheral and the flash_t object * * @param obj The flash object * @return 0 for success, -1 for error */ -int32_t flash_free(flash_t *obj); +int32_t aconno_flash_free(flash_t *obj); /** Erase one sector starting at defined address * @@ -69,7 +69,7 @@ * @param address The sector starting address * @return 0 for success, -1 for error */ -int32_t flash_erase_sector(flash_t *obj, uint32_t address); +int32_t aconno_flash_erase_sector(flash_t *obj, uint32_t address); /** Read data starting at defined address * @@ -80,7 +80,7 @@ * @param size The number of bytes to read * @return 0 for success, -1 for error */ -int32_t flash_read(flash_t *obj, uint32_t address, uint8_t *data, uint32_t size); +int32_t aconno_flash_read(flash_t *obj, uint32_t address, uint8_t *data, uint32_t size); /** Program pages starting at defined address * @@ -92,7 +92,7 @@ * @param size The number of bytes to program * @return 0 for success, -1 for error */ -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); /** Get sector size * @@ -100,7 +100,7 @@ * @param address The sector starting address * @return The size of a sector */ -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); /** Get page size * @@ -108,21 +108,21 @@ * @param obj The flash object * @return The size of a page */ -uint32_t flash_get_page_size(const flash_t *obj); +uint32_t aconno_flash_get_page_size(const flash_t *obj); /** Get start address for the flash region * * @param obj The flash object * @return The start address for the flash region */ -uint32_t flash_get_start_address(const flash_t *obj); +uint32_t aconno_flash_get_start_address(const flash_t *obj); /** Get the flash region size * * @param obj The flash object * @return The flash region size */ -uint32_t flash_get_size(const flash_t *obj); +uint32_t aconno_flash_get_size(const flash_t *obj); /**@}*/