mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 10:03:50 +01:00
gnrc: piggy-back some code style changes
This commit is contained in:
parent
9cf5e5fb6a
commit
e8d5d5576a
@ -33,7 +33,7 @@
|
|||||||
#include "net/ieee802154.h"
|
#include "net/ieee802154.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -216,8 +216,8 @@ void kw2xrf_set_sequence(kw2xrf_t *dev, kw2xrf_physeq_t seq)
|
|||||||
/* TODO: This should only used in combination with
|
/* TODO: This should only used in combination with
|
||||||
* an CSMA-MAC layer. Currently not working
|
* an CSMA-MAC layer. Currently not working
|
||||||
*/
|
*/
|
||||||
/*if((seq == XCVSEQ_TRANSMIT) || (seq == XCVSEQ_TX_RX)) {
|
/*if ((seq == XCVSEQ_TRANSMIT) || (seq == XCVSEQ_TX_RX)) {
|
||||||
if((dev->option) & KW2XRF_OPT_AUTOACK) {
|
if ((dev->option) & KW2XRF_OPT_AUTOACK) {
|
||||||
seq = XCVSEQ_TX_RX;
|
seq = XCVSEQ_TX_RX;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1060,7 +1060,7 @@ int _assemble_tx_buf(kw2xrf_t *dev, ng_pktsnip_t *pkt)
|
|||||||
* since this is a soft_mac device this has to be
|
* since this is a soft_mac device this has to be
|
||||||
* handled in a upcoming CSMA-MAC layer.
|
* handled in a upcoming CSMA-MAC layer.
|
||||||
*/
|
*/
|
||||||
/*if(dev->option & KW2XRF_OPT_AUTOACK) {
|
/*if (dev->option & KW2XRF_OPT_AUTOACK) {
|
||||||
dev->buf[1] = 0x61;
|
dev->buf[1] = 0x61;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@ -487,7 +487,8 @@ int xbee_init(xbee_t *dev, uart_t uart, uint32_t baudrate,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool _is_broadcast(ng_netif_hdr_t *hdr) {
|
static inline bool _is_broadcast(ng_netif_hdr_t *hdr)
|
||||||
|
{
|
||||||
/* IEEE 802.15.4 does not support multicast so we need to check both flags */
|
/* IEEE 802.15.4 does not support multicast so we need to check both flags */
|
||||||
return (bool)(hdr->flags & (NG_NETIF_HDR_FLAGS_BROADCAST |
|
return (bool)(hdr->flags & (NG_NETIF_HDR_FLAGS_BROADCAST |
|
||||||
NG_NETIF_HDR_FLAGS_MULTICAST));
|
NG_NETIF_HDR_FLAGS_MULTICAST));
|
||||||
@ -544,7 +545,8 @@ static int _send(ng_netdev_t *netdev, ng_pktsnip_t *pkt)
|
|||||||
dev->tx_buf[3] = API_ID_TX_SHORT_ADDR;
|
dev->tx_buf[3] = API_ID_TX_SHORT_ADDR;
|
||||||
memcpy(dev->tx_buf + 5, ng_netif_hdr_get_dst_addr(hdr), 2);
|
memcpy(dev->tx_buf + 5, ng_netif_hdr_get_dst_addr(hdr), 2);
|
||||||
pos = 7;
|
pos = 7;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
dev->tx_buf[1] = (uint8_t)((size + 11) >> 8);
|
dev->tx_buf[1] = (uint8_t)((size + 11) >> 8);
|
||||||
dev->tx_buf[2] = (uint8_t)(size + 11);
|
dev->tx_buf[2] = (uint8_t)(size + 11);
|
||||||
dev->tx_buf[3] = API_ID_TX_LONG_ADDR;
|
dev->tx_buf[3] = API_ID_TX_LONG_ADDR;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user