Paparazzi UAS  v6.2_unstable
Paparazzi is a free software Unmanned Aircraft System.
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_CONF   pwmcfg2
 
#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_CONF   pwmcfg2
 
#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_CONF   pwmcfg2
 
#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_CONF   pwmcfg4
 
#define ACTUATORS_PWM_NB   5
 
#define PWM_CMD_TO_US(_t)   (_t)
 
#define PWM_FREQUENCY   84000000
 
#define SERVO_HZ   (PWM_FREQUENCY / 256)
 
#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   "modules/actuators/actuators_pwm.h"
 
#define ActuatorDefaultSet(_x, _y)   ActuatorPwmSet(_x,_y)
 
#define ActuatorsDefaultInit()   ActuatorsPwmInit()
 
#define ActuatorsDefaultCommit()   ActuatorsPwmCommit()
 

Macro Definition Documentation

◆ ActuatorDefaultSet

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

Definition at line 307 of file crazyflie.h.

◆ ACTUATORS_PWM_NB

#define ACTUATORS_PWM_NB   5

Definition at line 129 of file crazyflie.h.

◆ ActuatorsDefaultCommit

#define ActuatorsDefaultCommit ( )    ActuatorsPwmCommit()

Definition at line 309 of file crazyflie.h.

◆ ActuatorsDefaultInit

#define ActuatorsDefaultInit ( )    ActuatorsPwmInit()

Definition at line 308 of file crazyflie.h.

◆ AHB_CLK

#define AHB_CLK   STM32_HCLK

ChibiOS board file.

PPRZ definitions

Definition at line 18 of file crazyflie.h.

◆ BOARD_CRAZYFLIE

#define BOARD_CRAZYFLIE

Definition at line 4 of file crazyflie.h.

◆ DEFAULT_ACTUATORS

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

Definition at line 306 of file crazyflie.h.

◆ I2C1_CFG_DEF

#define I2C1_CFG_DEF
Value:
{ \
OPMODE_I2C, \
I2C1_CLOCK_SPEED, \
I2C1_DUTY_CYCLE, \
}

Definition at line 220 of file crazyflie.h.

◆ I2C1_CLOCK_SPEED

#define I2C1_CLOCK_SPEED   400000

Definition at line 211 of file crazyflie.h.

◆ I2C1_DUTY_CYCLE

#define I2C1_DUTY_CYCLE   FAST_DUTY_CYCLE_2

Definition at line 214 of file crazyflie.h.

◆ I2C3_CFG_DEF

#define I2C3_CFG_DEF
Value:
{ \
OPMODE_I2C, \
I2C3_CLOCK_SPEED, \
I2C3_DUTY_CYCLE, \
}

Definition at line 202 of file crazyflie.h.

◆ I2C3_CLOCK_SPEED

#define I2C3_CLOCK_SPEED   400000

Definition at line 193 of file crazyflie.h.

◆ I2C3_DUTY_CYCLE

#define I2C3_DUTY_CYCLE   FAST_DUTY_CYCLE_2

Definition at line 196 of file crazyflie.h.

◆ I2C_FAST_400KHZ_DNF0_100NS_PCLK54MHZ_TIMINGR

#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 182 of file crazyflie.h.

◆ I2C_STD_100KHZ_DNF0_100NS_PCLK54MHZ_TIMINGR

#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 185 of file crazyflie.h.

◆ LED_1_GPIO

#define LED_1_GPIO   LED_RED_R_PORT

Definition at line 26 of file crazyflie.h.

◆ LED_1_GPIO_OFF

#define LED_1_GPIO_OFF   gpio_set

Definition at line 29 of file crazyflie.h.

◆ LED_1_GPIO_ON

#define LED_1_GPIO_ON   gpio_clear

Definition at line 28 of file crazyflie.h.

◆ LED_1_GPIO_PIN

#define LED_1_GPIO_PIN   LED_RED_R

Definition at line 27 of file crazyflie.h.

◆ LED_2_GPIO

#define LED_2_GPIO   LED_RED_L_PORT

Definition at line 34 of file crazyflie.h.

◆ LED_2_GPIO_OFF

#define LED_2_GPIO_OFF   gpio_set

Definition at line 37 of file crazyflie.h.

◆ LED_2_GPIO_ON

#define LED_2_GPIO_ON   gpio_clear

Definition at line 36 of file crazyflie.h.

◆ LED_2_GPIO_PIN

#define LED_2_GPIO_PIN   LED_RED_L

Definition at line 35 of file crazyflie.h.

◆ LED_3_GPIO

#define LED_3_GPIO   LED_GREEN_R_PORT

Definition at line 42 of file crazyflie.h.

◆ LED_3_GPIO_OFF

#define LED_3_GPIO_OFF   gpio_set

Definition at line 45 of file crazyflie.h.

◆ LED_3_GPIO_ON

#define LED_3_GPIO_ON   gpio_clear

Definition at line 44 of file crazyflie.h.

◆ LED_3_GPIO_PIN

#define LED_3_GPIO_PIN   LED_GREEN_R

Definition at line 43 of file crazyflie.h.

◆ LED_4_GPIO

#define LED_4_GPIO   LED_GREEN_L_PORT

Definition at line 50 of file crazyflie.h.

◆ LED_4_GPIO_OFF

#define LED_4_GPIO_OFF   gpio_set

Definition at line 53 of file crazyflie.h.

◆ LED_4_GPIO_ON

#define LED_4_GPIO_ON   gpio_clear

Definition at line 52 of file crazyflie.h.

◆ LED_4_GPIO_PIN

#define LED_4_GPIO_PIN   LED_GREEN_L

Definition at line 51 of file crazyflie.h.

◆ LED_5_GPIO

#define LED_5_GPIO   LED_BLUE_L_PORT

Definition at line 58 of file crazyflie.h.

◆ LED_5_GPIO_OFF

#define LED_5_GPIO_OFF   gpio_clear

Definition at line 61 of file crazyflie.h.

◆ LED_5_GPIO_ON

#define LED_5_GPIO_ON   gpio_set

Definition at line 60 of file crazyflie.h.

◆ LED_5_GPIO_PIN

#define LED_5_GPIO_PIN   LED_BLUE_L

Definition at line 59 of file crazyflie.h.

◆ PWM_CMD_TO_US

#define PWM_CMD_TO_US (   _t)    (_t)

Definition at line 139 of file crazyflie.h.

◆ PWM_FREQUENCY

#define PWM_FREQUENCY   84000000

Definition at line 140 of file crazyflie.h.

◆ PWM_SERVO_1

#define PWM_SERVO_1   1

Definition at line 79 of file crazyflie.h.

◆ PWM_SERVO_1_AF

#define PWM_SERVO_1_AF   AF_MOTOR1

Definition at line 82 of file crazyflie.h.

◆ PWM_SERVO_1_CHANNEL

#define PWM_SERVO_1_CHANNEL   1

Definition at line 84 of file crazyflie.h.

◆ PWM_SERVO_1_CONF

#define PWM_SERVO_1_CONF   pwmcfg2

Definition at line 85 of file crazyflie.h.

◆ PWM_SERVO_1_DRIVER

#define PWM_SERVO_1_DRIVER   PWMD2

Definition at line 83 of file crazyflie.h.

◆ PWM_SERVO_1_GPIO

#define PWM_SERVO_1_GPIO   MOTOR1_PORT

Definition at line 80 of file crazyflie.h.

◆ PWM_SERVO_1_PIN

#define PWM_SERVO_1_PIN   MOTOR1

Definition at line 81 of file crazyflie.h.

◆ PWM_SERVO_2

#define PWM_SERVO_2   2

Definition at line 92 of file crazyflie.h.

◆ PWM_SERVO_2_AF

#define PWM_SERVO_2_AF   AF_MOTOR2

Definition at line 95 of file crazyflie.h.

◆ PWM_SERVO_2_CHANNEL

#define PWM_SERVO_2_CHANNEL   3

Definition at line 97 of file crazyflie.h.

◆ PWM_SERVO_2_CONF

#define PWM_SERVO_2_CONF   pwmcfg2

Definition at line 98 of file crazyflie.h.

◆ PWM_SERVO_2_DRIVER

#define PWM_SERVO_2_DRIVER   PWMD2

Definition at line 96 of file crazyflie.h.

◆ PWM_SERVO_2_GPIO

#define PWM_SERVO_2_GPIO   MOTOR2_PORT

Definition at line 93 of file crazyflie.h.

◆ PWM_SERVO_2_PIN

#define PWM_SERVO_2_PIN   MOTOR2

Definition at line 94 of file crazyflie.h.

◆ PWM_SERVO_3

#define PWM_SERVO_3   3

Definition at line 105 of file crazyflie.h.

◆ PWM_SERVO_3_AF

#define PWM_SERVO_3_AF   AF_MOTOR3

Definition at line 108 of file crazyflie.h.

◆ PWM_SERVO_3_CHANNEL

#define PWM_SERVO_3_CHANNEL   0

Definition at line 110 of file crazyflie.h.

◆ PWM_SERVO_3_CONF

#define PWM_SERVO_3_CONF   pwmcfg2

Definition at line 111 of file crazyflie.h.

◆ PWM_SERVO_3_DRIVER

#define PWM_SERVO_3_DRIVER   PWMD2

Definition at line 109 of file crazyflie.h.

◆ PWM_SERVO_3_GPIO

#define PWM_SERVO_3_GPIO   MOTOR3_PORT

Definition at line 106 of file crazyflie.h.

◆ PWM_SERVO_3_PIN

#define PWM_SERVO_3_PIN   MOTOR3

Definition at line 107 of file crazyflie.h.

◆ PWM_SERVO_4

#define PWM_SERVO_4   4

Definition at line 118 of file crazyflie.h.

◆ PWM_SERVO_4_AF

#define PWM_SERVO_4_AF   AF_MOTOR4

Definition at line 121 of file crazyflie.h.

◆ PWM_SERVO_4_CHANNEL

#define PWM_SERVO_4_CHANNEL   3

Definition at line 123 of file crazyflie.h.

◆ PWM_SERVO_4_CONF

#define PWM_SERVO_4_CONF   pwmcfg4

Definition at line 124 of file crazyflie.h.

◆ PWM_SERVO_4_DRIVER

#define PWM_SERVO_4_DRIVER   PWMD4

Definition at line 122 of file crazyflie.h.

◆ PWM_SERVO_4_GPIO

#define PWM_SERVO_4_GPIO   MOTOR4_PORT

Definition at line 119 of file crazyflie.h.

◆ PWM_SERVO_4_PIN

#define PWM_SERVO_4_PIN   MOTOR4

Definition at line 120 of file crazyflie.h.

◆ SERVO_HZ

#define SERVO_HZ   (PWM_FREQUENCY / 256)

Definition at line 141 of file crazyflie.h.

◆ SPI1_GPIO_AF

#define SPI1_GPIO_AF   AF_E_SCK

SPI Config.

Definition at line 275 of file crazyflie.h.

◆ SPI1_GPIO_MISO

#define SPI1_GPIO_MISO   E_MISO

Definition at line 277 of file crazyflie.h.

◆ SPI1_GPIO_MOSI

#define SPI1_GPIO_MOSI   E_MOSI

Definition at line 279 of file crazyflie.h.

◆ SPI1_GPIO_PORT_MISO

#define SPI1_GPIO_PORT_MISO   E_MISO_PORT

Definition at line 276 of file crazyflie.h.

◆ SPI1_GPIO_PORT_MOSI

#define SPI1_GPIO_PORT_MOSI   E_MOSI_PORT

Definition at line 278 of file crazyflie.h.

◆ SPI1_GPIO_PORT_SCK

#define SPI1_GPIO_PORT_SCK   E_SCK_PORT

Definition at line 280 of file crazyflie.h.

◆ SPI1_GPIO_SCK

#define SPI1_GPIO_SCK   E_SCK

Definition at line 281 of file crazyflie.h.

◆ SPI_SELECT_SLAVE0_PIN

#define SPI_SELECT_SLAVE0_PIN   E_CS0

Definition at line 284 of file crazyflie.h.

◆ SPI_SELECT_SLAVE0_PORT

#define SPI_SELECT_SLAVE0_PORT   E_CS0_PORT

Definition at line 283 of file crazyflie.h.

◆ SPI_SELECT_SLAVE1_PIN

#define SPI_SELECT_SLAVE1_PIN   E_CS1

Definition at line 286 of file crazyflie.h.

◆ SPI_SELECT_SLAVE1_PORT

#define SPI_SELECT_SLAVE1_PORT   E_CS1_PORT

Definition at line 285 of file crazyflie.h.

◆ SPI_SELECT_SLAVE2_PIN

#define SPI_SELECT_SLAVE2_PIN   E_CS2

Definition at line 288 of file crazyflie.h.

◆ SPI_SELECT_SLAVE2_PORT

#define SPI_SELECT_SLAVE2_PORT   E_CS2_PORT

Definition at line 287 of file crazyflie.h.

◆ SPI_SELECT_SLAVE3_PIN

#define SPI_SELECT_SLAVE3_PIN   E_CS3

Definition at line 290 of file crazyflie.h.

◆ SPI_SELECT_SLAVE3_PORT

#define SPI_SELECT_SLAVE3_PORT   E_CS3_PORT

Definition at line 289 of file crazyflie.h.

◆ STM32_CR1_DNF

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

I2C defines.

Definition at line 180 of file crazyflie.h.

◆ UART2_GPIO_AF

#define UART2_GPIO_AF   AF_E_RX2

Definition at line 150 of file crazyflie.h.

◆ UART2_GPIO_PORT_RX

#define UART2_GPIO_PORT_RX   E_RX2_PORT

Definition at line 148 of file crazyflie.h.

◆ UART2_GPIO_PORT_TX

#define UART2_GPIO_PORT_TX   E_TX2_PORT

UART2 E_TX2.

Definition at line 146 of file crazyflie.h.

◆ UART2_GPIO_RX

#define UART2_GPIO_RX   E_RX2

Definition at line 149 of file crazyflie.h.

◆ UART2_GPIO_TX

#define UART2_GPIO_TX   E_TX2

Definition at line 147 of file crazyflie.h.

◆ UART2_HW_FLOW_CONTROL

#define UART2_HW_FLOW_CONTROL   FALSE

Definition at line 152 of file crazyflie.h.

◆ UART3_GPIO_AF

#define UART3_GPIO_AF   AF_E_RX1

Definition at line 162 of file crazyflie.h.

◆ UART3_GPIO_PORT_RX

#define UART3_GPIO_PORT_RX   E_RX1_PORT

Definition at line 160 of file crazyflie.h.

◆ UART3_GPIO_PORT_TX

#define UART3_GPIO_PORT_TX   E_TX1_PORT

UART3 E_TX1.

Definition at line 158 of file crazyflie.h.

◆ UART3_GPIO_RX

#define UART3_GPIO_RX   E_RX1

Definition at line 161 of file crazyflie.h.

◆ UART3_GPIO_TX

#define UART3_GPIO_TX   E_TX1

Definition at line 159 of file crazyflie.h.

◆ UART6_GPIO_AF

#define UART6_GPIO_AF   AF_NRF_RX

Definition at line 171 of file crazyflie.h.

◆ UART6_GPIO_CTS

#define UART6_GPIO_CTS   NRF_FLOW_CTRL

Definition at line 173 of file crazyflie.h.

◆ UART6_GPIO_PORT_CTS

#define UART6_GPIO_PORT_CTS   NRF_FLOW_CTRL_PORT

Definition at line 172 of file crazyflie.h.

◆ UART6_GPIO_PORT_RX

#define UART6_GPIO_PORT_RX   NRF_RX_PORT

Definition at line 169 of file crazyflie.h.

◆ UART6_GPIO_PORT_TX

#define UART6_GPIO_PORT_TX   NRF_TX_PORT

UART6 NRF.

Definition at line 167 of file crazyflie.h.

◆ UART6_GPIO_RX

#define UART6_GPIO_RX   NRF_RX

Definition at line 170 of file crazyflie.h.

◆ UART6_GPIO_TX

#define UART6_GPIO_TX   NRF_TX

Definition at line 168 of file crazyflie.h.

◆ USE_BARO_BOARD

#define USE_BARO_BOARD   0

Baro.

Apparently needed for backwards compatibility with the ancient onboard baro boards

Definition at line 299 of file crazyflie.h.

◆ USE_LED_1

#define USE_LED_1   1

Definition at line 24 of file crazyflie.h.

◆ USE_LED_2

#define USE_LED_2   1

Definition at line 32 of file crazyflie.h.

◆ USE_LED_3

#define USE_LED_3   1

Definition at line 40 of file crazyflie.h.

◆ USE_LED_4

#define USE_LED_4   1

Definition at line 48 of file crazyflie.h.

◆ USE_LED_5

#define USE_LED_5   1

Definition at line 56 of file crazyflie.h.

◆ USE_PWM1

#define USE_PWM1   1

Definition at line 76 of file crazyflie.h.

◆ USE_PWM2

#define USE_PWM2   1

Definition at line 89 of file crazyflie.h.

◆ USE_PWM3

#define USE_PWM3   1

Definition at line 102 of file crazyflie.h.

◆ USE_PWM4

#define USE_PWM4   1

Definition at line 115 of file crazyflie.h.