dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Modules

 CMSIS
 
 USB_OTG_DRIVER
 

Files

file  pios_board.c
 Board specific initialization for the bootloader.
 
file  pios_config.h
 Board specific bootloader configuration file for PiOS.
 
file  board_hw_defs.c
 Defines board specific static initializers for hardware for the FlyingF4 board.
 
file  pios_board.h
 Board define file for FlyingF4.
 
file  usb_conf.h
 General low level driver configuration.
 
file  pios_board.c
 The board specific initialization routines.
 
file  pios_config.h
 Board specific options that modify PiOS capabilities.
 
file  splash.h
 

Macros

#define PIOS_INCLUDE_ANNUNC
 
#define PIOS_INCLUDE_SPI
 
#define PIOS_INCLUDE_SYS
 
#define PIOS_INCLUDE_IAP
 
#define PIOS_INCLUDE_USB
 
#define PIOS_INCLUDE_USB_HID
 
#define PIOS_INCLUDE_COM_MSG
 
#define PIOS_INCLUDE_FLASH
 
#define PIOS_INCLUDE_FLASH_INTERNAL
 
#define PIOS_INCLUDE_FLASH_JEDEC
 
#define DEBUG_PRINTF(level,...)
 
#define BOARD_READABLE   true
 
#define BOARD_WRITABLE   true
 
#define MAX_DEL_RETRYS   3
 
#define PIOS_LED_BLUE   0
 
#define PIOS_LED_RED   1
 
#define PIOS_LED_HEARTBEAT   PIOS_LED_BLUE
 
#define PIOS_LED_ALARM   PIOS_LED_RED
 
#define PIOS_WATCHDOG_TIMEOUT   250
 
#define PIOS_WDG_REGISTER   RTC_BKP_DR4
 
#define PIOS_COM_GPS   (pios_com_gps_id)
 
#define PIOS_COM_TELEM_USB   (pios_com_telem_usb_id)
 
#define PIOS_COM_BRIDGE   (pios_com_bridge_id)
 
#define PIOS_COM_VCP   (pios_com_vcp_id)
 
#define PIOS_COM_MAVLINK   (pios_com_mavlink_id)
 
#define PIOS_COM_HOTT   (pios_com_hott_id)
 
#define PIOS_COM_FRSKY_SENSOR_HUB   (pios_com_frsky_sensor_hub_id)
 
#define PIOS_COM_FRSKY_SPORT   (pios_com_frsky_sport_id)
 
#define PIOS_COM_LIGHTTELEMETRY   (pios_com_lighttelemetry_id)
 
#define PIOS_COM_OPENLOG   (pios_com_openlog_logging_id)
 
#define PIOS_COM_STORM32BGC   (pios_com_storm32bgc_id)
 
#define PIOS_COM_TBSVTXCONFIG   (pios_com_tbsvtxconfig_id)
 
#define PIOS_SYSCLK   168000000
 
#define PIOS_PERIPHERAL_APB1_CLOCK   (PIOS_SYSCLK / 4)
 
#define PIOS_PERIPHERAL_APB2_CLOCK   (PIOS_SYSCLK / 2)
 
#define PIOS_IRQ_PRIO_LOW   12
 
#define PIOS_IRQ_PRIO_MID   8
 
#define PIOS_IRQ_PRIO_HIGH   5
 
#define PIOS_IRQ_PRIO_HIGHEST   4
 
#define PIOS_RCVR_MAX_CHANNELS   12
 
#define PIOS_PPM_NUM_INPUTS   12
 
#define PIOS_PWM_NUM_INPUTS   8
 
#define PIOS_DSM_NUM_INPUTS   12
 
#define PIOS_HSUM_MAX_DEVS   2
 
#define PIOS_HSUM_NUM_INPUTS   32
 
#define PIOS_SBUS_NUM_INPUTS   (16+2)
 
#define PIOS_SERVO_UPDATE_HZ   50
 
#define PIOS_SERVOS_INITIAL_POSITION   0 /* dont want to start motors, have no pulse till settings loaded */
 
#define PIOS_TIM_MAX_DEVS   8
 
#define PIOS_ADC_MAX_OVERSAMPLING   2
 
#define VREF_PLUS   3.3
 
#define PIOS_USB_ENABLED   1 /* Should remove all references to this */
 
#define STABILIZATION_LQG
 
#define PIOS_INCLUDE_FLASH_JEDEC
 
#define PIOS_INCLUDE_I2C
 
#define PIOS_INCLUDE_SPI
 
#define PIOS_INCLUDE_FASTHEAP
 
#define PIOS_INCLUDE_TBSVTXCONFIG
 
#define PIOS_INCLUDE_DAC
 
#define PIOS_INCLUDE_DAC_ANNUNCIATOR
 
#define PIOS_INCLUDE_DAC_FSK
 
#define PIOS_INCLUDE_MS5611
 
#define PIOS_INCLUDE_MPU
 
#define PIOS_INCLUDE_MPU_MAG
 
#define PIOS_INCLUDE_HMC5883
 
#define PIOS_INCLUDE_HMC5983_I2C
 
#define PIOS_TOLERATE_MISSING_SENSORS
 
#define PIOS_INCLUDE_MAVLINK
 
#define PIOS_INCLUDE_LIGHTTELEMETRY
 
#define PIOS_INCLUDE_PWM
 
#define PIOS_INCLUDE_DMASHOT
 
#define PIOS_VIDEO_TIM4_COUNTER
 
#define PIOS_INCLUDE_VIDEO
 
#define PIOS_VIDEO_SPLITBUFFER   /* Brain uses 2 1-bit/pixel buffers */
 
#define PIOS_VIDEO_HSYNC_OFFSET   15
 
#define MODULE_FLIGHTSTATS_BUILTIN
 
#define PIOS_INCLUDE_DEBUG_CONSOLE
 
#define OSD_USE_BRAINFPV_LOGO
 
#define PIOS_OMIT_TIM2IRQ
 
#define OSD_USE_MENU
 
#define CAMERASTAB_POI_MODE
 
#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD   (9873737)
 
#define BRAIN
 
#define PIOS_INCLUDE_LOG_TO_FLASH
 
#define PIOS_LOGFLASH_SECT_SIZE   0x1000 /* 4kb */
 
#define oplogo_width   144
 
#define oplogo_height   144
 
#define level_width   144
 
#define level_height   129
 
#define level_mask_width   144
 
#define level_mask_height   129
 
#define llama_width   240
 
#define llama_height   260
 
#define llama_mask_width   240
 
#define llama_mask_height   260
 

Functions

void PIOS_Board_Init ()
 

Variables

uintptr_t pios_com_telem_usb_id
 
static const
TIM_TimeBaseInitTypeDef 
tim_8_time_base
 
static const
TIM_TimeBaseInitTypeDef 
tim_12_time_base
 
static const struct
pios_tim_clock_cfg 
tim_8_cfg
 
static const struct
pios_tim_clock_cfg 
tim_12_cfg
 
static const
TIM_TimeBaseInitTypeDef 
tim_5_time_base
 
static const struct
pios_tim_clock_cfg 
tim_5_cfg
 
static const struct
pios_tim_channel 
pios_tim_servoport_all_pins []
 
static const struct
pios_tim_channel 
pios_tim_servoport_rcvrport_pins []
 
static const struct
pios_tim_channel 
pios_tim_rcvrport_all_channels []
 
uintptr_t pios_com_telem_serial_id
 
uintptr_t pios_com_gps_id
 
uintptr_t pios_com_telem_usb_id
 
uintptr_t pios_com_bridge_id
 
uintptr_t pios_com_vcp_id
 
uintptr_t pios_com_mavlink_id
 
uintptr_t pios_com_frsky_sensor_hub_id
 
uintptr_t pios_com_frsky_sport_id
 
uintptr_t pios_com_lighttelemetry_id
 
uintptr_t pios_com_hott_id
 
uintptr_t pios_com_openlog_logging_id
 
uintptr_t pios_com_storm32bgc_id
 
uintptr_t pios_com_tbsvtxconfig_id
 
uintptr_t pios_internal_adc_id
 
uintptr_t pios_com_logging_id
 
uintptr_t pios_com_openlog_logging_id
 
uintptr_t pios_uavo_settings_fs_id
 
static const unsigned short oplogo_bits []
 
static const unsigned short oplogo_mask_bits []
 
static const unsigned short level_bits []
 
static const unsigned short level_mask_bits []
 
static const unsigned short llama_bits []
 
static const unsigned short llama_mask_bits []
 

Detailed Description

Macro Definition Documentation

#define BOARD_READABLE   true

Definition at line 79 of file pios_board.h.

#define BOARD_WRITABLE   true

Definition at line 80 of file pios_board.h.

#define BRAIN

Definition at line 96 of file pios_config.h.

#define CAMERASTAB_POI_MODE

Definition at line 79 of file pios_config.h.

#define DEBUG_PRINTF (   level,
  ... 
)

Definition at line 40 of file pios_board.h.

#define IDLE_COUNTS_PER_SEC_AT_NO_LOAD   (9873737)

Definition at line 94 of file pios_config.h.

#define level_height   129

Definition at line 315 of file splash.h.

#define level_mask_height   129

Definition at line 449 of file splash.h.

#define level_mask_width   144

Definition at line 448 of file splash.h.

#define level_width   144

Definition at line 314 of file splash.h.

#define llama_height   260

Definition at line 583 of file splash.h.

#define llama_mask_height   260

Definition at line 1022 of file splash.h.

#define llama_mask_width   240

Definition at line 1021 of file splash.h.

#define llama_width   240

Definition at line 582 of file splash.h.

#define MAX_DEL_RETRYS   3

Definition at line 81 of file pios_board.h.

#define MODULE_FLIGHTSTATS_BUILTIN

Definition at line 71 of file pios_config.h.

#define oplogo_height   144

Definition at line 18 of file splash.h.

#define oplogo_width   144

Definition at line 17 of file splash.h.

#define OSD_USE_BRAINFPV_LOGO

Definition at line 73 of file pios_config.h.

#define OSD_USE_MENU

Definition at line 75 of file pios_config.h.

#define PIOS_ADC_MAX_OVERSAMPLING   2

Definition at line 216 of file pios_board.h.

#define PIOS_COM_BRIDGE   (pios_com_bridge_id)

Definition at line 121 of file pios_board.h.

#define PIOS_COM_FRSKY_SENSOR_HUB   (pios_com_frsky_sensor_hub_id)

Definition at line 125 of file pios_board.h.

#define PIOS_COM_FRSKY_SPORT   (pios_com_frsky_sport_id)

Definition at line 126 of file pios_board.h.

#define PIOS_COM_GPS   (pios_com_gps_id)

Definition at line 119 of file pios_board.h.

#define PIOS_COM_HOTT   (pios_com_hott_id)

Definition at line 124 of file pios_board.h.

#define PIOS_COM_LIGHTTELEMETRY   (pios_com_lighttelemetry_id)

Definition at line 127 of file pios_board.h.

#define PIOS_COM_MAVLINK   (pios_com_mavlink_id)

Definition at line 123 of file pios_board.h.

#define PIOS_COM_OPENLOG   (pios_com_openlog_logging_id)

Definition at line 128 of file pios_board.h.

#define PIOS_COM_STORM32BGC   (pios_com_storm32bgc_id)

Definition at line 129 of file pios_board.h.

#define PIOS_COM_TBSVTXCONFIG   (pios_com_tbsvtxconfig_id)

Definition at line 130 of file pios_board.h.

#define PIOS_COM_TELEM_USB   (pios_com_telem_usb_id)

Definition at line 120 of file pios_board.h.

#define PIOS_COM_VCP   (pios_com_vcp_id)

Definition at line 122 of file pios_board.h.

#define PIOS_DSM_NUM_INPUTS   12

Definition at line 190 of file pios_board.h.

#define PIOS_HSUM_MAX_DEVS   2

Definition at line 195 of file pios_board.h.

#define PIOS_HSUM_NUM_INPUTS   32

Definition at line 196 of file pios_board.h.

#define PIOS_INCLUDE_ANNUNC

Definition at line 34 of file pios_config.h.

#define PIOS_INCLUDE_COM_MSG

Definition at line 40 of file pios_config.h.

#define PIOS_INCLUDE_DAC

Definition at line 43 of file pios_config.h.

#define PIOS_INCLUDE_DAC_ANNUNCIATOR

Definition at line 44 of file pios_config.h.

#define PIOS_INCLUDE_DAC_FSK

Definition at line 45 of file pios_config.h.

#define PIOS_INCLUDE_DEBUG_CONSOLE

Definition at line 72 of file pios_config.h.

#define PIOS_INCLUDE_DMASHOT

Definition at line 64 of file pios_config.h.

#define PIOS_INCLUDE_FASTHEAP

Definition at line 41 of file pios_config.h.

#define PIOS_INCLUDE_FLASH

Definition at line 41 of file pios_config.h.

#define PIOS_INCLUDE_FLASH_INTERNAL

Definition at line 42 of file pios_config.h.

#define PIOS_INCLUDE_FLASH_JEDEC

Definition at line 38 of file pios_config.h.

#define PIOS_INCLUDE_FLASH_JEDEC

Definition at line 43 of file pios_config.h.

#define PIOS_INCLUDE_HMC5883

Definition at line 51 of file pios_config.h.

#define PIOS_INCLUDE_HMC5983_I2C

Definition at line 52 of file pios_config.h.

#define PIOS_INCLUDE_I2C

Definition at line 39 of file pios_config.h.

#define PIOS_INCLUDE_IAP

Definition at line 37 of file pios_config.h.

#define PIOS_INCLUDE_LIGHTTELEMETRY

Definition at line 59 of file pios_config.h.

#define PIOS_INCLUDE_LOG_TO_FLASH

Definition at line 98 of file pios_config.h.

#define PIOS_INCLUDE_MAVLINK

Definition at line 58 of file pios_config.h.

#define PIOS_INCLUDE_MPU

Definition at line 49 of file pios_config.h.

#define PIOS_INCLUDE_MPU_MAG

Definition at line 50 of file pios_config.h.

#define PIOS_INCLUDE_MS5611

Definition at line 48 of file pios_config.h.

#define PIOS_INCLUDE_PWM

Definition at line 62 of file pios_config.h.

#define PIOS_INCLUDE_SPI

Definition at line 35 of file pios_config.h.

#define PIOS_INCLUDE_SPI

Definition at line 40 of file pios_config.h.

#define PIOS_INCLUDE_SYS

Definition at line 36 of file pios_config.h.

#define PIOS_INCLUDE_TBSVTXCONFIG

Definition at line 42 of file pios_config.h.

#define PIOS_INCLUDE_USB

Definition at line 38 of file pios_config.h.

#define PIOS_INCLUDE_USB_HID

Definition at line 39 of file pios_config.h.

#define PIOS_INCLUDE_VIDEO

Definition at line 68 of file pios_config.h.

#define PIOS_IRQ_PRIO_HIGH   5

Definition at line 167 of file pios_board.h.

#define PIOS_IRQ_PRIO_HIGHEST   4

Definition at line 168 of file pios_board.h.

#define PIOS_IRQ_PRIO_LOW   12

Definition at line 165 of file pios_board.h.

#define PIOS_IRQ_PRIO_MID   8

Definition at line 166 of file pios_board.h.

#define PIOS_LED_ALARM   PIOS_LED_RED

Definition at line 91 of file pios_board.h.

#define PIOS_LED_BLUE   0

Definition at line 87 of file pios_board.h.

#define PIOS_LED_HEARTBEAT   PIOS_LED_BLUE

Definition at line 90 of file pios_board.h.

#define PIOS_LED_RED   1

Definition at line 88 of file pios_board.h.

#define PIOS_LOGFLASH_SECT_SIZE   0x1000 /* 4kb */

Definition at line 99 of file pios_config.h.

#define PIOS_OMIT_TIM2IRQ

Definition at line 74 of file pios_config.h.

#define PIOS_PERIPHERAL_APB1_CLOCK   (PIOS_SYSCLK / 4)

Definition at line 149 of file pios_board.h.

#define PIOS_PERIPHERAL_APB2_CLOCK   (PIOS_SYSCLK / 2)

Definition at line 159 of file pios_board.h.

#define PIOS_PPM_NUM_INPUTS   12

Definition at line 180 of file pios_board.h.

#define PIOS_PWM_NUM_INPUTS   8

Definition at line 185 of file pios_board.h.

#define PIOS_RCVR_MAX_CHANNELS   12

Definition at line 175 of file pios_board.h.

#define PIOS_SBUS_NUM_INPUTS   (16+2)

Definition at line 201 of file pios_board.h.

#define PIOS_SERVO_UPDATE_HZ   50

Definition at line 206 of file pios_board.h.

#define PIOS_SERVOS_INITIAL_POSITION   0 /* dont want to start motors, have no pulse till settings loaded */

Definition at line 207 of file pios_board.h.

#define PIOS_SYSCLK   168000000

Definition at line 138 of file pios_board.h.

#define PIOS_TIM_MAX_DEVS   8

Definition at line 212 of file pios_board.h.

#define PIOS_TOLERATE_MISSING_SENSORS

Definition at line 55 of file pios_config.h.

#define PIOS_USB_ENABLED   1 /* Should remove all references to this */

Definition at line 222 of file pios_board.h.

#define PIOS_VIDEO_HSYNC_OFFSET   15

Definition at line 70 of file pios_config.h.

#define PIOS_VIDEO_SPLITBUFFER   /* Brain uses 2 1-bit/pixel buffers */

Definition at line 69 of file pios_config.h.

#define PIOS_VIDEO_TIM4_COUNTER

Definition at line 67 of file pios_config.h.

#define PIOS_WATCHDOG_TIMEOUT   250

Definition at line 97 of file pios_board.h.

#define PIOS_WDG_REGISTER   RTC_BKP_DR4

Definition at line 98 of file pios_board.h.

#define STABILIZATION_LQG

Definition at line 35 of file pios_config.h.

#define VREF_PLUS   3.3

Definition at line 217 of file pios_board.h.

Function Documentation

void PIOS_Board_Init ( void  )

Initialise PWM Output for black/white level setting PIOS_Board_Init() initializes all the core subsystems on this specific hardware called from System/openpilot.c

Definition at line 44 of file pios_board.c.

Variable Documentation

const unsigned short level_bits[]
static

Definition at line 316 of file splash.h.

const unsigned short level_mask_bits[]
static

Definition at line 450 of file splash.h.

const unsigned short llama_bits[]
static

Definition at line 584 of file splash.h.

const unsigned short llama_mask_bits[]
static

Definition at line 1023 of file splash.h.

const unsigned short oplogo_bits[]
static

Definition at line 19 of file splash.h.

const unsigned short oplogo_mask_bits[]
static

Definition at line 166 of file splash.h.

uintptr_t pios_com_bridge_id

Definition at line 81 of file pios_hal.c.

uintptr_t pios_com_frsky_sensor_hub_id
uintptr_t pios_com_frsky_sport_id
uintptr_t pios_com_gps_id

Definition at line 80 of file pios_hal.c.

uintptr_t pios_com_hott_id
uintptr_t pios_com_lighttelemetry_id
uintptr_t pios_com_logging_id

Definition at line 50 of file pios_board.c.

uintptr_t pios_com_mavlink_id
uintptr_t pios_com_openlog_logging_id

Definition at line 51 of file pios_board.c.

uintptr_t pios_com_openlog_logging_id

Definition at line 49 of file pios_board.c.

uintptr_t pios_com_storm32bgc_id
uintptr_t pios_com_tbsvtxconfig_id
uintptr_t pios_com_telem_serial_id

Definition at line 127 of file pios_hal.c.

uintptr_t pios_com_telem_usb_id

Definition at line 42 of file pios_board.c.

uintptr_t pios_com_telem_usb_id

Definition at line 42 of file pios_board.c.

uintptr_t pios_com_vcp_id
uintptr_t pios_internal_adc_id

Definition at line 49 of file pios_board.c.

const struct pios_tim_channel pios_tim_rcvrport_all_channels[]
static

Definition at line 1100 of file board_hw_defs.c.

const struct pios_tim_channel pios_tim_servoport_all_pins[]
static

Pios servo configuration structures

Definition at line 751 of file board_hw_defs.c.

const struct pios_tim_channel pios_tim_servoport_rcvrport_pins[]
static

Definition at line 830 of file board_hw_defs.c.

uintptr_t pios_uavo_settings_fs_id

Definition at line 53 of file pios_board.c.

const struct pios_tim_clock_cfg tim_12_cfg
static
Initial value:
= {
.timer = TIM12,
.time_base_init = &tim_12_time_base,
.irq = {
.init = {
.NVIC_IRQChannel = TIM8_BRK_TIM12_IRQn,
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
#define PIOS_IRQ_PRIO_MID
Definition: pios_board.h:170
static const TIM_TimeBaseInitTypeDef tim_12_time_base

Definition at line 702 of file board_hw_defs.c.

const TIM_TimeBaseInitTypeDef tim_12_time_base
static
Initial value:
= {
.TIM_Prescaler = (PIOS_PERIPHERAL_APB1_COUNTER_CLOCK / 1000000) - 1,
.TIM_ClockDivision = TIM_CKD_DIV1,
.TIM_CounterMode = TIM_CounterMode_Up,
.TIM_Period = 0xFFFF,
.TIM_RepetitionCounter = 0x0000,
}

Definition at line 681 of file board_hw_defs.c.

const struct pios_tim_clock_cfg tim_5_cfg
static
Initial value:
= {
.timer = TIM5,
.time_base_init = &tim_5_time_base,
.irq = {
.init = {
.NVIC_IRQChannel = TIM5_IRQn,
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
static const TIM_TimeBaseInitTypeDef tim_5_time_base
#define PIOS_IRQ_PRIO_MID
Definition: pios_board.h:170

Definition at line 726 of file board_hw_defs.c.

const TIM_TimeBaseInitTypeDef tim_5_time_base
static
Initial value:
= {
.TIM_Prescaler = (PIOS_PERIPHERAL_APB1_COUNTER_CLOCK / 1000000) - 1,
.TIM_ClockDivision = TIM_CKD_DIV1,
.TIM_CounterMode = TIM_CounterMode_Up,
.TIM_Period = ((1000000 / PIOS_SERVO_UPDATE_HZ) - 1),
.TIM_RepetitionCounter = 0x0000,
}
#define PIOS_SERVO_UPDATE_HZ
Definition: pios_board.h:209

Definition at line 718 of file board_hw_defs.c.

const struct pios_tim_clock_cfg tim_8_cfg
static
Initial value:
= {
.timer = TIM8,
.time_base_init = &tim_8_time_base,
.irq = {
.init = {
.NVIC_IRQChannel = TIM8_CC_IRQn,
.NVIC_IRQChannelPreemptionPriority = PIOS_IRQ_PRIO_MID,
.NVIC_IRQChannelSubPriority = 0,
.NVIC_IRQChannelCmd = ENABLE,
},
},
}
#define PIOS_IRQ_PRIO_MID
Definition: pios_board.h:170
static const TIM_TimeBaseInitTypeDef tim_8_time_base

Definition at line 689 of file board_hw_defs.c.

const TIM_TimeBaseInitTypeDef tim_8_time_base
static
Initial value:
= {
.TIM_Prescaler = (PIOS_PERIPHERAL_APB2_COUNTER_CLOCK / 1000000) - 1,
.TIM_ClockDivision = TIM_CKD_DIV1,
.TIM_CounterMode = TIM_CounterMode_Up,
.TIM_Period = 0xFFFF,
.TIM_RepetitionCounter = 0x0000,
}

Definition at line 673 of file board_hw_defs.c.