1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 04:52:59 +01:00

* renamed some struct members in cc110x driver to avoid naming conflicts with stm32f4discovery

This commit is contained in:
Oliver Hahm 2013-03-23 18:57:12 +01:00
parent e6177e811a
commit 3265910761
6 changed files with 13 additions and 13 deletions

View File

@ -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;

View File

@ -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)

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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)