mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #5186 from OlegHahm/netdev_setup_params_fix
auto_init: fixup for #5185
This commit is contained in:
commit
fe08d42e0b
@ -12,7 +12,7 @@
|
||||
* @{
|
||||
*
|
||||
* @file
|
||||
* @brief Auto initialization for nx_at86rf2xx network interfaces
|
||||
* @brief Auto initialization for at86rf2xx network interfaces
|
||||
*
|
||||
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
||||
*/
|
||||
|
@ -44,7 +44,11 @@ void auto_init_encx24j600(void)
|
||||
{
|
||||
DEBUG("auto_init_encx24j600(): initializing device...\n");
|
||||
/* setup netdev2 device */
|
||||
encx24j600_setup(&encx24j600, ENCX24J600_SPI, ENCX24J600_CS, ENCX24J600_INT);
|
||||
encx24j600_params_t p;
|
||||
p.spi = ENCX24J600_SPI;
|
||||
p.cs_pin = ENCX24J600_CS;
|
||||
p.int_pin = ENCX24J600_INT;
|
||||
encx24j600_setup(&encx24j600, &p);
|
||||
|
||||
/* initialize netdev2<->gnrc adapter state */
|
||||
gnrc_netdev2_eth_init(&_gnrc_encx24j600, (netdev2_t*)&encx24j600);
|
||||
|
@ -51,8 +51,12 @@ void auto_init_ethos(void)
|
||||
DEBUG("auto_init_ethos(): initializing device...\n");
|
||||
|
||||
/* setup netdev2 device */
|
||||
ethos_setup(ðos, ETHOS_UART,
|
||||
ETHOS_BAUDRATE, _inbuf, sizeof(_inbuf));
|
||||
ethos_params_t p;
|
||||
p.uart = ETHOS_UART;
|
||||
p.baudrate = ETHOS_BAUDRATE;
|
||||
p.buffer = _inbuf;
|
||||
b.bufsize = sizeof(_inbuf);
|
||||
ethos_setup(ðos, &p);
|
||||
|
||||
/* initialize netdev2<->gnrc adapter state */
|
||||
gnrc_netdev2_eth_init(&_gnrc_ethos, (netdev2_t*)ðos);
|
||||
|
Loading…
Reference in New Issue
Block a user