mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
sys/auto_init/loramac: initialize sx127x radio there
This commit is contained in:
parent
5aff617512
commit
e4c54de2a6
@ -18,12 +18,19 @@
|
||||
*/
|
||||
|
||||
#include "log.h"
|
||||
#include "sx127x.h"
|
||||
#include "sx127x_netdev.h"
|
||||
#include "sx127x_params.h"
|
||||
#include "semtech_loramac.h"
|
||||
|
||||
semtech_loramac_t loramac;
|
||||
static sx127x_t sx127x;
|
||||
|
||||
void auto_init_loramac(void)
|
||||
{
|
||||
sx127x_setup(&sx127x, &sx127x_params[0], 0);
|
||||
loramac.netdev = (netdev_t *)&sx127x;
|
||||
loramac.netdev->driver = &sx127x_driver;
|
||||
semtech_loramac_init(&loramac);
|
||||
}
|
||||
/** @} */
|
||||
|
Loading…
Reference in New Issue
Block a user