sys/auto_init: add auto_init_loramac function
This commit is contained in:
parent
fdeba82b16
commit
e697cd5878
@ -14,4 +14,8 @@ ifneq (,$(filter auto_init_can,$(USEMODULE)))
|
|||||||
DIRS += can
|
DIRS += can
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(filter auto_init_loramac,$(USEMODULE)))
|
||||||
|
DIRS += loramac
|
||||||
|
endif
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.base
|
include $(RIOTBASE)/Makefile.base
|
||||||
|
|||||||
@ -177,6 +177,10 @@ void auto_init(void)
|
|||||||
extern void nimble_riot_init(void);
|
extern void nimble_riot_init(void);
|
||||||
nimble_riot_init();
|
nimble_riot_init();
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef MODULE_AUTO_INIT_LORAMAC
|
||||||
|
extern void auto_init_loramac(void);
|
||||||
|
auto_init_loramac();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* initialize network devices */
|
/* initialize network devices */
|
||||||
#ifdef MODULE_AUTO_INIT_GNRC_NETIF
|
#ifdef MODULE_AUTO_INIT_GNRC_NETIF
|
||||||
@ -276,7 +280,7 @@ void auto_init(void)
|
|||||||
auto_init_w5100();
|
auto_init_w5100();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MODULE_SX127X
|
#if defined(MODULE_SX127X) && !defined(MODULE_SEMTECH_LORAMAC)
|
||||||
extern void auto_init_sx127x(void);
|
extern void auto_init_sx127x(void);
|
||||||
auto_init_sx127x();
|
auto_init_sx127x();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
3
sys/auto_init/loramac/Makefile
Normal file
3
sys/auto_init/loramac/Makefile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
MODULE = auto_init_loramac
|
||||||
|
|
||||||
|
include $(RIOTBASE)/Makefile.base
|
||||||
35
sys/auto_init/loramac/auto_init_loramac.c
Normal file
35
sys/auto_init/loramac/auto_init_loramac.c
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2019 Inria
|
||||||
|
*
|
||||||
|
* This file is subject to the terms and conditions of the GNU Lesser
|
||||||
|
* General Public License v2.1. See the file LICENSE in the top level
|
||||||
|
* directory for more details.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ingroup sys_auto_init_gnrc_netif
|
||||||
|
* @{
|
||||||
|
*
|
||||||
|
* @file
|
||||||
|
* @brief Auto initialization for Semtech Loramac-node package
|
||||||
|
*
|
||||||
|
* @author Alexandre Abadie <alexandre.abadie@inria.fr>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef MODULE_SEMTECH_LORAMAC
|
||||||
|
|
||||||
|
#include "log.h"
|
||||||
|
#include "semtech_loramac.h"
|
||||||
|
|
||||||
|
semtech_loramac_t loramac;
|
||||||
|
|
||||||
|
void auto_init_loramac(void)
|
||||||
|
{
|
||||||
|
semtech_loramac_init(&loramac);
|
||||||
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
typedef int dont_be_pedantic;
|
||||||
|
#endif /* MODULE_SEMTECH_LORAMAC */
|
||||||
|
/** @} */
|
||||||
Loading…
x
Reference in New Issue
Block a user