mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-07-12 17:57:53 +00:00
Rename functions to avoid (future) duplicates
This commit is contained in:
parent
c2a7420edf
commit
57a90c2f56
@ -63,7 +63,7 @@ static void __attribute__((unused)) Scanner_cc2500_init()
|
|||||||
delayMicroseconds(1000); // wait for RX to activate
|
delayMicroseconds(1000); // wait for RX to activate
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __attribute__((unused)) _calibrate()
|
static void __attribute__((unused)) Scanner_calibrate()
|
||||||
{
|
{
|
||||||
for (int c = 0; c < MAX_RADIOCHANNEL; c++) {
|
for (int c = 0; c < MAX_RADIOCHANNEL; c++) {
|
||||||
CC2500_Strobe(CC2500_SIDLE);
|
CC2500_Strobe(CC2500_SIDLE);
|
||||||
@ -75,7 +75,7 @@ static void __attribute__((unused)) _calibrate()
|
|||||||
CC2500_Strobe(CC2500_SIDLE);
|
CC2500_Strobe(CC2500_SIDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __attribute__((unused)) _scan_next()
|
static void __attribute__((unused)) Scanner_scan_next()
|
||||||
{
|
{
|
||||||
CC2500_WriteReg(CC2500_0A_CHANNR, Scanner.chan_min + rf_ch_num);
|
CC2500_WriteReg(CC2500_0A_CHANNR, Scanner.chan_min + rf_ch_num);
|
||||||
CC2500_WriteReg(CC2500_25_FSCAL1, calData[rf_ch_num]);
|
CC2500_WriteReg(CC2500_25_FSCAL1, calData[rf_ch_num]);
|
||||||
@ -83,7 +83,7 @@ static void __attribute__((unused)) _scan_next()
|
|||||||
CC2500_Strobe(CC2500_SRX);
|
CC2500_Strobe(CC2500_SRX);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __attribute__((unused)) _scan_rssi()
|
static int __attribute__((unused)) Scanner_scan_rssi()
|
||||||
{
|
{
|
||||||
uint8_t rssi;
|
uint8_t rssi;
|
||||||
rssi = CC2500_ReadReg(0x40 | CC2500_34_RSSI); // 0.5 db/count, RSSI value read from the RSSI status register is a 2’s complement number
|
rssi = CC2500_ReadReg(0x40 | CC2500_34_RSSI); // 0.5 db/count, RSSI value read from the RSSI status register is a 2’s complement number
|
||||||
@ -105,11 +105,11 @@ uint16 Scanner_callback()
|
|||||||
rf_ch_num++;
|
rf_ch_num++;
|
||||||
if (rf_ch_num >= (Scanner.chan_max - Scanner.chan_min + 1))
|
if (rf_ch_num >= (Scanner.chan_max - Scanner.chan_min + 1))
|
||||||
rf_ch_num = 0;
|
rf_ch_num = 0;
|
||||||
_scan_next();
|
Scanner_scan_next();
|
||||||
phase = SCAN_GET_RSSI;
|
phase = SCAN_GET_RSSI;
|
||||||
return CHANNEL_LOCK_TIME;
|
return CHANNEL_LOCK_TIME;
|
||||||
case SCAN_GET_RSSI:
|
case SCAN_GET_RSSI:
|
||||||
rssi_value = _scan_rssi();
|
rssi_value = Scanner_scan_rssi();
|
||||||
phase = SCAN_CHANNEL_CHANGE;
|
phase = SCAN_CHANNEL_CHANGE;
|
||||||
// send data to TX
|
// send data to TX
|
||||||
pkt[0] = rf_ch_num;
|
pkt[0] = rf_ch_num;
|
||||||
@ -128,7 +128,7 @@ uint16_t initScanner(void)
|
|||||||
CC2500_Reset();
|
CC2500_Reset();
|
||||||
Scanner_cc2500_init();
|
Scanner_cc2500_init();
|
||||||
CC2500_Strobe(CC2500_SRX);
|
CC2500_Strobe(CC2500_SRX);
|
||||||
_calibrate();
|
Scanner_calibrate();
|
||||||
CC2500_Strobe(CC2500_SIDLE);
|
CC2500_Strobe(CC2500_SIDLE);
|
||||||
CC2500_SetTxRxMode(RX_EN);
|
CC2500_SetTxRxMode(RX_EN);
|
||||||
CC2500_Strobe(CC2500_SRX); // Receive mode
|
CC2500_Strobe(CC2500_SRX); // Receive mode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user