mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/at86rf2xx: remove unused getters
This commit is contained in:
parent
06cc410aa9
commit
ba6c0d845e
@ -94,11 +94,6 @@ static const uint8_t dbm_to_tx_pow[] = { 0x0f, 0x0f, 0x0f, 0x0e, 0x0e, 0x0e,
|
||||
0x05, 0x03, 0x00 };
|
||||
#endif
|
||||
|
||||
void at86rf2xx_get_addr_short(const at86rf2xx_t *dev, network_uint16_t *addr)
|
||||
{
|
||||
memcpy(addr, dev->netdev.short_addr, sizeof(*addr));
|
||||
}
|
||||
|
||||
void at86rf2xx_set_addr_short(at86rf2xx_t *dev, const network_uint16_t *addr)
|
||||
{
|
||||
memcpy(dev->netdev.short_addr, addr, sizeof(*addr));
|
||||
@ -114,11 +109,6 @@ void at86rf2xx_set_addr_short(at86rf2xx_t *dev, const network_uint16_t *addr)
|
||||
dev->netdev.short_addr[0]);
|
||||
}
|
||||
|
||||
void at86rf2xx_get_addr_long(const at86rf2xx_t *dev, eui64_t *addr)
|
||||
{
|
||||
memcpy(addr, dev->netdev.long_addr, sizeof(*addr));
|
||||
}
|
||||
|
||||
void at86rf2xx_set_addr_long(at86rf2xx_t *dev, const eui64_t *addr)
|
||||
{
|
||||
memcpy(dev->netdev.long_addr, addr, sizeof(*addr));
|
||||
@ -129,11 +119,6 @@ void at86rf2xx_set_addr_long(at86rf2xx_t *dev, const eui64_t *addr)
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t at86rf2xx_get_chan(const at86rf2xx_t *dev)
|
||||
{
|
||||
return dev->netdev.chan;
|
||||
}
|
||||
|
||||
void at86rf2xx_set_chan(at86rf2xx_t *dev, uint8_t channel)
|
||||
{
|
||||
if ((channel > AT86RF2XX_MAX_CHANNEL)
|
||||
@ -149,16 +134,6 @@ void at86rf2xx_set_chan(at86rf2xx_t *dev, uint8_t channel)
|
||||
at86rf2xx_configure_phy(dev);
|
||||
}
|
||||
|
||||
uint8_t at86rf2xx_get_page(const at86rf2xx_t *dev)
|
||||
{
|
||||
#if AT86RF2XX_HAVE_SUBGHZ
|
||||
return dev->page;
|
||||
#else
|
||||
(void) dev;
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
void at86rf2xx_set_page(at86rf2xx_t *dev, uint8_t page)
|
||||
{
|
||||
#if AT86RF2XX_HAVE_SUBGHZ
|
||||
@ -214,11 +189,6 @@ uint8_t at86rf2xx_get_rate(at86rf2xx_t *dev)
|
||||
return rate;
|
||||
}
|
||||
|
||||
uint16_t at86rf2xx_get_pan(const at86rf2xx_t *dev)
|
||||
{
|
||||
return dev->netdev.pan;
|
||||
}
|
||||
|
||||
void at86rf2xx_set_pan(at86rf2xx_t *dev, uint16_t pan)
|
||||
{
|
||||
le_uint16_t le_pan = byteorder_htols(pan);
|
||||
|
@ -303,11 +303,13 @@ static int _get(netdev_t *netdev, netopt_t opt, void *val, size_t max_len)
|
||||
|
||||
/* getting these options doesn't require the transceiver to be responsive */
|
||||
switch (opt) {
|
||||
#if AT86RF2XX_HAVE_SUBGHZ
|
||||
case NETOPT_CHANNEL_PAGE:
|
||||
assert(max_len >= sizeof(uint16_t));
|
||||
((uint8_t *)val)[1] = 0;
|
||||
((uint8_t *)val)[0] = at86rf2xx_get_page(dev);
|
||||
((uint8_t *)val)[0] = dev->page;
|
||||
return sizeof(uint16_t);
|
||||
#endif
|
||||
|
||||
case NETOPT_STATE:
|
||||
assert(max_len >= sizeof(netopt_state_t));
|
||||
|
@ -328,16 +328,6 @@ void at86rf2xx_setup(at86rf2xx_t *dev, const at86rf2xx_params_t *params, uint8_t
|
||||
*/
|
||||
void at86rf2xx_reset(at86rf2xx_t *dev);
|
||||
|
||||
/**
|
||||
* @brief Get the short address of the given device
|
||||
*
|
||||
* @param[in] dev device to read from
|
||||
* @param[out] addr the short address will be stored here
|
||||
*
|
||||
* @return the currently set (2-byte) short address
|
||||
*/
|
||||
void at86rf2xx_get_addr_short(const at86rf2xx_t *dev, network_uint16_t *addr);
|
||||
|
||||
/**
|
||||
* @brief Set the short address of the given device
|
||||
*
|
||||
@ -346,16 +336,6 @@ void at86rf2xx_get_addr_short(const at86rf2xx_t *dev, network_uint16_t *addr);
|
||||
*/
|
||||
void at86rf2xx_set_addr_short(at86rf2xx_t *dev, const network_uint16_t *addr);
|
||||
|
||||
/**
|
||||
* @brief Get the configured long address of the given device
|
||||
*
|
||||
* @param[in] dev device to read from
|
||||
* @param[out] addr the long address will be stored here
|
||||
*
|
||||
* @return the currently set (8-byte) long address
|
||||
*/
|
||||
void at86rf2xx_get_addr_long(const at86rf2xx_t *dev, eui64_t *addr);
|
||||
|
||||
/**
|
||||
* @brief Set the long address of the given device
|
||||
*
|
||||
@ -364,15 +344,6 @@ void at86rf2xx_get_addr_long(const at86rf2xx_t *dev, eui64_t *addr);
|
||||
*/
|
||||
void at86rf2xx_set_addr_long(at86rf2xx_t *dev, const eui64_t *addr);
|
||||
|
||||
/**
|
||||
* @brief Get the configured channel number of the given device
|
||||
*
|
||||
* @param[in] dev device to read from
|
||||
*
|
||||
* @return the currently set channel number
|
||||
*/
|
||||
uint8_t at86rf2xx_get_chan(const at86rf2xx_t *dev);
|
||||
|
||||
/**
|
||||
* @brief Set the channel number of the given device
|
||||
*
|
||||
@ -381,15 +352,6 @@ uint8_t at86rf2xx_get_chan(const at86rf2xx_t *dev);
|
||||
*/
|
||||
void at86rf2xx_set_chan(at86rf2xx_t *dev, uint8_t chan);
|
||||
|
||||
/**
|
||||
* @brief Get the configured channel page of the given device
|
||||
*
|
||||
* @param[in] dev device to read from
|
||||
*
|
||||
* @return the currently set channel page
|
||||
*/
|
||||
uint8_t at86rf2xx_get_page(const at86rf2xx_t *dev);
|
||||
|
||||
/**
|
||||
* @brief Set the channel page of the given device
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user