kopia lustrzana https://github.com/mobilinkd/tnc3-firmware
Fix compilation warnings. Disable unsafe (and currently unused) functions.
rodzic
348a07426a
commit
229993b221
|
@ -1392,7 +1392,9 @@ void _Error_Handler(char *file, int line)
|
|||
{
|
||||
/* USER CODE BEGIN Error_Handler_Debug */
|
||||
/* User can add his own implementation to report the HAL error return state */
|
||||
#ifdef KISS_LOGGING
|
||||
printf("Error handler called from file %s on line %d\r\n", file, line);
|
||||
#endif
|
||||
while(1)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -133,7 +133,8 @@ void MX_USB_DEVICE_Init(void)
|
|||
*/
|
||||
void HAL_PCDEx_BCD_Callback(PCD_HandleTypeDef *hpcd, PCD_BCD_MsgTypeDef msg)
|
||||
{
|
||||
USBD_HandleTypeDef usbdHandle = hUsbDeviceFS;
|
||||
UNUSED(hpcd);
|
||||
// USBD_HandleTypeDef usbdHandle = hUsbDeviceFS;
|
||||
|
||||
static int downstream_port = 0;
|
||||
|
||||
|
|
|
@ -795,6 +795,7 @@ void USBD_LL_Delay(uint32_t Delay)
|
|||
*/
|
||||
void *USBD_static_malloc(uint32_t size)
|
||||
{
|
||||
UNUSED(size);
|
||||
static uint32_t mem[(sizeof(USBD_CDC_HandleTypeDef)/4)+1];/* On 32-bit boundary */
|
||||
return mem;
|
||||
}
|
||||
|
@ -806,7 +807,7 @@ void *USBD_static_malloc(uint32_t size)
|
|||
*/
|
||||
void USBD_static_free(void *p)
|
||||
{
|
||||
|
||||
UNUSED(p);
|
||||
}
|
||||
|
||||
/* USER CODE BEGIN 5 */
|
||||
|
|
|
@ -103,11 +103,11 @@ extern "C" void startAudioInputTask(void const*) {
|
|||
break;
|
||||
case STREAM_AVERAGE_TWIST_LEVEL:
|
||||
DEBUG("STREAM_AVERAGE_TWIST_LEVEL");
|
||||
streamAverageInputTwist();
|
||||
// streamAverageInputTwist();
|
||||
break;
|
||||
case STREAM_INSTANT_TWIST_LEVEL:
|
||||
DEBUG("STREAM_INSTANT_TWIST_LEVEL");
|
||||
streamInstantInputTwist();
|
||||
// streamInstantInputTwist();
|
||||
break;
|
||||
case AUTO_ADJUST_INPUT_LEVEL:
|
||||
DEBUG("AUTO_ADJUST_INPUT_LEVEL");
|
||||
|
@ -769,6 +769,7 @@ void pollInputTwist()
|
|||
DEBUG("exit pollInputTwist");
|
||||
}
|
||||
|
||||
#if 0
|
||||
void streamAverageInputTwist()
|
||||
{
|
||||
DEBUG("enter streamAverageInputTwist");
|
||||
|
@ -821,7 +822,8 @@ void streamAverageInputTwist()
|
|||
g2700 += 10.0 * log10(gf2700);
|
||||
|
||||
char* buffer = 0;
|
||||
int len = asiprintf(
|
||||
// @TODO: Make re-entrant printf work (or convert to fixed-point).
|
||||
int len = asiprintf_r(
|
||||
&buffer,
|
||||
"_%f, %f, %f, %f, %f\r\n",
|
||||
g700 / acount,
|
||||
|
@ -885,7 +887,8 @@ void streamInstantInputTwist()
|
|||
}
|
||||
|
||||
char* buffer = 0;
|
||||
int len = asiprintf(
|
||||
// @TODO: Make re-entrant printf work (or convert to fixed-point).
|
||||
int len = asiprintf_r(
|
||||
&buffer,
|
||||
"_%f, %f, %f, %f, %f\r\n",
|
||||
10.0 * log10(gf700),
|
||||
|
@ -910,6 +913,7 @@ void streamInstantInputTwist()
|
|||
stopADC();
|
||||
DEBUG("exit streamInstantInputTwist");
|
||||
}
|
||||
#endif
|
||||
|
||||
void streamAmplifiedInputLevels() {
|
||||
DEBUG("enter streamAmplifiedInputLevels");
|
||||
|
@ -1019,6 +1023,7 @@ void pollBatteryLevel() {
|
|||
DEBUG("exit pollBatteryLevel");
|
||||
}
|
||||
|
||||
#if 0
|
||||
void stop() {
|
||||
osDelay(100);
|
||||
#if 0
|
||||
|
@ -1048,5 +1053,6 @@ void stop() {
|
|||
DEBUG("Wake");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
}}} // mobilinkd::tnc::audio
|
||||
|
|
|
@ -250,7 +250,9 @@ struct Hardware
|
|||
|
||||
bool crc_ok() const {
|
||||
auto result = (crc() == checksum);
|
||||
if (!result) WARN("CRC mismatch %04x != %04x", checksum, crc());
|
||||
if (!result) {
|
||||
WARN("CRC mismatch %04x != %04x", checksum, crc());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue