1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:32:45 +01:00

pkg/nimble: adapt to nrf51 family

This commit is contained in:
Alexandre Abadie 2019-04-27 21:24:54 +02:00
parent 32f54178ea
commit 701ba9c608
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
5 changed files with 10 additions and 9 deletions

View File

@ -64,8 +64,8 @@ nimble_transport_ram:
nimble_controller:
"$(MAKE)" -C $(PDIR)/nimble/controller/src/ -f $(TDIR)/controller.mk
nimble_drivers_nrf52:
"$(MAKE)" -C $(PDIR)/nimble/drivers/nrf52/src/ -f $(TDIR)/drivers.nrf52.mk
nimble_drivers_nrf5x:
"$(MAKE)" -C $(PDIR)/nimble/drivers/$(CPU_FAM)/src/ -f $(TDIR)/drivers.nrf5x.mk
# additional, RIOT specific nimble modules
nimble_addr:

View File

@ -29,8 +29,8 @@ endif
# nimble controller dependencies
ifneq (,$(filter nimble_controller,$(USEMODULE)))
USEMODULE += nimble_transport_ram
ifeq (nrf52,$(CPU_FAM))
USEMODULE += nimble_drivers_nrf52
ifneq (,$(filter nrf5%,$(CPU_FAM)))
USEMODULE += nimble_drivers_nrf5x
endif
endif

View File

@ -17,8 +17,8 @@ ifneq (,$(filter nimble_controller,$(USEMODULE)))
CFLAGS += -DNIMBLE_CFG_CONTROLLER=1
CFLAGS += -DMYNEWT_VAL_OS_CPUTIME_FREQ=32768
ifneq (,$(filter nimble_drivers_nrf52,$(USEMODULE)))
INCLUDES += $(NIMIBASE)/nimble/drivers/nrf52/include
ifneq (,$(filter nimble_drivers_nrf5x,$(USEMODULE)))
INCLUDES += $(NIMIBASE)/nimble/drivers/$(CPU_FAM)/include
endif
endif

View File

@ -36,7 +36,7 @@
#endif
#ifdef MODULE_NIMBLE_CONTROLLER
#ifdef CPU_FAM_NRF52
#if defined(CPU_FAM_NRF52) || defined(CPU_FAM_NRF51)
#include "nrf_clock.h"
#endif
@ -56,9 +56,10 @@ static void *_host_thread(void *arg)
#ifdef MODULE_NIMBLE_CONTROLLER
/* XXX: NimBLE needs the nRF5x's LF clock to run */
#ifdef CPU_FAM_NRF52
#if defined(CPU_FAM_NRF52) || defined(CPU_FAM_NRF51)
clock_start_lf();
#endif
/* Run the controller
*
* Create task where NimBLE LL will run. This one is required as LL has its

View File

@ -1,3 +1,3 @@
MODULE = nimble_drivers_nrf52
MODULE = nimble_drivers_nrf5x
include $(RIOTBASE)/Makefile.base