replace uint16_t with radio_address_t in cc2420

adpot includes
This commit is contained in:
Ludwig Ortmann 2014-01-31 09:52:33 +01:00
parent 170bfb8aa5
commit 04b94e0e9a
2 changed files with 6 additions and 4 deletions

View File

@ -124,7 +124,7 @@ uint16_t cc2420_get_channel(void)
return ((cc2420_read_reg(CC2420_REG_FSCTRL) - 357) / 5) + 11; 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]; uint8_t buf[2];
buf[0] = (uint8_t)(addr & 0xFF); buf[0] = (uint8_t)(addr & 0xFF);
@ -149,7 +149,7 @@ uint64_t cc2420_set_address_long(uint64_t addr)
return addr; return addr;
} }
uint16_t cc2420_get_address(void) radio_address_t cc2420_get_address(void)
{ {
uint16_t addr; uint16_t addr;
cc2420_read_ram(CC2420_RAM_SHORTADR, (uint8_t *)&addr, sizeof(addr)); cc2420_read_ram(CC2420_RAM_SHORTADR, (uint8_t *)&addr, sizeof(addr));

View File

@ -79,6 +79,8 @@ Frame type value:
#include "ieee802154_frame.h" #include "ieee802154_frame.h"
#include "cc2420_settings.h" #include "cc2420_settings.h"
#include "radio/types.h"
#define CC2420_MAX_PKT_LENGTH 127 #define CC2420_MAX_PKT_LENGTH 127
#define CC2420_MAX_DATA_LENGTH (118) #define CC2420_MAX_DATA_LENGTH (118)
@ -144,7 +146,7 @@ uint16_t cc2420_get_channel(void);
* *
* @return The set address after calling. * @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. * @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. * @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. * @brief Sets the IEEE long address of the cc2420.