mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Refactor to remove duplicate define of UNUSED macro.
This commit is contained in:
parent
f698f99198
commit
4afab418fe
17 changed files with 29 additions and 6 deletions
|
@ -17,7 +17,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define UNUSED(x) (void)(x)
|
||||
#define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)]))
|
||||
|
||||
#ifdef UNIT_TEST
|
||||
|
|
|
@ -38,6 +38,8 @@
|
|||
|
||||
#include "build/build_config.h"
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "drivers/serial.h"
|
||||
#include "io/serial.h"
|
||||
|
||||
|
|
|
@ -43,8 +43,6 @@ http://resnet.uoregon.edu/~gurney_j/jmpc/bitwise.html
|
|||
#define BITCOUNT(x) (((BX_(x)+(BX_(x)>>4)) & 0x0F0F0F0F) % 255)
|
||||
#define BX_(x) ((x) - (((x)>>1)&0x77777777) - (((x)>>2)&0x33333333) - (((x)>>3)&0x11111111))
|
||||
|
||||
#define UNUSED(x) (void)(x)
|
||||
|
||||
/*
|
||||
* https://groups.google.com/forum/?hl=en#!msg/comp.lang.c/attFnqwhvGk/sGBKXvIkY3AJ
|
||||
* Return (v ? floor(log2(v)) : 0) when 0 <= v < 1<<[8, 16, 32, 64].
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
|
||||
#include "common/maths.h"
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "nvic.h"
|
||||
|
||||
#include "system.h"
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "common/axis.h"
|
||||
#include "common/maths.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "system.h"
|
||||
#include "bus_i2c.h"
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "common/axis.h"
|
||||
#include "common/maths.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "system.h"
|
||||
#include "gpio.h"
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#include "build/build_config.h"
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "drivers/gpio.h"
|
||||
#include "drivers/sound_beeper.h"
|
||||
#include "drivers/system.h"
|
||||
|
@ -392,7 +394,7 @@ int beeperTableEntryCount(void)
|
|||
/*
|
||||
* Returns true if the beeper is on, false otherwise
|
||||
*/
|
||||
bool isBeeperOn(void)
|
||||
bool isBeeperOn(void)
|
||||
{
|
||||
return beeperIsOn;
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
|
||||
#include "build/build_config.h"
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "drivers/system.h"
|
||||
|
||||
#include "drivers/serial.h"
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
|
||||
#include "build/build_config.h"
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "drivers/system.h"
|
||||
#include "drivers/serial.h"
|
||||
#include "drivers/serial_uart.h"
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
|
||||
#include "build/build_config.h"
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "drivers/rx_nrf24l01.h"
|
||||
#include "drivers/rx_xn297.h"
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
#include "build/build_config.h"
|
||||
#include "build/debug.h"
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "drivers/rx_nrf24l01.h"
|
||||
#include "drivers/system.h"
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
#include <platform.h>
|
||||
#include "build/build_config.h"
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
|
||||
#ifdef USE_RX_V202
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
#include "build/build_config.h"
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "drivers/system.h"
|
||||
|
||||
#include "drivers/gpio.h"
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
#include "build/build_config.h"
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "drivers/system.h"
|
||||
#include "drivers/serial.h"
|
||||
#include "drivers/serial_uart.h"
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
|
||||
#include "build/build_config.h"
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "drivers/system.h"
|
||||
|
||||
#include "drivers/serial.h"
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "scheduler/scheduler.h"
|
||||
|
||||
#include "common/maths.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
#include "drivers/system.h"
|
||||
|
||||
|
|
|
@ -41,6 +41,8 @@
|
|||
|
||||
#include "build/build_config.h"
|
||||
|
||||
#include "common/utils.h"
|
||||
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
|
@ -68,7 +70,7 @@ void Set_System(void)
|
|||
{
|
||||
#if !defined(STM32L1XX_MD) && !defined(STM32L1XX_HD) && !defined(STM32L1XX_MD_PLUS)
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
#endif /* STM32L1XX_MD && STM32L1XX_XD */
|
||||
#endif /* STM32L1XX_MD && STM32L1XX_XD */
|
||||
|
||||
#if defined(USB_USE_EXTERNAL_PULLUP)
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
|
@ -277,7 +279,7 @@ static void IntToUnicode(uint32_t value, uint8_t *pbuf, uint8_t len)
|
|||
|
||||
/*******************************************************************************
|
||||
* Function Name : Send DATA .
|
||||
* Description : send the data received from the STM32 to the PC through USB
|
||||
* Description : send the data received from the STM32 to the PC through USB
|
||||
* Input : None.
|
||||
* Output : None.
|
||||
* Return : None.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue