kw2xrf_getset.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016 Phytec Messtechnik GmbH
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
19 #ifndef KW2XRF_GETSET_H
20 #define KW2XRF_GETSET_H
21 
22 #include "kw2xrf.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
34 void kw2xrf_set_tx_power(kw2xrf_t *dev, int16_t txpower);
35 
43 uint16_t kw2xrf_get_txpower(kw2xrf_t *dev);
44 
51 int kw2xrf_set_channel(kw2xrf_t *dev, uint8_t val);
52 
60 uint8_t kw2xrf_get_channel(kw2xrf_t *dev);
61 
68 
75 
83 
90 void kw2xrf_set_pan(kw2xrf_t *dev, uint16_t pan);
91 
98 void kw2xrf_set_addr_short(kw2xrf_t *dev, uint16_t addr);
99 
106 void kw2xrf_set_addr_long(kw2xrf_t *dev, uint64_t addr);
107 
114 uint16_t kw2xrf_get_addr_short(kw2xrf_t *dev);
115 
122 uint64_t kw2xrf_get_addr_long(kw2xrf_t *dev);
123 
131 
138 void kw2xrf_set_cca_threshold(kw2xrf_t *dev, int8_t value);
139 
146 void kw2xrf_set_cca_mode(kw2xrf_t *dev, uint8_t mode);
147 
154 uint8_t kw2xrf_get_cca_mode(kw2xrf_t *dev);
155 
163 int16_t kw2xrf_get_rssi(uint32_t value);
164 
172 
180 int kw2xrf_cca(kw2xrf_t *dev);
181 
188 void kw2xrf_set_rx_watermark(kw2xrf_t *dev, uint8_t value);
189 
197 void kw2xrf_set_option(kw2xrf_t *dev, uint16_t option, bool state);
198 
199 #ifdef __cplusplus
200 }
201 #endif
202 
203 #endif /* KW2XRF_GETSET_H */
204 
kw2xrf_set_tx_power
void kw2xrf_set_tx_power(kw2xrf_t *dev, int16_t txpower)
Set tx power of given device.
kw2xrf_set_rx_watermark
void kw2xrf_set_rx_watermark(kw2xrf_t *dev, uint8_t value)
Set receive watermark.
kw2xrf_get_status
netopt_state_t kw2xrf_get_status(kw2xrf_t *dev)
Get state of a given device.
kw2xrf_get_cca_mode
uint8_t kw2xrf_get_cca_mode(kw2xrf_t *dev)
Get CCA mode of a given device.
kw2xrf_cca
int kw2xrf_cca(kw2xrf_t *dev)
Enable continuous CCA.
kw2xrf_set_sequence
void kw2xrf_set_sequence(kw2xrf_t *dev, kw2xrf_physeq_t seq)
Set sequence state of device.
kw2xrf_set_pan
void kw2xrf_set_pan(kw2xrf_t *dev, uint16_t pan)
Set PAN ID of a given device.
kw2xrf_get_channel
uint8_t kw2xrf_get_channel(kw2xrf_t *dev)
Get channel of given device.
kw2xrf.h
Interface definition for the kw2xrf driver.
kw2xrf_set_addr_short
void kw2xrf_set_addr_short(kw2xrf_t *dev, uint16_t addr)
Set short address of a given device.
netopt_state_t
netopt_state_t
Option parameter to be used with NETOPT_STATE to set or get the state of a network device or protocol...
Definition: netopt.h:805
kw2xrf_get_txpower
uint16_t kw2xrf_get_txpower(kw2xrf_t *dev)
Get tx power value of given device.
kw2xrf_get_addr_long
uint64_t kw2xrf_get_addr_long(kw2xrf_t *dev)
Get long address of a given device.
kw2xrf_get_rssi
int16_t kw2xrf_get_rssi(uint32_t value)
Get RSSI from LQI value.
kw2xrf_physeq_t
kw2xrf_physeq_t
Transceiver Sequence Selector, define Values for XCVSEQ.
Definition: kw2xrf_reg.h:79
kw2xrf_abort_sequence
void kw2xrf_abort_sequence(kw2xrf_t *dev)
Abort current sequence of device.
kw2xrf_set_cca_threshold
void kw2xrf_set_cca_threshold(kw2xrf_t *dev, int8_t value)
Set CCA threshold of a given device.
kw2xrf_set_addr_long
void kw2xrf_set_addr_long(kw2xrf_t *dev, uint64_t addr)
Set long address of a given device.
kw2xrf_set_channel
int kw2xrf_set_channel(kw2xrf_t *dev, uint8_t val)
Set channel of given device.
kw2xrf_set_cca_mode
void kw2xrf_set_cca_mode(kw2xrf_t *dev, uint8_t mode)
Set CCA mode of a given device.
kw2xrf_get_cca_threshold
int8_t kw2xrf_get_cca_threshold(kw2xrf_t *dev)
Get CCA threshold of a given device.
kw2xrf_set_idle_sequence
void kw2xrf_set_idle_sequence(kw2xrf_t *dev)
Set idle sequence state of device.
kw2xrf_t
Device descriptor for KW2XRF radio devices.
Definition: kw2xrf.h:125
kw2xrf_get_addr_short
uint16_t kw2xrf_get_addr_short(kw2xrf_t *dev)
Get short address of a given device.
kw2xrf_set_option
void kw2xrf_set_option(kw2xrf_t *dev, uint16_t option, bool state)
Set netopt a given device.