فهرست منبع

【优化】初始化代码。

Signed-off-by: armink <armink.ztl@gmail.com>
armink 7 سال پیش
والد
کامیت
d486281fd4
2فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 0 2
      inc/fal.h
  2. 3 0
      src/fal.c

+ 0 - 2
inc/fal.h

@@ -39,11 +39,9 @@
 int fal_init(void);
 
 /* flash device operator API */
-int fal_flash_init(void);
 const struct fal_flash_dev *fal_flash_device_find(const char *name);
 
 /* partition operator API */
-int fal_partition_init(void);
 const struct fal_partition *fal_partition_find(const char *name);
 const struct fal_partition *fal_get_partition_table(size_t *len);
 int fal_partition_read(const struct fal_partition *part, uint32_t addr, uint8_t *buf, size_t size);

+ 3 - 0
src/fal.c

@@ -33,6 +33,9 @@
  */
 int fal_init(void)
 {
+    extern int fal_flash_init(void);
+    extern int fal_partition_init(void);
+
     int result;
     /* initialize all flash device on FAL flash table */
     result = fal_flash_init();