Browse Source

fix: add fal.h

Jackistang 4 năm trước cách đây
mục cha
commit
6992be5d43
2 tập tin đã thay đổi với 4 bổ sung5 xóa
  1. 4 3
      porting/chipset/bcm.c
  2. 0 2
      porting/init.c

+ 4 - 3
porting/chipset/bcm.c

@@ -108,6 +108,10 @@ hm_chipset_t* hm_chipset_get_instance(void)
 
 #ifdef HM_USING_BOARD_ART_PI
 
+#include <spi_flash.h>
+#include <drv_spi.h>
+#include <fal.h>
+
 #define BT_FIRMWARE_PARTITION_NAME "bt_image"
 static int bt_firmware_create(void)
 {
@@ -134,12 +138,9 @@ static int bt_firmware_create(void)
     return 0;
 }
 
-#include <spi_flash.h>
-#include <drv_spi.h>
 static int rt_flash_init(void)
 {
     extern rt_spi_flash_device_t rt_sfud_flash_probe(const char *spi_flash_dev_name, const char *spi_dev_name);
-    extern int fal_init(void);
 
     rt_hw_spi_device_attach("spi1", "spi10", GPIOA, GPIO_PIN_4);
 

+ 0 - 2
porting/init.c

@@ -29,8 +29,6 @@ static void hm_thread_entry(void *args)
     chipset_instance->init();
 
 #ifdef HM_USING_STACK_NIMBLE
-    // uint8_t random_addr[6] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x06};
-    // ble_hs_id_set_rnd(random_addr);
     hm_nimble_init();
 #endif