From 32659107617061ac16850952b5c0390e95bfe5e1 Mon Sep 17 00:00:00 2001 From: Oliver Hahm <oleg@hobbykeller.org> Date: Sat, 23 Mar 2013 18:57:12 +0100 Subject: [PATCH] * renamed some struct members in cc110x driver to avoid naming conflicts with stm32f4discovery --- drivers/cc110x/cc1100.c | 8 ++++---- drivers/cc110x/cc1100.h | 4 ++-- drivers/cc110x/cc1100_phy.c | 2 +- drivers/cc110x_ng/cc110x-rx.c | 6 +++--- drivers/cc110x_ng/cc110x.c | 2 +- drivers/cc110x_ng/include/cc110x-config.h | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/cc110x/cc1100.c b/drivers/cc110x/cc1100.c index 987b3568b0..74dc86a431 100644 --- a/drivers/cc110x/cc1100.c +++ b/drivers/cc110x/cc1100.c @@ -211,13 +211,13 @@ static bool spi_receive_packet_variable(uint8_t *rxBuffer, uint8_t length) rflags.RSSI = status[I_RSSI]; // MSB of LQI is the CRC_OK bit - rflags.CRC = (status[I_LQI] & CRC_OK) >> 7; - if (!rflags.CRC) cc1100_statistic.packets_in_crc_fail++; + rflags.CRC_STATE = (status[I_LQI] & CRC_OK) >> 7; + if (!rflags.CRC_STATE) cc1100_statistic.packets_in_crc_fail++; // Bit 0-6 of LQI indicates the link quality (LQI) rflags.LQI = status[I_LQI] & LQI_EST; - return rflags.CRC; + return rflags.CRC_STATE; } else { @@ -761,7 +761,7 @@ void cc1100_init(void) rflags.RSSI = 0x00; rflags.LL_ACK = false; rflags.CAA = false; - rflags.CRC = false; + rflags.CRC_STATE = false; rflags.SEQ = false; rflags.MAN_WOR = false; rflags.KT_RES_ERR = false; diff --git a/drivers/cc110x/cc1100.h b/drivers/cc110x/cc1100.h index 6eefb5d1ec..86bc592195 100644 --- a/drivers/cc110x/cc1100.h +++ b/drivers/cc110x/cc1100.h @@ -125,13 +125,13 @@ typedef struct cc1100_flags uint32_t TOF; ///< Time of flight of the last packet and last ACK uint32_t TCP; ///< Time to compute packet unsigned RPS : 16; ///< Raw packets sent to transmit last packet - unsigned RTC : 8; ///< Retransmission count of last send packet + unsigned RETC : 8; ///< Retransmission count of last send packet unsigned RSSI : 8; ///< The RSSI value of last received packet unsigned RSSI_SEND : 8; ///< The RSSI value of the last send unicast packet of this node unsigned LQI : 8; ///< The LQI value of the last received packet unsigned LL_ACK : 1; ///< Is set if Link-Level ACK is received, otherwise 0 (reset on new burst) unsigned CAA : 1; ///< The status of the air (1 = air free, 0 = air not free) - unsigned CRC : 1; ///< The CRC status of last received packet (1 = OK, 0 = not OK) + unsigned CRC_STATE : 1; ///< The CRC status of last received packet (1 = OK, 0 = not OK) unsigned SEQ : 1; ///< Sequence number (toggles between 0 and 1) unsigned MAN_WOR : 1; ///< Manual WOR set (for randomized WOR times => no synch) unsigned KT_RES_ERR : 1; ///< A hwtimer resource error has occurred (no free timers available) diff --git a/drivers/cc110x/cc1100_phy.c b/drivers/cc110x/cc1100_phy.c index 01c49e5869..0b2299a1a8 100644 --- a/drivers/cc110x/cc1100_phy.c +++ b/drivers/cc110x/cc1100_phy.c @@ -500,7 +500,7 @@ static bool send_burst(cc1100_packet_layer0_t *packet, uint8_t retries, uint8_t } // Store number of transmission retries - rflags.RTC = rtc; + rflags.RETC = rtc; rflags.RPS = rtc * cc1100_burst_count + i; if (i > cc1100_burst_count) rflags.RPS--; rflags.TX = false; diff --git a/drivers/cc110x_ng/cc110x-rx.c b/drivers/cc110x_ng/cc110x-rx.c index bd4035b96a..95ce073873 100644 --- a/drivers/cc110x_ng/cc110x-rx.c +++ b/drivers/cc110x_ng/cc110x-rx.c @@ -135,15 +135,15 @@ static uint8_t receive_packet_variable(uint8_t *rxBuffer, uint8_t length) { rflags._RSSI = status[I_RSSI]; // MSB of LQI is the CRC_OK bit - rflags.CRC = (status[I_LQI] & CRC_OK) >> 7; - if (!rflags.CRC) { + rflags.CRC_STATE = (status[I_LQI] & CRC_OK) >> 7; + if (!rflags.CRC_STATE) { cc110x_statistic.packets_in_crc_fail++; } // Bit 0-6 of LQI indicates the link quality (LQI) rflags._LQI = status[I_LQI] & LQI_EST; - return rflags.CRC; + return rflags.CRC_STATE; } /* too many bytes in FIFO */ else { diff --git a/drivers/cc110x_ng/cc110x.c b/drivers/cc110x_ng/cc110x.c index 20962761b9..272bdb0b2b 100644 --- a/drivers/cc110x_ng/cc110x.c +++ b/drivers/cc110x_ng/cc110x.c @@ -61,7 +61,7 @@ void cc110x_init(int tpid) { rflags._RSSI = 0x00; rflags.LL_ACK = 0; rflags.CAA = 0; - rflags.CRC = 0; + rflags.CRC_STATE = 0; rflags.SEQ = 0; rflags.MAN_WOR = 0; rflags.KT_RES_ERR = 0; diff --git a/drivers/cc110x_ng/include/cc110x-config.h b/drivers/cc110x_ng/include/cc110x-config.h index 3531d71dfb..0344941b2d 100644 --- a/drivers/cc110x_ng/include/cc110x-config.h +++ b/drivers/cc110x_ng/include/cc110x-config.h @@ -62,13 +62,13 @@ typedef struct timex_t TOA; ///< Time of packet arriveal uint32_t TCP; ///< Time to compute packet unsigned RPS : 16; ///< Raw packets sent to transmit last packet - unsigned RTC : 8; ///< Retransmission count of last send packet + unsigned RETC : 8; ///< Retransmission count of last send packet unsigned _RSSI : 8; ///< The RSSI value of last received packet unsigned RSSI_SEND : 8; ///< The RSSI value of the last send unicast packet of this node unsigned _LQI : 8; ///< The LQI value of the last received packet unsigned LL_ACK : 1; ///< Is set if Link-Level ACK is received, otherwise 0 (reset on new burst) unsigned CAA : 1; ///< The status of the air (1 = air free, 0 = air not free) - unsigned CRC : 1; ///< The CRC status of last received packet (1 = OK, 0 = not OK) + unsigned CRC_STATE : 1; ///< The CRC status of last received packet (1 = OK, 0 = not OK) unsigned SEQ : 1; ///< Sequence number (toggles between 0 and 1) unsigned MAN_WOR : 1; ///< Manual WOR set (for randomized WOR times => no synch) unsigned KT_RES_ERR : 1; ///< A hwtimer resource error has occurred (no free timers available) -- GitLab