Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
cc3d.h File Reference

Go to the source code of this file.

Macros

#define EXT_CLK   8000000
 
#define AHB_CLK   72000000
 
#define USE_LED_1   1
 
#define LED_1_GPIO   GPIOB
 
#define LED_1_GPIO_PIN   GPIO3
 
#define LED_1_GPIO_ON   gpio_clear
 
#define LED_1_GPIO_OFF   gpio_set
 
#define LED_1_AFIO_REMAP
 
#define SPI_SELECT_SLAVE0_PORT   GPIOA
 
#define SPI_SELECT_SLAVE0_PIN   GPIO4
 
#define SPI_SELECT_SLAVE1_PORT   GPIOB
 
#define SPI_SELECT_SLAVE1_PIN   GPIO12
 
#define UART1_GPIO_AF   0
 
#define UART1_GPIO_PORT_RX   GPIO_BANK_USART1_RX
 
#define UART1_GPIO_RX   GPIO_USART1_RX
 
#define UART1_GPIO_PORT_TX   GPIO_BANK_USART1_TX
 
#define UART1_GPIO_TX   GPIO_USART1_TX
 
#define UART3_GPIO_AF   AFIO_MAPR_USART3_REMAP_PARTIAL_REMAP
 
#define UART3_GPIO_PORT_RX   GPIO_BANK_USART3_PR_RX
 
#define UART3_GPIO_RX   GPIO_USART3_PR_RX
 
#define UART3_GPIO_PORT_TX   GPIO_BANK_USART3_PR_TX
 
#define UART3_GPIO_TX   GPIO_USART3_PR_TX
 
#define SPEKTRUM_BIND_PIN   GPIO1
 
#define SPEKTRUM_BIND_PIN_PORT   GPIOA
 
#define SPEKTRUM_UART1_RCC   RCC_USART1
 
#define SPEKTRUM_UART1_BANK   GPIO_BANK_USART1_RX
 
#define SPEKTRUM_UART1_PIN   GPIO_USART1_RX
 
#define SPEKTRUM_UART1_AF   0
 
#define SPEKTRUM_UART1_IRQ   NVIC_USART1_IRQ
 
#define SPEKTRUM_UART1_ISR   usart1_isr
 
#define SPEKTRUM_UART1_DEV   USART1
 
#define SPEKTRUM_UART3_RCC   RCC_USART3
 
#define SPEKTRUM_UART3_BANK   GPIO_BANK_USART3_PR_RX
 
#define SPEKTRUM_UART3_PIN   GPIO_USART3_PR_RX
 
#define SPEKTRUM_UART3_AF   AFIO_MAPR_USART3_REMAP_PARTIAL_REMAP
 
#define SPEKTRUM_UART3_IRQ   NVIC_USART3_IRQ
 
#define SPEKTRUM_UART3_ISR   usart3_isr
 
#define SPEKTRUM_UART3_DEV   USART3
 
#define RC_POLARITY_GPIO_PORT   GPIOB
 
#define RC_POLARITY_GPIO_PIN   GPIO2
 
#define PPM_CONFIG   2
 
#define USE_PPM_TIM2   1
 
#define PPM_CHANNEL   TIM_IC2
 
#define PPM_TIMER_INPUT   TIM_IC_IN_TI2
 
#define PPM_IRQ   NVIC_TIM2_IRQ
 
#define PPM_CC_IE   TIM_DIER_CC2IE
 
#define PPM_CC_IF   TIM_SR_CC2IF
 
#define PPM_GPIO_PORT   GPIOA
 
#define PPM_GPIO_PIN   GPIO1
 
#define PPM_GPIO_AF   0
 
#define I2C2_GPIO_PORT   GPIOB
 
#define I2C2_GPIO_SCL   GPIO10
 
#define I2C2_GPIO_SDA   GPIO11
 
#define PWM_USE_TIM4   1
 
#define USE_PWM1   1
 
#define USE_PWM2   1
 
#define USE_PWM3   1
 
#define PWM_USE_TIM1   1
 
#define USE_PWM4   1
 
#define PWM_USE_TIM3   0
 
#define USE_PWM5   0
 
#define PWM_USE_TIM2   0
 
#define USE_PWM6   0
 
#define ACTUATORS_PWM_NB   4
 
#define PWM_SERVO_1   0
 
#define PWM_SERVO_1_TIMER   TIM4
 
#define PWM_SERVO_1_GPIO   GPIOB
 
#define PWM_SERVO_1_PIN   GPIO9
 
#define PWM_SERVO_1_AF   0
 
#define PWM_SERVO_1_OC   TIM_OC4
 
#define PWM_SERVO_1_OC_BIT   (1<<3)
 
#define PWM_SERVO_2   1
 
#define PWM_SERVO_2_TIMER   TIM4
 
#define PWM_SERVO_2_GPIO   GPIOB
 
#define PWM_SERVO_2_PIN   GPIO8
 
#define PWM_SERVO_2_AF   0
 
#define PWM_SERVO_2_OC   TIM_OC3
 
#define PWM_SERVO_2_OC_BIT   (1<<2)
 
#define PWM_SERVO_3   2
 
#define PWM_SERVO_3_TIMER   TIM4
 
#define PWM_SERVO_3_GPIO   GPIOB
 
#define PWM_SERVO_3_PIN   GPIO7
 
#define PWM_SERVO_3_AF   0
 
#define PWM_SERVO_3_OC   TIM_OC2
 
#define PWM_SERVO_3_OC_BIT   (1<<1)
 
#define PWM_SERVO_4   3
 
#define PWM_SERVO_4_TIMER   TIM1
 
#define PWM_SERVO_4_GPIO   GPIOA
 
#define PWM_SERVO_4_PIN   GPIO1
 
#define PWM_SERVO_4_AF   0
 
#define PWM_SERVO_4_OC   TIM_OC1
 
#define PWM_SERVO_4_OC_BIT   (1<<0)
 
#define PWM_SERVO_5_OC_BIT   0
 
#define PWM_SERVO_6_OC_BIT   0
 
#define PWM_TIM4_CHAN_MASK   (PWM_SERVO_1_OC_BIT|PWM_SERVO_2_OC_BIT|PWM_SERVO_3_OC_BIT)
 
#define PWM_TIM1_CHAN_MASK   PWM_SERVO_4_OC_BIT
 
#define PWM_TIM3_CHAN_MASK   PWM_SERVO_5_OC_BIT
 
#define PWM_TIM2_CHAN_MASK   PWM_SERVO_6_OC_BIT
 
#define DEFAULT_ACTUATORS   "subsystems/actuators/actuators_pwm.h"
 
#define ActuatorDefaultSet(_x, _y)   ActuatorPwmSet(_x,_y)
 
#define ActuatorsDefaultInit()   ActuatorsPwmInit()
 
#define ActuatorsDefaultCommit()   ActuatorsPwmCommit()
 
#define DefaultVoltageOfAdc(adc)   (50)
 

Macro Definition Documentation

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

Definition at line 247 of file cc3d.h.

#define ACTUATORS_PWM_NB   4

Definition at line 158 of file cc3d.h.

#define ActuatorsDefaultCommit ( )    ActuatorsPwmCommit()

Definition at line 249 of file cc3d.h.

#define ActuatorsDefaultInit ( )    ActuatorsPwmInit()

Definition at line 248 of file cc3d.h.

#define AHB_CLK   72000000

Definition at line 6 of file cc3d.h.

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

Definition at line 246 of file cc3d.h.

#define DefaultVoltageOfAdc (   adc)    (50)

Definition at line 253 of file cc3d.h.

#define EXT_CLK   8000000

Definition at line 5 of file cc3d.h.

#define I2C2_GPIO_PORT   GPIOB

Definition at line 133 of file cc3d.h.

#define I2C2_GPIO_SCL   GPIO10

Definition at line 134 of file cc3d.h.

#define I2C2_GPIO_SDA   GPIO11

Definition at line 135 of file cc3d.h.

#define LED_1_AFIO_REMAP
Value:
{ \
rcc_periph_clock_enable(RCC_AFIO); \
AFIO_MAPR |= AFIO_MAPR_SWJ_CFG_JTAG_OFF_SW_ON; \
}

Definition at line 20 of file cc3d.h.

#define LED_1_GPIO   GPIOB

Definition at line 16 of file cc3d.h.

#define LED_1_GPIO_OFF   gpio_set

Definition at line 19 of file cc3d.h.

#define LED_1_GPIO_ON   gpio_clear

Definition at line 18 of file cc3d.h.

#define LED_1_GPIO_PIN   GPIO3

Definition at line 17 of file cc3d.h.

#define PPM_CC_IE   TIM_DIER_CC2IE

Definition at line 112 of file cc3d.h.

#define PPM_CC_IF   TIM_SR_CC2IF

Definition at line 113 of file cc3d.h.

#define PPM_CHANNEL   TIM_IC2

Definition at line 108 of file cc3d.h.

#define PPM_CONFIG   2

Definition at line 89 of file cc3d.h.

#define PPM_GPIO_AF   0

Definition at line 116 of file cc3d.h.

#define PPM_GPIO_PIN   GPIO1

Definition at line 115 of file cc3d.h.

#define PPM_GPIO_PORT   GPIOA

Definition at line 114 of file cc3d.h.

#define PPM_IRQ   NVIC_TIM2_IRQ

Definition at line 110 of file cc3d.h.

#define PPM_TIMER_INPUT   TIM_IC_IN_TI2

Definition at line 109 of file cc3d.h.

#define PWM_SERVO_1   0

Definition at line 164 of file cc3d.h.

#define PWM_SERVO_1_AF   0

Definition at line 168 of file cc3d.h.

#define PWM_SERVO_1_GPIO   GPIOB

Definition at line 166 of file cc3d.h.

#define PWM_SERVO_1_OC   TIM_OC4

Definition at line 169 of file cc3d.h.

#define PWM_SERVO_1_OC_BIT   (1<<3)

Definition at line 170 of file cc3d.h.

#define PWM_SERVO_1_PIN   GPIO9

Definition at line 167 of file cc3d.h.

#define PWM_SERVO_1_TIMER   TIM4

Definition at line 165 of file cc3d.h.

#define PWM_SERVO_2   1

Definition at line 176 of file cc3d.h.

#define PWM_SERVO_2_AF   0

Definition at line 180 of file cc3d.h.

#define PWM_SERVO_2_GPIO   GPIOB

Definition at line 178 of file cc3d.h.

#define PWM_SERVO_2_OC   TIM_OC3

Definition at line 181 of file cc3d.h.

#define PWM_SERVO_2_OC_BIT   (1<<2)

Definition at line 182 of file cc3d.h.

#define PWM_SERVO_2_PIN   GPIO8

Definition at line 179 of file cc3d.h.

#define PWM_SERVO_2_TIMER   TIM4

Definition at line 177 of file cc3d.h.

#define PWM_SERVO_3   2

Definition at line 188 of file cc3d.h.

#define PWM_SERVO_3_AF   0

Definition at line 192 of file cc3d.h.

#define PWM_SERVO_3_GPIO   GPIOB

Definition at line 190 of file cc3d.h.

#define PWM_SERVO_3_OC   TIM_OC2

Definition at line 193 of file cc3d.h.

#define PWM_SERVO_3_OC_BIT   (1<<1)

Definition at line 194 of file cc3d.h.

#define PWM_SERVO_3_PIN   GPIO7

Definition at line 191 of file cc3d.h.

#define PWM_SERVO_3_TIMER   TIM4

Definition at line 189 of file cc3d.h.

#define PWM_SERVO_4   3

Definition at line 200 of file cc3d.h.

#define PWM_SERVO_4_AF   0

Definition at line 204 of file cc3d.h.

#define PWM_SERVO_4_GPIO   GPIOA

Definition at line 202 of file cc3d.h.

#define PWM_SERVO_4_OC   TIM_OC1

Definition at line 205 of file cc3d.h.

#define PWM_SERVO_4_OC_BIT   (1<<0)

Definition at line 206 of file cc3d.h.

#define PWM_SERVO_4_PIN   GPIO1

Definition at line 203 of file cc3d.h.

#define PWM_SERVO_4_TIMER   TIM1

Definition at line 201 of file cc3d.h.

#define PWM_SERVO_5_OC_BIT   0

Definition at line 220 of file cc3d.h.

#define PWM_SERVO_6_OC_BIT   0

Definition at line 232 of file cc3d.h.

#define PWM_TIM1_CHAN_MASK   PWM_SERVO_4_OC_BIT

Definition at line 238 of file cc3d.h.

Referenced by actuators_pwm_arch_init().

#define PWM_TIM2_CHAN_MASK   PWM_SERVO_6_OC_BIT

Definition at line 242 of file cc3d.h.

#define PWM_TIM3_CHAN_MASK   PWM_SERVO_5_OC_BIT

Definition at line 240 of file cc3d.h.

#define PWM_TIM4_CHAN_MASK   (PWM_SERVO_1_OC_BIT|PWM_SERVO_2_OC_BIT|PWM_SERVO_3_OC_BIT)

Definition at line 236 of file cc3d.h.

Referenced by actuators_pwm_arch_init().

#define PWM_USE_TIM1   1

Definition at line 148 of file cc3d.h.

#define PWM_USE_TIM2   0

Definition at line 155 of file cc3d.h.

#define PWM_USE_TIM3   0

Definition at line 152 of file cc3d.h.

#define PWM_USE_TIM4   1

Definition at line 143 of file cc3d.h.

#define RC_POLARITY_GPIO_PIN   GPIO2

Definition at line 81 of file cc3d.h.

#define RC_POLARITY_GPIO_PORT   GPIOB

Definition at line 80 of file cc3d.h.

#define SPEKTRUM_BIND_PIN   GPIO1

Definition at line 59 of file cc3d.h.

#define SPEKTRUM_BIND_PIN_PORT   GPIOA

Definition at line 60 of file cc3d.h.

#define SPEKTRUM_UART1_AF   0

Definition at line 65 of file cc3d.h.

#define SPEKTRUM_UART1_BANK   GPIO_BANK_USART1_RX

Definition at line 63 of file cc3d.h.

#define SPEKTRUM_UART1_DEV   USART1

Definition at line 68 of file cc3d.h.

#define SPEKTRUM_UART1_IRQ   NVIC_USART1_IRQ

Definition at line 66 of file cc3d.h.

#define SPEKTRUM_UART1_ISR   usart1_isr

Definition at line 67 of file cc3d.h.

#define SPEKTRUM_UART1_PIN   GPIO_USART1_RX

Definition at line 64 of file cc3d.h.

#define SPEKTRUM_UART1_RCC   RCC_USART1

Definition at line 62 of file cc3d.h.

#define SPEKTRUM_UART3_AF   AFIO_MAPR_USART3_REMAP_PARTIAL_REMAP

Definition at line 73 of file cc3d.h.

#define SPEKTRUM_UART3_BANK   GPIO_BANK_USART3_PR_RX

Definition at line 71 of file cc3d.h.

#define SPEKTRUM_UART3_DEV   USART3

Definition at line 76 of file cc3d.h.

#define SPEKTRUM_UART3_IRQ   NVIC_USART3_IRQ

Definition at line 74 of file cc3d.h.

#define SPEKTRUM_UART3_ISR   usart3_isr

Definition at line 75 of file cc3d.h.

#define SPEKTRUM_UART3_PIN   GPIO_USART3_PR_RX

Definition at line 72 of file cc3d.h.

#define SPEKTRUM_UART3_RCC   RCC_USART3

Definition at line 70 of file cc3d.h.

#define SPI_SELECT_SLAVE0_PIN   GPIO4

Definition at line 29 of file cc3d.h.

#define SPI_SELECT_SLAVE0_PORT   GPIOA

Definition at line 28 of file cc3d.h.

#define SPI_SELECT_SLAVE1_PIN   GPIO12

Definition at line 33 of file cc3d.h.

#define SPI_SELECT_SLAVE1_PORT   GPIOB

Definition at line 32 of file cc3d.h.

#define UART1_GPIO_AF   0

Definition at line 41 of file cc3d.h.

#define UART1_GPIO_PORT_RX   GPIO_BANK_USART1_RX

Definition at line 42 of file cc3d.h.

#define UART1_GPIO_PORT_TX   GPIO_BANK_USART1_TX

Definition at line 44 of file cc3d.h.

#define UART1_GPIO_RX   GPIO_USART1_RX

Definition at line 43 of file cc3d.h.

#define UART1_GPIO_TX   GPIO_USART1_TX

Definition at line 45 of file cc3d.h.

#define UART3_GPIO_AF   AFIO_MAPR_USART3_REMAP_PARTIAL_REMAP

Definition at line 48 of file cc3d.h.

#define UART3_GPIO_PORT_RX   GPIO_BANK_USART3_PR_RX

Definition at line 49 of file cc3d.h.

#define UART3_GPIO_PORT_TX   GPIO_BANK_USART3_PR_TX

Definition at line 51 of file cc3d.h.

#define UART3_GPIO_RX   GPIO_USART3_PR_RX

Definition at line 50 of file cc3d.h.

#define UART3_GPIO_TX   GPIO_USART3_PR_TX

Definition at line 52 of file cc3d.h.

#define USE_LED_1   1

Definition at line 14 of file cc3d.h.

#define USE_PPM_TIM2   1

Definition at line 107 of file cc3d.h.

#define USE_PWM1   1

Definition at line 144 of file cc3d.h.

#define USE_PWM2   1

Definition at line 145 of file cc3d.h.

#define USE_PWM3   1

Definition at line 146 of file cc3d.h.

#define USE_PWM4   1

Definition at line 149 of file cc3d.h.

#define USE_PWM5   0

Definition at line 153 of file cc3d.h.

#define USE_PWM6   0

Definition at line 156 of file cc3d.h.