cc2530: do not declare sfd_timestamp if not used
This commit is contained in:
parent
cf97cfaff8
commit
b7fb06052f
|
@ -436,17 +436,17 @@ cc2520_transmit(unsigned short payload_len)
|
||||||
#endif /* WITH_SEND_CCA */
|
#endif /* WITH_SEND_CCA */
|
||||||
for(i = LOOP_20_SYMBOLS; i > 0; i--) {
|
for(i = LOOP_20_SYMBOLS; i > 0; i--) {
|
||||||
if(CC2520_SFD_IS_1) {
|
if(CC2520_SFD_IS_1) {
|
||||||
|
#if PACKETBUF_WITH_PACKET_TYPE
|
||||||
{
|
{
|
||||||
rtimer_clock_t sfd_timestamp;
|
rtimer_clock_t sfd_timestamp;
|
||||||
sfd_timestamp = cc2520_sfd_start_time;
|
sfd_timestamp = cc2520_sfd_start_time;
|
||||||
#if PACKETBUF_WITH_PACKET_TYPE
|
|
||||||
if(packetbuf_attr(PACKETBUF_ATTR_PACKET_TYPE) ==
|
if(packetbuf_attr(PACKETBUF_ATTR_PACKET_TYPE) ==
|
||||||
PACKETBUF_ATTR_PACKET_TYPE_TIMESTAMP) {
|
PACKETBUF_ATTR_PACKET_TYPE_TIMESTAMP) {
|
||||||
/* Write timestamp to last two bytes of packet in TXFIFO. */
|
/* Write timestamp to last two bytes of packet in TXFIFO. */
|
||||||
CC2520_WRITE_RAM(&sfd_timestamp, CC2520RAM_TXFIFO + payload_len - 1, 2);
|
CC2520_WRITE_RAM(&sfd_timestamp, CC2520RAM_TXFIFO + payload_len - 1, 2);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif /* PACKETBUF_WITH_PACKET_TYPE */
|
||||||
|
|
||||||
if(!(status() & BV(CC2520_TX_ACTIVE))) {
|
if(!(status() & BV(CC2520_TX_ACTIVE))) {
|
||||||
/* SFD went high but we are not transmitting. This means that
|
/* SFD went high but we are not transmitting. This means that
|
||||||
|
|
Loading…
Reference in a new issue