Removed unused function from radio interface API
This commit is contained in:
parent
2d0bf51873
commit
a84d8fe6f0
|
|
@ -55,19 +55,6 @@ void radio_init(const rtxStatus_t *rtxState);
|
||||||
*/
|
*/
|
||||||
void radio_terminate();
|
void radio_terminate();
|
||||||
|
|
||||||
/**
|
|
||||||
* This function allows to fine tune the VCXO frequency by acting on the
|
|
||||||
* polarisation voltage.
|
|
||||||
* The offset parameters allowed range of ±32768 and they are algebraically
|
|
||||||
* added to the tuning value provided by the manufacturer's calibration data.
|
|
||||||
* Not calling this function results in leaving the VCXO tuning as provided by
|
|
||||||
* the manufacturer's calibration data.
|
|
||||||
*
|
|
||||||
* @param vhfOffset: VCXO tuning offset for VHF band.
|
|
||||||
* @param uhfOffset: VCXO tuning offset for UHF band.
|
|
||||||
*/
|
|
||||||
void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set current operating mode.
|
* Set current operating mode.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -104,14 +104,6 @@ void radio_terminate()
|
||||||
SIM->SCGC6 &= ~SIM_SCGC6_DAC0_MASK;
|
SIM->SCGC6 &= ~SIM_SCGC6_DAC0_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset)
|
|
||||||
{
|
|
||||||
//TODO: this part will be implemented in the future, when proved to be
|
|
||||||
// necessary.
|
|
||||||
(void) vhfOffset;
|
|
||||||
(void) uhfOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
void radio_setOpmode(const enum opmode mode)
|
void radio_setOpmode(const enum opmode mode)
|
||||||
{
|
{
|
||||||
switch(mode)
|
switch(mode)
|
||||||
|
|
|
||||||
|
|
@ -162,29 +162,6 @@ void radio_terminate()
|
||||||
RCC->APB1ENR &= ~RCC_APB1ENR_DACEN;
|
RCC->APB1ENR &= ~RCC_APB1ENR_DACEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset)
|
|
||||||
{
|
|
||||||
(void) vhfOffset;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Adjust VCXO bias voltage acting on the value stored in MCU's DAC.
|
|
||||||
* Data from calibration is first converted to int16_t, then the value for
|
|
||||||
* the DAC register is computed according to which is done inside TYT's
|
|
||||||
* firmware.
|
|
||||||
* The signed offset is then added to this value, the result is constrained
|
|
||||||
* in the range [0 4095], converted to uint16_t and written into the DAC
|
|
||||||
* register.
|
|
||||||
*
|
|
||||||
* NOTE: we deliberately chose not to update the HR_C5000 modulation offset
|
|
||||||
* register, as we still have to deeply understand how TYT computes
|
|
||||||
* the values written there.
|
|
||||||
*/
|
|
||||||
int16_t calValue = static_cast< int16_t >(calData.freqAdjustMid);
|
|
||||||
int16_t oscTune = (calValue*4 + 0x600) + uhfOffset;
|
|
||||||
oscTune = std::max(std::min(oscTune, int16_t(4095)), int16_t(0));
|
|
||||||
DAC->DHR12R2 = static_cast< uint16_t >(oscTune);
|
|
||||||
}
|
|
||||||
|
|
||||||
void radio_setOpmode(const enum opmode mode)
|
void radio_setOpmode(const enum opmode mode)
|
||||||
{
|
{
|
||||||
switch(mode)
|
switch(mode)
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,6 @@ void radio_terminate()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset)
|
|
||||||
{
|
|
||||||
(void) vhfOffset;
|
|
||||||
(void) uhfOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
void radio_setOpmode(const enum opmode mode)
|
void radio_setOpmode(const enum opmode mode)
|
||||||
{
|
{
|
||||||
(void) mode;
|
(void) mode;
|
||||||
|
|
|
||||||
|
|
@ -44,12 +44,6 @@ void radio_terminate()
|
||||||
radioStatus = OFF;
|
radioStatus = OFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset)
|
|
||||||
{
|
|
||||||
(void) vhfOffset;
|
|
||||||
(void) uhfOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
void radio_setOpmode(const enum opmode mode)
|
void radio_setOpmode(const enum opmode mode)
|
||||||
{
|
{
|
||||||
(void) mode;
|
(void) mode;
|
||||||
|
|
|
||||||
|
|
@ -102,14 +102,6 @@ void radio_terminate()
|
||||||
RCC->APB1ENR &= ~RCC_APB1ENR_DACEN;
|
RCC->APB1ENR &= ~RCC_APB1ENR_DACEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset)
|
|
||||||
{
|
|
||||||
//TODO: this part will be implemented in the future, when proved to be
|
|
||||||
// necessary.
|
|
||||||
(void) vhfOffset;
|
|
||||||
(void) uhfOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
void radio_setOpmode(const enum opmode mode)
|
void radio_setOpmode(const enum opmode mode)
|
||||||
{
|
{
|
||||||
switch(mode)
|
switch(mode)
|
||||||
|
|
|
||||||
|
|
@ -34,13 +34,6 @@ void radio_terminate()
|
||||||
puts("radio_linux: terminate() called");
|
puts("radio_linux: terminate() called");
|
||||||
}
|
}
|
||||||
|
|
||||||
void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset)
|
|
||||||
{
|
|
||||||
(void) vhfOffset;
|
|
||||||
(void) uhfOffset;
|
|
||||||
puts("radio_linux: tuneVcxo() called");
|
|
||||||
}
|
|
||||||
|
|
||||||
void radio_setOpmode(const enum opmode mode)
|
void radio_setOpmode(const enum opmode mode)
|
||||||
{
|
{
|
||||||
std::string mStr(" ");
|
std::string mStr(" ");
|
||||||
|
|
|
||||||
|
|
@ -65,14 +65,6 @@ void radio_terminate()
|
||||||
at1846s.terminate();
|
at1846s.terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset)
|
|
||||||
{
|
|
||||||
//TODO: this part will be implemented in the future, when proved to be
|
|
||||||
// necessary.
|
|
||||||
(void) vhfOffset;
|
|
||||||
(void) uhfOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
void radio_setOpmode(const enum opmode mode)
|
void radio_setOpmode(const enum opmode mode)
|
||||||
{
|
{
|
||||||
switch(mode)
|
switch(mode)
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,6 @@ void radio_terminate()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void radio_tuneVcxo(const int16_t vhfOffset, const int16_t uhfOffset)
|
|
||||||
{
|
|
||||||
(void) vhfOffset;
|
|
||||||
(void) uhfOffset;
|
|
||||||
}
|
|
||||||
|
|
||||||
void radio_setOpmode(const enum opmode mode)
|
void radio_setOpmode(const enum opmode mode)
|
||||||
{
|
{
|
||||||
(void) mode;
|
(void) mode;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue