Loading...
Searching...
No Matches
kw41zrf_getset.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 SKF AB
3 * Copyright (C) 2016 Phytec Messtechnik GmbH
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
20#ifndef KW41ZRF_GETSET_H
21#define KW41ZRF_GETSET_H
22
23#include "kw41zrf.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#define KW41ZRF_OPT_CSMA (0x01u)
34#define KW41ZRF_OPT_PROMISCUOUS (0x02u)
35#define KW41ZRF_OPT_PRELOADING (0x04u)
36#define KW41ZRF_OPT_AUTOACK (0x80u)
37#define KW41ZRF_OPT_ACK_PENDING (0x81u)
42 XCVSEQ_IDLE = 0b000,
43 XCVSEQ_RECEIVE = 0b001,
44 XCVSEQ_TRANSMIT = 0b010,
45 XCVSEQ_CCA = 0b011,
46 XCVSEQ_TX_RX = 0b100,
47 XCVSEQ_CONTINUOUS_CCA = 0b101,
48 /* Other values are reserved */
49 /* Special value for idle_seq when sleeping */
50 XCVSEQ_DSM_IDLE = 0b1000,
51};
52
59void kw41zrf_set_tx_power(kw41zrf_t *dev, int16_t txpower);
60
69
76int kw41zrf_set_channel(kw41zrf_t *dev, uint8_t val);
77
86
93void kw41zrf_set_pan(kw41zrf_t *dev, uint16_t pan);
94
103
111
119
127
135
143
150void kw41zrf_set_cca_threshold(kw41zrf_t *dev, int8_t value);
151
158void kw41zrf_set_cca_mode(kw41zrf_t *dev, uint8_t mode);
159
167
175
185
192void kw41zrf_set_rx_watermark(kw41zrf_t *dev, uint8_t value);
193
201void kw41zrf_set_option(kw41zrf_t *dev, uint8_t option, uint8_t state);
202
203#ifdef __cplusplus
204}
205#endif
206
207#endif /* KW41ZRF_GETSET_H */
Interface definition for the kw41zrf driver.
uint8_t kw41zrf_get_channel(kw41zrf_t *dev)
Get channel of given device.
int16_t kw41zrf_get_txpower(kw41zrf_t *dev)
Get tx power value of given device.
uint8_t kw41zrf_get_cca_mode(kw41zrf_t *dev)
Get CCA mode of a given device.
void kw41zrf_get_addr_long(kw41zrf_t *dev, eui64_t *addr)
Get long address of a given device.
void kw41zrf_set_tx_power(kw41zrf_t *dev, int16_t txpower)
Set tx power of given device.
void kw41zrf_set_cca_threshold(kw41zrf_t *dev, int8_t value)
Set CCA threshold of a given device.
int kw41zrf_set_channel(kw41zrf_t *dev, uint8_t val)
Set channel of given device.
void kw41zrf_set_option(kw41zrf_t *dev, uint8_t option, uint8_t state)
Set netopt a given device.
void kw41zrf_get_addr_short(kw41zrf_t *dev, network_uint16_t *addr)
Get short address of a given device.
void kw41zrf_set_addr_long(kw41zrf_t *dev, const eui64_t *addr)
Set long address of a given device.
int8_t kw41zrf_get_cca_threshold(kw41zrf_t *dev)
Get CCA threshold of a given device.
void kw41zrf_set_pan(kw41zrf_t *dev, uint16_t pan)
Set PAN ID of a given device.
int8_t kw41zrf_get_ed_level(kw41zrf_t *dev)
Get latest ED measurement from the device.
int kw41zrf_cca(kw41zrf_t *dev)
Perform one CCA measurement and return the result.
void kw41zrf_set_addr_short(kw41zrf_t *dev, const network_uint16_t *addr)
Set short address of a given device.
void kw41zrf_set_rx_watermark(kw41zrf_t *dev, uint8_t value)
Set receive watermark to signal when the packet buffer is part full.
kw41zrf_xcvseq
Transceiver sequence identifiers.
uint16_t kw41zrf_get_pan(kw41zrf_t *dev)
Get PAN ID of given device.
void kw41zrf_set_cca_mode(kw41zrf_t *dev, uint8_t mode)
Set CCA mode of a given device.
Device descriptor for KW41ZRF radio devices.
Definition kw41zrf.h:102
A 16 bit integer in big endian aka network byte order.
Definition byteorder.h:74
Data type to represent an EUI-64.
Definition eui64.h:55