diff --git a/drivers/cc2420/cc2420.c b/drivers/cc2420/cc2420.c index d52db549d3..78297b546f 100644 --- a/drivers/cc2420/cc2420.c +++ b/drivers/cc2420/cc2420.c @@ -124,7 +124,7 @@ uint16_t cc2420_get_channel(void) return ((cc2420_read_reg(CC2420_REG_FSCTRL) - 357) / 5) + 11; } -uint16_t cc2420_set_address(uint16_t addr) +radio_address_t cc2420_set_address(radio_address_t addr) { uint8_t buf[2]; buf[0] = (uint8_t)(addr & 0xFF); @@ -149,7 +149,7 @@ uint64_t cc2420_set_address_long(uint64_t addr) return addr; } -uint16_t cc2420_get_address(void) +radio_address_t cc2420_get_address(void) { uint16_t addr; cc2420_read_ram(CC2420_RAM_SHORTADR, (uint8_t *)&addr, sizeof(addr)); diff --git a/drivers/include/cc2420.h b/drivers/include/cc2420.h index 4f239a3b39..336e1cd9ee 100644 --- a/drivers/include/cc2420.h +++ b/drivers/include/cc2420.h @@ -79,6 +79,8 @@ Frame type value: #include "ieee802154_frame.h" #include "cc2420_settings.h" +#include "radio/types.h" + #define CC2420_MAX_PKT_LENGTH 127 #define CC2420_MAX_DATA_LENGTH (118) @@ -144,7 +146,7 @@ uint16_t cc2420_get_channel(void); * * @return The set address after calling. */ -uint16_t cc2420_set_address(uint16_t addr); +radio_address_t cc2420_set_address(radio_address_t addr); /** * @brief Gets the current short address of the cc2420. @@ -152,7 +154,7 @@ uint16_t cc2420_set_address(uint16_t addr); * @return The current short address. * */ -uint16_t cc2420_get_address(void); +radio_address_t cc2420_get_address(void); /** * @brief Sets the IEEE long address of the cc2420.