1
0
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:
Alexandre Abadie 2021-03-12 10:33:01 +01:00
parent 5aff617512
commit e4c54de2a6
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

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