1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/drivers/netdev/base/base.c
Thomas Eichinger dfb1b56fad drivers/at86rf231: refactoring of the at86rf231 radio driver
* deploy extended operation mode
* cleanup
* implement netdev 802154.h interface
2014-10-30 22:35:00 +01:00

43 lines
823 B
C

/*
* Copyright (C) 2014 Martin Lenders <mlenders@inf.fu-berlin.de>
*
* 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.
*/
/**
* @addtogroup netdev
* @{
*
* @file base.c
* @brief Provides helper functions to the API in @ref netdev/base.h.
*
* @author Martine Lenders <mlenders@inf.fu-berlin.de>
*/
#include "clist.h"
#include "netdev/base.h"
size_t netdev_get_hlist_len(const netdev_hlist_t *hlist)
{
netdev_hlist_t *ptr = (netdev_hlist_t *)hlist;
size_t length = 0;
if (ptr == NULL) {
return 0;
}
do {
length += ptr->header_len;
netdev_hlist_advance(&ptr);
} while (ptr != hlist);
return length;
}
/**
* @}
*/