Paparazzi UAS  v5.15_devel-215-g0bc9009
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
crazyflie.h File Reference
+ Include dependency graph for crazyflie.h:

Go to the source code of this file.

Macros

#define BOARD_CRAZYFLIE
 
#define AHB_CLK   STM32_HCLK
 ChibiOS board file. More...
 
#define USE_LED_1   1
 
#define LED_1_GPIO   LED_RED_R_PORT
 
#define LED_1_GPIO_PIN   LED_RED_R
 
#define LED_1_GPIO_ON   gpio_clear
 
#define LED_1_GPIO_OFF   gpio_set
 
#define USE_LED_2   1
 
#define LED_2_GPIO   LED_RED_L_PORT
 
#define LED_2_GPIO_PIN   LED_RED_L
 
#define LED_2_GPIO_ON   gpio_clear
 
#define LED_2_GPIO_OFF   gpio_set
 
#define USE_LED_3   1
 
#define LED_3_GPIO   LED_GREEN_R_PORT
 
#define LED_3_GPIO_PIN   LED_GREEN_R
 
#define LED_3_GPIO_ON   gpio_clear
 
#define LED_3_GPIO_OFF   gpio_set
 
#define USE_LED_4   1
 
#define LED_4_GPIO   LED_GREEN_L_PORT
 
#define LED_4_GPIO_PIN   LED_GREEN_L
 
#define LED_4_GPIO_ON   gpio_clear
 
#define LED_4_GPIO_OFF   gpio_set
 
#define USE_LED_5   1
 
#define LED_5_GPIO   LED_BLUE_L_PORT
 
#define LED_5_GPIO_PIN   LED_BLUE_L
 
#define LED_5_GPIO_ON   gpio_set
 
#define LED_5_GPIO_OFF   gpio_clear
 
#define USE_PWM1   1
 
#define PWM_SERVO_1   1
 
#define PWM_SERVO_1_GPIO   MOTOR1_PORT
 
#define PWM_SERVO_1_PIN   MOTOR1
 
#define PWM_SERVO_1_AF   AF_MOTOR1
 
#define PWM_SERVO_1_DRIVER   PWMD2
 
#define PWM_SERVO_1_CHANNEL   1
 
#define PWM_SERVO_1_ACTIVE   PWM_OUTPUT_ACTIVE_HIGH
 
#define USE_PWM2   1
 
#define PWM_SERVO_2   2
 
#define PWM_SERVO_2_GPIO   MOTOR2_PORT
 
#define PWM_SERVO_2_PIN   MOTOR2
 
#define PWM_SERVO_2_AF   AF_MOTOR2
 
#define PWM_SERVO_2_DRIVER   PWMD2
 
#define PWM_SERVO_2_CHANNEL   3
 
#define PWM_SERVO_2_ACTIVE   PWM_OUTPUT_ACTIVE_HIGH
 
#define USE_PWM3   1
 
#define PWM_SERVO_3   3
 
#define PWM_SERVO_3_GPIO   MOTOR3_PORT
 
#define PWM_SERVO_3_PIN   MOTOR3
 
#define PWM_SERVO_3_AF   AF_MOTOR3
 
#define PWM_SERVO_3_DRIVER   PWMD2
 
#define PWM_SERVO_3_CHANNEL   0
 
#define PWM_SERVO_3_ACTIVE   PWM_OUTPUT_ACTIVE_HIGH
 
#define USE_PWM4   1
 
#define PWM_SERVO_4   4
 
#define PWM_SERVO_4_GPIO   MOTOR4_PORT
 
#define PWM_SERVO_4_PIN   MOTOR4
 
#define PWM_SERVO_4_AF   AF_MOTOR4
 
#define PWM_SERVO_4_DRIVER   PWMD4
 
#define PWM_SERVO_4_CHANNEL   3
 
#define PWM_SERVO_4_ACTIVE   PWM_OUTPUT_ACTIVE_HIGH
 
#define ACTUATORS_PWM_NB   5
 
#define PWM_CMD_TO_US(_t)   (_t)
 
#define PWM_CONF_TIM2   1
 
#define PWM_CONF2_DEF
 
#define PWM_CONF_TIM4   1
 
#define PWM_CONF4_DEF
 
#define UART2_GPIO_PORT_TX   E_TX2_PORT
 UART2 E_TX2. More...
 
#define UART2_GPIO_TX   E_TX2
 
#define UART2_GPIO_PORT_RX   E_RX2_PORT
 
#define UART2_GPIO_RX   E_RX2
 
#define UART2_GPIO_AF   AF_E_RX2
 
#define UART2_HW_FLOW_CONTROL   FALSE
 
#define UART3_GPIO_PORT_TX   E_TX1_PORT
 UART3 E_TX1. More...
 
#define UART3_GPIO_TX   E_TX1
 
#define UART3_GPIO_PORT_RX   E_RX1_PORT
 
#define UART3_GPIO_RX   E_RX1
 
#define UART3_GPIO_AF   AF_E_RX1
 
#define UART6_GPIO_PORT_TX   NRF_TX_PORT
 UART6 NRF. More...
 
#define UART6_GPIO_TX   NRF_TX
 
#define UART6_GPIO_PORT_RX   NRF_RX_PORT
 
#define UART6_GPIO_RX   NRF_RX
 
#define UART6_GPIO_AF   AF_NRF_RX
 
#define UART6_GPIO_PORT_CTS   NRF_FLOW_CTRL_PORT
 
#define UART6_GPIO_CTS   NRF_FLOW_CTRL
 
#define STM32_CR1_DNF(n)   ((n & 0x0f) << 8)
 I2C defines. More...
 
#define I2C_FAST_400KHZ_DNF0_100NS_PCLK54MHZ_TIMINGR
 
#define I2C_STD_100KHZ_DNF0_100NS_PCLK54MHZ_TIMINGR
 
#define I2C3_CLOCK_SPEED   400000
 
#define I2C3_DUTY_CYCLE   FAST_DUTY_CYCLE_2
 
#define I2C3_CFG_DEF
 
#define I2C1_CLOCK_SPEED   400000
 
#define I2C1_DUTY_CYCLE   FAST_DUTY_CYCLE_2
 
#define I2C1_CFG_DEF
 
#define SPI1_GPIO_AF   AF_E_SCK
 SPI Config. More...
 
#define SPI1_GPIO_PORT_MISO   E_MISO_PORT
 
#define SPI1_GPIO_MISO   E_MISO
 
#define SPI1_GPIO_PORT_MOSI   E_MOSI_PORT
 
#define SPI1_GPIO_MOSI   E_MOSI
 
#define SPI1_GPIO_PORT_SCK   E_SCK_PORT
 
#define SPI1_GPIO_SCK   E_SCK
 
#define SPI_SELECT_SLAVE0_PORT   E_CS0_PORT
 
#define SPI_SELECT_SLAVE0_PIN   E_CS0
 
#define SPI_SELECT_SLAVE1_PORT   E_CS1_PORT
 
#define SPI_SELECT_SLAVE1_PIN   E_CS1
 
#define SPI_SELECT_SLAVE2_PORT   E_CS2_PORT
 
#define SPI_SELECT_SLAVE2_PIN   E_CS2
 
#define SPI_SELECT_SLAVE3_PORT   E_CS3_PORT
 
#define SPI_SELECT_SLAVE3_PIN   E_CS3
 
#define USE_BARO_BOARD   0
 Baro. More...
 
#define DEFAULT_ACTUATORS   "subsystems/actuators/actuators_pwm.h"
 
#define ActuatorDefaultSet(_x, _y)   ActuatorPwmSet(_x,_y)
 
#define ActuatorsDefaultInit()   ActuatorsPwmInit()
 
#define ActuatorsDefaultCommit()   ActuatorsPwmCommit()
 

Macro Definition Documentation

#define ActuatorDefaultSet (   _x,
  _y 
)    ActuatorPwmSet(_x,_y)

Definition at line 352 of file crazyflie.h.

#define ACTUATORS_PWM_NB   5

Definition at line 137 of file crazyflie.h.

#define ActuatorsDefaultCommit ( )    ActuatorsPwmCommit()

Definition at line 354 of file crazyflie.h.

#define ActuatorsDefaultInit ( )    ActuatorsPwmInit()

Definition at line 353 of file crazyflie.h.

#define AHB_CLK   STM32_HCLK

ChibiOS board file.

PPRZ definitions

Definition at line 18 of file crazyflie.h.

#define BOARD_CRAZYFLIE

Definition at line 4 of file crazyflie.h.

#define DEFAULT_ACTUATORS   "subsystems/actuators/actuators_pwm.h"

Definition at line 351 of file crazyflie.h.

#define I2C1_CFG_DEF
Value:
{ \
OPMODE_I2C, \
}
#define I2C1_CLOCK_SPEED
Definition: crazyflie.h:256
#define I2C1_DUTY_CYCLE
Definition: crazyflie.h:259

Definition at line 265 of file crazyflie.h.

#define I2C1_CLOCK_SPEED   400000

Definition at line 256 of file crazyflie.h.

#define I2C1_DUTY_CYCLE   FAST_DUTY_CYCLE_2

Definition at line 259 of file crazyflie.h.

#define I2C3_CFG_DEF
Value:
{ \
OPMODE_I2C, \
}
#define I2C3_CLOCK_SPEED
Definition: crazyflie.h:238
#define I2C3_DUTY_CYCLE
Definition: crazyflie.h:241

Definition at line 247 of file crazyflie.h.

#define I2C3_CLOCK_SPEED   400000

Definition at line 238 of file crazyflie.h.

#define I2C3_DUTY_CYCLE   FAST_DUTY_CYCLE_2

Definition at line 241 of file crazyflie.h.

#define I2C_FAST_400KHZ_DNF0_100NS_PCLK54MHZ_TIMINGR
Value:
(STM32_TIMINGR_PRESC(0U) | \
STM32_TIMINGR_SCLDEL(10U) | STM32_TIMINGR_SDADEL(0U) | \
STM32_TIMINGR_SCLH(34U) | STM32_TIMINGR_SCLL(86U))

Definition at line 227 of file crazyflie.h.

#define I2C_STD_100KHZ_DNF0_100NS_PCLK54MHZ_TIMINGR
Value:
(STM32_TIMINGR_PRESC(1U) | \
STM32_TIMINGR_SCLDEL(9U) | STM32_TIMINGR_SDADEL(0U) | \
STM32_TIMINGR_SCLH(105U) | STM32_TIMINGR_SCLL(153U))

Definition at line 230 of file crazyflie.h.

#define LED_1_GPIO   LED_RED_R_PORT

Definition at line 26 of file crazyflie.h.

#define LED_1_GPIO_OFF   gpio_set

Definition at line 29 of file crazyflie.h.

#define LED_1_GPIO_ON   gpio_clear

Definition at line 28 of file crazyflie.h.

#define LED_1_GPIO_PIN   LED_RED_R

Definition at line 27 of file crazyflie.h.

#define LED_2_GPIO   LED_RED_L_PORT

Definition at line 34 of file crazyflie.h.

#define LED_2_GPIO_OFF   gpio_set

Definition at line 37 of file crazyflie.h.

#define LED_2_GPIO_ON   gpio_clear

Definition at line 36 of file crazyflie.h.

#define LED_2_GPIO_PIN   LED_RED_L

Definition at line 35 of file crazyflie.h.

#define LED_3_GPIO   LED_GREEN_R_PORT

Definition at line 42 of file crazyflie.h.

#define LED_3_GPIO_OFF   gpio_set

Definition at line 45 of file crazyflie.h.

#define LED_3_GPIO_ON   gpio_clear

Definition at line 44 of file crazyflie.h.

#define LED_3_GPIO_PIN   LED_GREEN_R

Definition at line 43 of file crazyflie.h.

#define LED_4_GPIO   LED_GREEN_L_PORT

Definition at line 50 of file crazyflie.h.

#define LED_4_GPIO_OFF   gpio_set

Definition at line 53 of file crazyflie.h.

#define LED_4_GPIO_ON   gpio_clear

Definition at line 52 of file crazyflie.h.

#define LED_4_GPIO_PIN   LED_GREEN_L

Definition at line 51 of file crazyflie.h.

#define LED_5_GPIO   LED_BLUE_L_PORT

Definition at line 58 of file crazyflie.h.

#define LED_5_GPIO_OFF   gpio_clear

Definition at line 61 of file crazyflie.h.

#define LED_5_GPIO_ON   gpio_set

Definition at line 60 of file crazyflie.h.

#define LED_5_GPIO_PIN   LED_BLUE_L

Definition at line 59 of file crazyflie.h.

#define PWM_CMD_TO_US (   _t)    (_t)

Definition at line 148 of file crazyflie.h.

#define PWM_CONF2_DEF
Value:
{ \
84000000, \
256, \
NULL, \
{ \
{ PWM_SERVO_3_ACTIVE, NULL }, \
{ PWM_SERVO_1_ACTIVE, NULL }, \
{ PWM_OUTPUT_DISABLED, NULL }, \
{ PWM_SERVO_2_ACTIVE, NULL }, \
}, \
0, \
0 \
}
#define PWM_SERVO_3_ACTIVE
Definition: crazyflie.h:115
#define PWM_SERVO_1_ACTIVE
Definition: crazyflie.h:85
#define PWM_SERVO_2_ACTIVE
Definition: crazyflie.h:100

Definition at line 155 of file crazyflie.h.

#define PWM_CONF4_DEF
Value:
{ \
84000000, \
256, \
NULL, \
{ \
{ PWM_OUTPUT_DISABLED, NULL }, \
{ PWM_OUTPUT_DISABLED, NULL }, \
{ PWM_OUTPUT_DISABLED, NULL }, \
{ PWM_SERVO_4_ACTIVE, NULL }, \
}, \
0, \
0 \
}
#define PWM_SERVO_4_ACTIVE
Definition: crazyflie.h:130

Definition at line 174 of file crazyflie.h.

#define PWM_CONF_TIM2   1

Definition at line 153 of file crazyflie.h.

#define PWM_CONF_TIM4   1

Definition at line 172 of file crazyflie.h.

#define PWM_SERVO_1   1

Definition at line 79 of file crazyflie.h.

#define PWM_SERVO_1_ACTIVE   PWM_OUTPUT_ACTIVE_HIGH

Definition at line 85 of file crazyflie.h.

#define PWM_SERVO_1_AF   AF_MOTOR1

Definition at line 82 of file crazyflie.h.

#define PWM_SERVO_1_CHANNEL   1

Definition at line 84 of file crazyflie.h.

#define PWM_SERVO_1_DRIVER   PWMD2

Definition at line 83 of file crazyflie.h.

#define PWM_SERVO_1_GPIO   MOTOR1_PORT

Definition at line 80 of file crazyflie.h.

#define PWM_SERVO_1_PIN   MOTOR1

Definition at line 81 of file crazyflie.h.

#define PWM_SERVO_2   2

Definition at line 94 of file crazyflie.h.

#define PWM_SERVO_2_ACTIVE   PWM_OUTPUT_ACTIVE_HIGH

Definition at line 100 of file crazyflie.h.

#define PWM_SERVO_2_AF   AF_MOTOR2

Definition at line 97 of file crazyflie.h.

#define PWM_SERVO_2_CHANNEL   3

Definition at line 99 of file crazyflie.h.

#define PWM_SERVO_2_DRIVER   PWMD2

Definition at line 98 of file crazyflie.h.

#define PWM_SERVO_2_GPIO   MOTOR2_PORT

Definition at line 95 of file crazyflie.h.

#define PWM_SERVO_2_PIN   MOTOR2

Definition at line 96 of file crazyflie.h.

#define PWM_SERVO_3   3

Definition at line 109 of file crazyflie.h.

#define PWM_SERVO_3_ACTIVE   PWM_OUTPUT_ACTIVE_HIGH

Definition at line 115 of file crazyflie.h.

#define PWM_SERVO_3_AF   AF_MOTOR3

Definition at line 112 of file crazyflie.h.

#define PWM_SERVO_3_CHANNEL   0

Definition at line 114 of file crazyflie.h.

#define PWM_SERVO_3_DRIVER   PWMD2

Definition at line 113 of file crazyflie.h.

#define PWM_SERVO_3_GPIO   MOTOR3_PORT

Definition at line 110 of file crazyflie.h.

#define PWM_SERVO_3_PIN   MOTOR3

Definition at line 111 of file crazyflie.h.

#define PWM_SERVO_4   4

Definition at line 124 of file crazyflie.h.

#define PWM_SERVO_4_ACTIVE   PWM_OUTPUT_ACTIVE_HIGH

Definition at line 130 of file crazyflie.h.

#define PWM_SERVO_4_AF   AF_MOTOR4

Definition at line 127 of file crazyflie.h.

#define PWM_SERVO_4_CHANNEL   3

Definition at line 129 of file crazyflie.h.

#define PWM_SERVO_4_DRIVER   PWMD4

Definition at line 128 of file crazyflie.h.

#define PWM_SERVO_4_GPIO   MOTOR4_PORT

Definition at line 125 of file crazyflie.h.

#define PWM_SERVO_4_PIN   MOTOR4

Definition at line 126 of file crazyflie.h.

#define SPI1_GPIO_AF   AF_E_SCK

SPI Config.

Definition at line 320 of file crazyflie.h.

#define SPI1_GPIO_MISO   E_MISO

Definition at line 322 of file crazyflie.h.

#define SPI1_GPIO_MOSI   E_MOSI

Definition at line 324 of file crazyflie.h.

#define SPI1_GPIO_PORT_MISO   E_MISO_PORT

Definition at line 321 of file crazyflie.h.

#define SPI1_GPIO_PORT_MOSI   E_MOSI_PORT

Definition at line 323 of file crazyflie.h.

#define SPI1_GPIO_PORT_SCK   E_SCK_PORT

Definition at line 325 of file crazyflie.h.

#define SPI1_GPIO_SCK   E_SCK

Definition at line 326 of file crazyflie.h.

#define SPI_SELECT_SLAVE0_PIN   E_CS0

Definition at line 329 of file crazyflie.h.

#define SPI_SELECT_SLAVE0_PORT   E_CS0_PORT

Definition at line 328 of file crazyflie.h.

#define SPI_SELECT_SLAVE1_PIN   E_CS1

Definition at line 331 of file crazyflie.h.

#define SPI_SELECT_SLAVE1_PORT   E_CS1_PORT

Definition at line 330 of file crazyflie.h.

#define SPI_SELECT_SLAVE2_PIN   E_CS2

Definition at line 333 of file crazyflie.h.

#define SPI_SELECT_SLAVE2_PORT   E_CS2_PORT

Definition at line 332 of file crazyflie.h.

#define SPI_SELECT_SLAVE3_PIN   E_CS3

Definition at line 335 of file crazyflie.h.

#define SPI_SELECT_SLAVE3_PORT   E_CS3_PORT

Definition at line 334 of file crazyflie.h.

#define STM32_CR1_DNF (   n)    ((n & 0x0f) << 8)

I2C defines.

Definition at line 225 of file crazyflie.h.

#define UART2_GPIO_AF   AF_E_RX2

Definition at line 195 of file crazyflie.h.

#define UART2_GPIO_PORT_RX   E_RX2_PORT

Definition at line 193 of file crazyflie.h.

#define UART2_GPIO_PORT_TX   E_TX2_PORT

UART2 E_TX2.

Definition at line 191 of file crazyflie.h.

#define UART2_GPIO_RX   E_RX2

Definition at line 194 of file crazyflie.h.

#define UART2_GPIO_TX   E_TX2

Definition at line 192 of file crazyflie.h.

#define UART2_HW_FLOW_CONTROL   FALSE

Definition at line 197 of file crazyflie.h.

#define UART3_GPIO_AF   AF_E_RX1

Definition at line 207 of file crazyflie.h.

#define UART3_GPIO_PORT_RX   E_RX1_PORT

Definition at line 205 of file crazyflie.h.

#define UART3_GPIO_PORT_TX   E_TX1_PORT

UART3 E_TX1.

Definition at line 203 of file crazyflie.h.

#define UART3_GPIO_RX   E_RX1

Definition at line 206 of file crazyflie.h.

#define UART3_GPIO_TX   E_TX1

Definition at line 204 of file crazyflie.h.

#define UART6_GPIO_AF   AF_NRF_RX

Definition at line 216 of file crazyflie.h.

#define UART6_GPIO_CTS   NRF_FLOW_CTRL

Definition at line 218 of file crazyflie.h.

#define UART6_GPIO_PORT_CTS   NRF_FLOW_CTRL_PORT

Definition at line 217 of file crazyflie.h.

#define UART6_GPIO_PORT_RX   NRF_RX_PORT

Definition at line 214 of file crazyflie.h.

#define UART6_GPIO_PORT_TX   NRF_TX_PORT

UART6 NRF.

Definition at line 212 of file crazyflie.h.

#define UART6_GPIO_RX   NRF_RX

Definition at line 215 of file crazyflie.h.

#define UART6_GPIO_TX   NRF_TX

Definition at line 213 of file crazyflie.h.

#define USE_BARO_BOARD   0

Baro.

Apparently needed for backwards compatibility with the ancient onboard baro boards

Definition at line 344 of file crazyflie.h.

#define USE_LED_1   1

Definition at line 24 of file crazyflie.h.

#define USE_LED_2   1

Definition at line 32 of file crazyflie.h.

#define USE_LED_3   1

Definition at line 40 of file crazyflie.h.

#define USE_LED_4   1

Definition at line 48 of file crazyflie.h.

#define USE_LED_5   1

Definition at line 56 of file crazyflie.h.

#define USE_PWM1   1

Definition at line 76 of file crazyflie.h.

#define USE_PWM2   1

Definition at line 91 of file crazyflie.h.

#define USE_PWM3   1

Definition at line 106 of file crazyflie.h.

#define USE_PWM4   1

Definition at line 121 of file crazyflie.h.