Merge pull request #14938 from jia200x/pr/improve_radio_hal
net/ieee802154_hal: add const qualifiers and set pan_id with pointer
This commit is contained in:
commit
ffea8cdc14
@ -363,7 +363,7 @@ struct ieee802154_radio_ops {
|
||||
* @return 0 on success
|
||||
* @return negative errno on error
|
||||
*/
|
||||
int (*write)(ieee802154_dev_t *dev, iolist_t *psdu);
|
||||
int (*write)(ieee802154_dev_t *dev, const iolist_t *psdu);
|
||||
|
||||
/**
|
||||
* @brief Request the transmission of a preloaded frame
|
||||
@ -635,14 +635,15 @@ struct ieee802154_radio_ops {
|
||||
* address is not altered..
|
||||
* @param[in] ext_addr the IEEE802.15.4 extended address (Network Byte Order).
|
||||
* If NULL, the extended address is not altered.
|
||||
* @param[in] pan_id the IEEE802.15.4 PAN ID
|
||||
* @param[in] pan_id the IEEE802.15.4 PAN ID. If NULL, the PAN ID is not altered.
|
||||
*
|
||||
* @return 0 on success
|
||||
* @return negative errno on error
|
||||
*/
|
||||
int (*set_hw_addr_filter)(ieee802154_dev_t *dev,
|
||||
network_uint16_t *short_addr,
|
||||
eui64_t *ext_addr, uint16_t pan_id);
|
||||
const network_uint16_t *short_addr,
|
||||
const eui64_t *ext_addr,
|
||||
const uint16_t *pan_id);
|
||||
|
||||
/**
|
||||
* @brief Set number of frame retransmissions
|
||||
@ -701,7 +702,7 @@ struct ieee802154_radio_ops {
|
||||
*
|
||||
* @return result of @ref ieee802154_radio_ops::write
|
||||
*/
|
||||
static inline int ieee802154_radio_write(ieee802154_dev_t *dev, iolist_t *psdu)
|
||||
static inline int ieee802154_radio_write(ieee802154_dev_t *dev, const iolist_t *psdu)
|
||||
{
|
||||
return dev->driver->write(dev, psdu);
|
||||
}
|
||||
@ -826,16 +827,18 @@ static inline int ieee802154_radio_off(ieee802154_dev_t *dev)
|
||||
* @pre the device is on
|
||||
*
|
||||
* @param[in] dev IEEE802.15.4 device descriptor
|
||||
* @param[in] short_addr the IEEE802.15.4 short address
|
||||
* @param[in] ext_addr the IEEE802.15.4 extended address (Network Byte Order)
|
||||
* @param[in] pan_id IEEE802.15.4 PAN ID
|
||||
* @param[in] short_addr the IEEE802.15.4 short address. If NULL, the short
|
||||
* address is not altered..
|
||||
* @param[in] ext_addr the IEEE802.15.4 extended address (Network Byte Order).
|
||||
* If NULL, the extended address is not altered.
|
||||
* @param[in] pan_id the IEEE802.15.4 PAN ID. If NULL, the PAN ID is not altered.
|
||||
*
|
||||
* @return result of @ref ieee802154_radio_ops::set_hw_addr_filter
|
||||
*/
|
||||
static inline int ieee802154_radio_set_hw_addr_filter(ieee802154_dev_t *dev,
|
||||
network_uint16_t *short_addr,
|
||||
eui64_t *ext_addr,
|
||||
uint16_t pan_id)
|
||||
const network_uint16_t *short_addr,
|
||||
const eui64_t *ext_addr,
|
||||
const uint16_t *pan_id)
|
||||
{
|
||||
return dev->driver->set_hw_addr_filter(dev, short_addr, ext_addr, pan_id);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user