1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

sys/auto_init: add auto_init_loramac function

This commit is contained in:
Alexandre Abadie 2019-04-16 13:42:40 +02:00
parent fdeba82b16
commit e697cd5878
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405
4 changed files with 47 additions and 1 deletions

View File

@ -14,4 +14,8 @@ ifneq (,$(filter auto_init_can,$(USEMODULE)))
DIRS += can
endif
ifneq (,$(filter auto_init_loramac,$(USEMODULE)))
DIRS += loramac
endif
include $(RIOTBASE)/Makefile.base

View File

@ -177,6 +177,10 @@ void auto_init(void)
extern void nimble_riot_init(void);
nimble_riot_init();
#endif
#ifdef MODULE_AUTO_INIT_LORAMAC
extern void auto_init_loramac(void);
auto_init_loramac();
#endif
/* initialize network devices */
#ifdef MODULE_AUTO_INIT_GNRC_NETIF
@ -276,7 +280,7 @@ void auto_init(void)
auto_init_w5100();
#endif
#ifdef MODULE_SX127X
#if defined(MODULE_SX127X) && !defined(MODULE_SEMTECH_LORAMAC)
extern void auto_init_sx127x(void);
auto_init_sx127x();
#endif

View File

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

View 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 */
/** @} */