mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-1477 - some cleanup
This commit is contained in:
parent
7e55d6ff41
commit
71af403c9d
@ -58,7 +58,7 @@ static const struct pios_gpio pios_leds_gpsp[] = {
|
||||
.init = {
|
||||
.GPIO_Pin = GPIO_Pin_4,
|
||||
.GPIO_Mode = GPIO_Mode_OUT,
|
||||
.GPIO_OType = GPIO_OType_OD,
|
||||
.GPIO_OType = GPIO_OType_OD,
|
||||
.GPIO_Speed = GPIO_Speed_Level_1,
|
||||
},
|
||||
},
|
||||
@ -89,19 +89,19 @@ void DMA1_Channel2_3_IRQHandler() __attribute__((alias("PIOS_SPI_mag_flash_irq_h
|
||||
static uint32_t pios_spi_mag_flash_id;
|
||||
static const struct pios_spi_cfg pios_spi_mag_flash_cfg = {
|
||||
.remap = GPIO_AF_0,
|
||||
.regs = SPI1,
|
||||
.init = {
|
||||
.regs = SPI1,
|
||||
.init = {
|
||||
.SPI_Mode = SPI_Mode_Master,
|
||||
.SPI_Direction = SPI_Direction_2Lines_FullDuplex,
|
||||
.SPI_DataSize = SPI_DataSize_8b,
|
||||
.SPI_NSS = SPI_NSS_Soft,
|
||||
.SPI_NSS = SPI_NSS_Soft,
|
||||
.SPI_FirstBit = SPI_FirstBit_MSB,
|
||||
.SPI_CRCPolynomial = 7,
|
||||
.SPI_CPOL = SPI_CPOL_High,
|
||||
.SPI_CPHA = SPI_CPHA_2Edge,
|
||||
.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_8,
|
||||
},
|
||||
.dma = {
|
||||
.dma = {
|
||||
.ahb_clk = RCC_AHBPeriph_DMA1,
|
||||
|
||||
.irq = {
|
||||
@ -113,37 +113,37 @@ static const struct pios_spi_cfg pios_spi_mag_flash_cfg = {
|
||||
},
|
||||
},
|
||||
|
||||
.rx = {
|
||||
.rx = {
|
||||
.channel = DMA1_Channel2,
|
||||
.init = {
|
||||
.DMA_PeripheralBaseAddr = (uint32_t)&(SPI1->DR),
|
||||
.DMA_DIR = DMA_DIR_PeripheralSRC,
|
||||
.DMA_PeripheralBaseAddr = (uint32_t)&(SPI1->DR),
|
||||
.DMA_DIR = DMA_DIR_PeripheralSRC,
|
||||
.DMA_PeripheralInc = DMA_PeripheralInc_Disable,
|
||||
.DMA_MemoryInc = DMA_MemoryInc_Enable,
|
||||
.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte,
|
||||
.DMA_MemoryDataSize = DMA_MemoryDataSize_Byte,
|
||||
.DMA_Mode = DMA_Mode_Normal,
|
||||
.DMA_Priority = DMA_Priority_Medium,
|
||||
.DMA_M2M = DMA_M2M_Disable,
|
||||
.DMA_M2M = DMA_M2M_Disable,
|
||||
},
|
||||
},
|
||||
.tx = {
|
||||
.tx = {
|
||||
.channel = DMA1_Channel3,
|
||||
.init = {
|
||||
.DMA_PeripheralBaseAddr = (uint32_t)&(SPI1->DR),
|
||||
.DMA_DIR = DMA_DIR_PeripheralDST,
|
||||
.DMA_PeripheralBaseAddr = (uint32_t)&(SPI1->DR),
|
||||
.DMA_DIR = DMA_DIR_PeripheralDST,
|
||||
.DMA_PeripheralInc = DMA_PeripheralInc_Disable,
|
||||
.DMA_MemoryInc = DMA_MemoryInc_Enable,
|
||||
.DMA_PeripheralDataSize = DMA_PeripheralDataSize_Byte,
|
||||
.DMA_MemoryDataSize = DMA_MemoryDataSize_Byte,
|
||||
.DMA_Mode = DMA_Mode_Normal,
|
||||
.DMA_Priority = DMA_Priority_Medium,
|
||||
.DMA_M2M = DMA_M2M_Disable,
|
||||
.DMA_M2M = DMA_M2M_Disable,
|
||||
},
|
||||
},
|
||||
},
|
||||
.use_crc = false,
|
||||
.sclk = {
|
||||
.sclk = {
|
||||
.gpio = GPIOA,
|
||||
.init = {
|
||||
.GPIO_Pin = GPIO_Pin_5,
|
||||
@ -152,7 +152,7 @@ static const struct pios_spi_cfg pios_spi_mag_flash_cfg = {
|
||||
.GPIO_OType = GPIO_OType_PP,
|
||||
},
|
||||
},
|
||||
.miso = {
|
||||
.miso = {
|
||||
.gpio = GPIOA,
|
||||
.init = {
|
||||
.GPIO_Pin = GPIO_Pin_6,
|
||||
@ -161,7 +161,7 @@ static const struct pios_spi_cfg pios_spi_mag_flash_cfg = {
|
||||
.GPIO_OType = GPIO_OType_OD,
|
||||
},
|
||||
},
|
||||
.mosi = {
|
||||
.mosi = {
|
||||
.gpio = GPIOA,
|
||||
.init = {
|
||||
.GPIO_Pin = GPIO_Pin_7,
|
||||
@ -170,8 +170,8 @@ static const struct pios_spi_cfg pios_spi_mag_flash_cfg = {
|
||||
.GPIO_OType = GPIO_OType_PP,
|
||||
},
|
||||
},
|
||||
.slave_count = 2,
|
||||
.ssel = {
|
||||
.slave_count = 2,
|
||||
.ssel = {
|
||||
{
|
||||
.gpio = GPIOA,
|
||||
.init = {
|
||||
@ -233,7 +233,7 @@ static const struct pios_exti_cfg pios_exti_mag_cfg __exti_config = {
|
||||
},
|
||||
},
|
||||
};
|
||||
#endif
|
||||
#endif /* ifdef PIOS_HMC5x83_HAS_GPIOS */
|
||||
|
||||
static const struct pios_hmc5x83_cfg pios_mag_cfg = {
|
||||
#ifdef PIOS_HMC5x83_HAS_GPIOS
|
||||
@ -241,9 +241,9 @@ static const struct pios_hmc5x83_cfg pios_mag_cfg = {
|
||||
#endif
|
||||
.M_ODR = PIOS_HMC5x83_ODR_75,
|
||||
.Meas_Conf = PIOS_HMC5x83_MEASCONF_NORMAL,
|
||||
.Gain = PIOS_HMC5x83_GAIN_1_9,
|
||||
.Mode = PIOS_HMC5x83_MODE_CONTINUOUS,
|
||||
.Driver = &PIOS_HMC5x83_SPI_DRIVER,
|
||||
.Gain = PIOS_HMC5x83_GAIN_1_9,
|
||||
.Mode = PIOS_HMC5x83_MODE_CONTINUOUS,
|
||||
.Driver = &PIOS_HMC5x83_SPI_DRIVER,
|
||||
};
|
||||
#endif /* PIOS_INCLUDE_HMC5883 */
|
||||
|
||||
@ -255,24 +255,24 @@ static const struct pios_hmc5x83_cfg pios_mag_cfg = {
|
||||
#include "pios_usart_priv.h"
|
||||
|
||||
static const struct pios_usart_cfg pios_usart_generic_main_cfg = {
|
||||
.regs = USART1,
|
||||
.regs = USART1,
|
||||
.remap = GPIO_AF_1,
|
||||
.init = {
|
||||
.init = {
|
||||
.USART_BaudRate = 115200,
|
||||
.USART_WordLength = USART_WordLength_8b,
|
||||
.USART_Parity = USART_Parity_No,
|
||||
.USART_StopBits = USART_StopBits_1,
|
||||
.USART_HardwareFlowControl = USART_HardwareFlowControl_None,
|
||||
.USART_Mode = USART_Mode_Rx | USART_Mode_Tx,
|
||||
.USART_HardwareFlowControl = USART_HardwareFlowControl_None,
|
||||
.USART_Mode = USART_Mode_Rx | USART_Mode_Tx,
|
||||
},
|
||||
.irq = {
|
||||
.init = {
|
||||
.irq = {
|
||||
.init = {
|
||||
.NVIC_IRQChannel = USART1_IRQn,
|
||||
.NVIC_IRQChannelPriority = PIOS_IRQ_PRIO_MID,
|
||||
.NVIC_IRQChannelCmd = ENABLE,
|
||||
},
|
||||
},
|
||||
.rx = {
|
||||
.rx = {
|
||||
.gpio = GPIOA,
|
||||
.init = {
|
||||
.GPIO_Pin = GPIO_Pin_10,
|
||||
@ -281,7 +281,7 @@ static const struct pios_usart_cfg pios_usart_generic_main_cfg = {
|
||||
.GPIO_Mode = GPIO_Mode_AF,
|
||||
},
|
||||
},
|
||||
.tx = {
|
||||
.tx = {
|
||||
.gpio = GPIOA,
|
||||
.init = {
|
||||
.GPIO_Pin = GPIO_Pin_9,
|
||||
@ -311,8 +311,8 @@ void RTC_IRQHandler() __attribute__((alias("PIOS_RTC_IRQ_Handler")));
|
||||
static const struct pios_rtc_cfg pios_rtc_main_cfg = {
|
||||
.clksrc = RCC_RTCCLKSource_LSI,
|
||||
.prescaler = 100,
|
||||
.irq = {
|
||||
.init = {
|
||||
.irq = {
|
||||
.init = {
|
||||
.NVIC_IRQChannel = RTC_IRQn,
|
||||
.NVIC_IRQChannelPriority = PIOS_IRQ_PRIO_MID,
|
||||
.NVIC_IRQChannelCmd = ENABLE,
|
||||
@ -336,52 +336,56 @@ void PIOS_RTC_IRQ_Handler(void)
|
||||
*/
|
||||
|
||||
void PIOS_I2C_gps_irq_handler(void);
|
||||
void I2C2_IRQHandler() __attribute__((alias("PIOS_I2C_gps_irq_handler")));
|
||||
void I2C1_IRQHandler() __attribute__((alias("PIOS_I2C_gps_irq_handler")));
|
||||
|
||||
static const struct pios_i2c_adapter_cfg pios_i2c_gps_cfg = {
|
||||
.regs = I2C2,
|
||||
.init = {
|
||||
.I2C_Mode = I2C_Mode_I2C,
|
||||
.I2C_OwnAddress1 = 0,
|
||||
.I2C_Ack = I2C_Ack_Enable,
|
||||
.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit,
|
||||
/* (3) Timing register value is computed with the AN4235 xls file,
|
||||
fast Mode @400kHz with I2CCLK = 48MHz, rise time = 140ns,
|
||||
fall time = 40ns */
|
||||
.I2C_Timing = (uint32_t)0x00B01A4B,
|
||||
.remap = GPIO_AF_1,
|
||||
.regs = I2C1,
|
||||
.init = {
|
||||
.I2C_Mode = I2C_Mode_I2C,
|
||||
.I2C_AnalogFilter = I2C_AnalogFilter_Enable,
|
||||
.I2C_DigitalFilter = 0x00,
|
||||
.I2C_OwnAddress1 = 0x00,
|
||||
.I2C_Ack = I2C_Ack_Enable,
|
||||
.I2C_AcknowledgedAddress = I2C_AcknowledgedAddress_7bit,
|
||||
.I2C_Timing = (uint32_t)0x00210507,
|
||||
},
|
||||
.transfer_timeout_ms = 50,
|
||||
.scl = {
|
||||
.transfer_timeout_ms = 50,
|
||||
.scl = {
|
||||
.gpio = GPIOB,
|
||||
.init = {
|
||||
.GPIO_Pin = GPIO_Pin_6,
|
||||
.GPIO_Speed = GPIO_Speed_2MHz,
|
||||
.GPIO_OType = GPIO_OType_OD,
|
||||
.GPIO_PuPd = GPIO_PuPd_NOPULL,
|
||||
.GPIO_Mode = GPIO_Mode_AF,
|
||||
.GPIO_Pin = GPIO_Pin_10,
|
||||
},
|
||||
.pin_source = GPIO_PinSource6,
|
||||
},
|
||||
.sda = {
|
||||
.sda = {
|
||||
.gpio = GPIOB,
|
||||
.init = {
|
||||
.GPIO_Pin = GPIO_Pin_11,
|
||||
.GPIO_Pin = GPIO_Pin_7,
|
||||
.GPIO_Speed = GPIO_Speed_2MHz,
|
||||
.GPIO_OType = GPIO_OType_OD,
|
||||
.GPIO_PuPd = GPIO_PuPd_NOPULL,
|
||||
.GPIO_Mode = GPIO_Mode_AF,
|
||||
},
|
||||
.pin_source = GPIO_PinSource7,
|
||||
},
|
||||
.event = {
|
||||
.flags = 0, /* FIXME: check this */
|
||||
.event = {
|
||||
.flags = 0,
|
||||
.init = {
|
||||
.NVIC_IRQChannel = I2C2_IRQn,
|
||||
.NVIC_IRQChannelPriority = PIOS_IRQ_PRIO_HIGHEST,
|
||||
.NVIC_IRQChannel = I2C1_IRQn,
|
||||
.NVIC_IRQChannelPriority = PIOS_IRQ_PRIO_HIGH,
|
||||
.NVIC_IRQChannelCmd = ENABLE,
|
||||
},
|
||||
},
|
||||
.error = {
|
||||
.flags = 0, /* FIXME: check this */
|
||||
.error = {
|
||||
.flags = 0,
|
||||
.init = {
|
||||
.NVIC_IRQChannel = I2C2_IRQn,
|
||||
.NVIC_IRQChannelPriority = PIOS_IRQ_PRIO_HIGHEST,
|
||||
.NVIC_IRQChannel = I2C1_IRQn,
|
||||
.NVIC_IRQChannelPriority = PIOS_IRQ_PRIO_HIGH,
|
||||
.NVIC_IRQChannelCmd = ENABLE,
|
||||
},
|
||||
},
|
||||
@ -395,7 +399,6 @@ void PIOS_I2C_gps_irq_handler(void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif /* PIOS_INCLUDE_I2C */
|
||||
|
||||
#if defined(PIOS_INCLUDE_COM_MSG)
|
||||
|
@ -59,9 +59,9 @@ uint8_t tempcount = 0;
|
||||
|
||||
/* Extern variables ----------------------------------------------------------*/
|
||||
DFUStates DeviceState;
|
||||
int16_t status = 0;
|
||||
bool JumpToApp = false;
|
||||
bool GO_dfu = false;
|
||||
int16_t status = 0;
|
||||
bool JumpToApp = false;
|
||||
bool GO_dfu = false;
|
||||
bool User_DFU_request = false;
|
||||
static uint8_t mReceive_Buffer[63];
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
|
@ -67,12 +67,14 @@ void PIOS_Board_Init(void)
|
||||
board_init_complete = true;
|
||||
}
|
||||
|
||||
void setupCom(){
|
||||
void setupCom()
|
||||
{
|
||||
uint32_t pios_usart_generic_id;
|
||||
|
||||
if (PIOS_USART_Init(&pios_usart_generic_id, &pios_usart_generic_main_cfg)) {
|
||||
PIOS_Assert(0);
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
if (PIOS_COM_MSG_Init(&PIOS_COM_TELEM_USB, &pios_usart_com_driver, pios_usart_generic_id)) {
|
||||
PIOS_Assert(0);
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
}
|
||||
|
@ -51,8 +51,8 @@ SRC += $(CMSIS_DEVICEDIR)/system_stm32f0xx.c
|
||||
SRC += $(OPSYSTEM)/gpsp.c
|
||||
SRC += $(OPSYSTEM)/pios_board.c
|
||||
#SRC += $(FLIGHTLIB)/alarms.c
|
||||
SRC += $(OPUAVOBJ)/uavobjectmanager.c
|
||||
SRC += $(OPUAVOBJ)/eventdispatcher.c
|
||||
#SRC += $(OPUAVOBJ)/uavobjectmanager.c
|
||||
#SRC += $(OPUAVOBJ)/eventdispatcher.c
|
||||
|
||||
SRC += $(PIOSCOMMON)/pios_hmc5x83.c
|
||||
|
||||
|
@ -1,22 +1,22 @@
|
||||
/*
|
||||
FreeRTOS V8.0.0 - Copyright (C) 2014 Real Time Engineers Ltd.
|
||||
FreeRTOS V8.0.0 - Copyright (C) 2014 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that has become a de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly and support the FreeRTOS *
|
||||
* project by purchasing a FreeRTOS tutorial book, reference *
|
||||
* manual, or both from: http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
* Thank you! *
|
||||
* *
|
||||
***************************************************************************
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that has become a de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly and support the FreeRTOS *
|
||||
* project by purchasing a FreeRTOS tutorial book, reference *
|
||||
* manual, or both from: http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
* Thank you! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
@ -36,14 +36,14 @@
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Having a problem? Start by reading the FAQ "My application does *
|
||||
* not run, what could be wrong?" *
|
||||
* *
|
||||
* http://www.FreeRTOS.org/FAQHelp.html *
|
||||
* *
|
||||
***************************************************************************
|
||||
***************************************************************************
|
||||
* *
|
||||
* Having a problem? Start by reading the FAQ "My application does *
|
||||
* not run, what could be wrong?" *
|
||||
* *
|
||||
* http://www.FreeRTOS.org/FAQHelp.html *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
|
||||
license and Real Time Engineers Ltd. contact details.
|
||||
@ -61,23 +61,23 @@
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Application specific definitions.
|
||||
*
|
||||
* These definitions should be adjusted for your particular hardware and
|
||||
* application requirements.
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
* Application specific definitions.
|
||||
*
|
||||
* These definitions should be adjusted for your particular hardware and
|
||||
* application requirements.
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @addtogroup PIOS PIOS
|
||||
@ -90,33 +90,33 @@
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 1
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( 48000000 )
|
||||
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
|
||||
#define configMAX_PRIORITIES ( 5 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 )
|
||||
#define configCPU_CLOCK_HZ (48000000)
|
||||
#define configTICK_RATE_HZ ((TickType_t)1000)
|
||||
#define configMAX_PRIORITIES (5)
|
||||
#define configMINIMAL_STACK_SIZE ((unsigned short)40)
|
||||
#define configTOTAL_HEAP_SIZE ((size_t)(2048))
|
||||
#define configMAX_TASK_NAME_LEN ( 5 )
|
||||
#define configMAX_TASK_NAME_LEN (5)
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
#define configUSE_MUTEXES 1
|
||||
#define configQUEUE_REGISTRY_SIZE 4
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
#define configUSE_RECURSIVE_MUTEXES 1
|
||||
#define configUSE_MALLOC_FAILED_HOOK 1
|
||||
#define configUSE_APPLICATION_TASK_TAG 0
|
||||
#define configUSE_COUNTING_SEMAPHORES 1
|
||||
#define configGENERATE_RUN_TIME_STATS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
#define configUSE_MUTEXES 1
|
||||
#define configQUEUE_REGISTRY_SIZE 0
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
#define configUSE_RECURSIVE_MUTEXES 1
|
||||
#define configUSE_MALLOC_FAILED_HOOK 1
|
||||
#define configUSE_APPLICATION_TASK_TAG 0
|
||||
#define configUSE_COUNTING_SEMAPHORES 1
|
||||
#define configGENERATE_RUN_TIME_STATS 0
|
||||
|
||||
/* Co-routine definitions. */
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES (2)
|
||||
|
||||
/* Software timer definitions. */
|
||||
#define configUSE_TIMERS 1
|
||||
#define configTIMER_TASK_PRIORITY ( 2 )
|
||||
#define configTIMER_QUEUE_LENGTH 5
|
||||
#define configTIMER_TASK_STACK_DEPTH ( 80 )
|
||||
#define configUSE_TIMERS 0
|
||||
#define configTIMER_TASK_PRIORITY (2)
|
||||
#define configTIMER_QUEUE_LENGTH 5
|
||||
#define configTIMER_TASK_STACK_DEPTH (80)
|
||||
|
||||
/* Set the following definitions to 1 to include the API function, or zero
|
||||
to exclude the API function. */
|
||||
@ -135,7 +135,7 @@
|
||||
/* This is the raw value as per the Cortex-M3 NVIC. Values can be 255
|
||||
(lowest) to 1 (highest maskable) to 0 (highest non-maskable). */
|
||||
#define configKERNEL_INTERRUPT_PRIORITY 15 << 4 /* equivalent to NVIC priority 15 */
|
||||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 3 << 4 /* equivalent to NVIC priority 3 */
|
||||
#define configMAX_SYSCALL_INTERRUPT_PRIORITY 3 << 4 /* equivalent to NVIC priority 3 */
|
||||
|
||||
/* This is the value being used as per the ST library which permits 16
|
||||
priority values, 0 to 15. This must correspond to the
|
||||
@ -145,20 +145,21 @@
|
||||
|
||||
|
||||
/* Enable run time stats collection */
|
||||
#define configGENERATE_RUN_TIME_STATS 0
|
||||
#define INCLUDE_uxTaskGetRunTime 0
|
||||
#define INCLUDE_xTaskGetIdleTaskHandle 1
|
||||
|
||||
#define configGENERATE_RUN_TIME_STATS 0
|
||||
#define INCLUDE_uxTaskGetRunTime 0
|
||||
#define INCLUDE_xTaskGetIdleTaskHandle 1
|
||||
|
||||
|
||||
/* Normal assert() semantics without relying on the provision of an assert.h
|
||||
header file. */
|
||||
#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
|
||||
header file. */
|
||||
#define configASSERT(x) \
|
||||
if ((x) == 0) { taskDISABLE_INTERRUPTS(); for (;;) {; } \
|
||||
}
|
||||
|
||||
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
|
||||
standard names - or at least those used in the unmodified vector table. */
|
||||
#define vPortSVCHandler SVC_Handler
|
||||
#define xPortPendSVHandler PendSV_Handler
|
||||
standard names - or at least those used in the unmodified vector table. */
|
||||
#define vPortSVCHandler SVC_Handler
|
||||
#define xPortPendSVHandler PendSV_Handler
|
||||
#define xPortSysTickHandler SysTick_Handler
|
||||
|
||||
/**
|
||||
@ -166,4 +167,3 @@ standard names - or at least those used in the unmodified vector table. */
|
||||
*/
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
||||
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
|
||||
/* PIOS CallbackScheduler support */
|
||||
#define PIOS_INCLUDE_CALLBACKSCHEDULER
|
||||
// #define PIOS_INCLUDE_CALLBACKSCHEDULER
|
||||
|
||||
/* PIOS bootloader helper */
|
||||
#define PIOS_INCLUDE_BL_HELPER
|
||||
@ -55,32 +55,32 @@
|
||||
#define PIOS_INCLUDE_DELAY
|
||||
#define PIOS_INCLUDE_INITCALL
|
||||
#define PIOS_INCLUDE_SYS
|
||||
#define PIOS_INCLUDE_TASK_MONITOR
|
||||
// #define PIOS_INCLUDE_TASK_MONITOR
|
||||
|
||||
/* PIOS hardware peripherals */
|
||||
#define PIOS_INCLUDE_IRQ
|
||||
#define PIOS_INCLUDE_RTC
|
||||
//#define PIOS_INCLUDE_TIM
|
||||
// #define PIOS_INCLUDE_TIM
|
||||
#define PIOS_INCLUDE_USART
|
||||
//#define PIOS_INCLUDE_ADC
|
||||
//#define PIOS_INCLUDE_I2C
|
||||
// #define PIOS_INCLUDE_ADC
|
||||
#define PIOS_INCLUDE_I2C
|
||||
#define PIOS_INCLUDE_SPI
|
||||
#define PIOS_INCLUDE_GPIO
|
||||
#define PIOS_INCLUDE_EXTI
|
||||
//#define PIOS_INCLUDE_WDG
|
||||
// #define PIOS_INCLUDE_WDG
|
||||
|
||||
/* PIOS USB functions */
|
||||
//#define PIOS_INCLUDE_USB
|
||||
//#define PIOS_INCLUDE_USB_HID
|
||||
//#define PIOS_INCLUDE_USB_CDC
|
||||
//#define PIOS_INCLUDE_USB_RCTX
|
||||
// #define PIOS_INCLUDE_USB
|
||||
// #define PIOS_INCLUDE_USB_HID
|
||||
// #define PIOS_INCLUDE_USB_CDC
|
||||
// #define PIOS_INCLUDE_USB_RCTX
|
||||
|
||||
/* PIOS sensor interfaces */
|
||||
//#define PIOS_INCLUDE_ADXL345
|
||||
// #define PIOS_INCLUDE_ADXL345
|
||||
/* #define PIOS_INCLUDE_BMA180 */
|
||||
/* #define PIOS_INCLUDE_L3GD20 */
|
||||
//#define PIOS_INCLUDE_MPU6000
|
||||
//#define PIOS_MPU6000_ACCEL
|
||||
// #define PIOS_INCLUDE_MPU6000
|
||||
// #define PIOS_MPU6000_ACCEL
|
||||
/* #define PIOS_INCLUDE_HMC5843 */
|
||||
/* #define PIOS_INCLUDE_HMC5883 */
|
||||
#define PIOS_INCLUDE_HMC5X83
|
||||
@ -92,28 +92,28 @@
|
||||
/* #define PIOS_INCLUDE_HCSR04 */
|
||||
|
||||
/* PIOS receiver drivers */
|
||||
//#define PIOS_INCLUDE_PWM
|
||||
//#define PIOS_INCLUDE_PPM
|
||||
//#define PIOS_INCLUDE_PPM_FLEXI
|
||||
//#define PIOS_INCLUDE_DSM
|
||||
//#define PIOS_INCLUDE_SBUS
|
||||
//#define PIOS_INCLUDE_GCSRCVR
|
||||
//#define PIOS_INCLUDE_OPLINKRCVR
|
||||
// #define PIOS_INCLUDE_PWM
|
||||
// #define PIOS_INCLUDE_PPM
|
||||
// #define PIOS_INCLUDE_PPM_FLEXI
|
||||
// #define PIOS_INCLUDE_DSM
|
||||
// #define PIOS_INCLUDE_SBUS
|
||||
// #define PIOS_INCLUDE_GCSRCVR
|
||||
// #define PIOS_INCLUDE_OPLINKRCVR
|
||||
|
||||
/* PIOS abstract receiver interface */
|
||||
//#define PIOS_INCLUDE_RCVR
|
||||
// #define PIOS_INCLUDE_RCVR
|
||||
|
||||
/* PIOS common peripherals */
|
||||
#define PIOS_INCLUDE_LED
|
||||
#define PIOS_INCLUDE_IAP
|
||||
//#define PIOS_INCLUDE_SERVO
|
||||
// #define PIOS_INCLUDE_SERVO
|
||||
/* #define PIOS_INCLUDE_I2C_ESC */
|
||||
/* #define PIOS_INCLUDE_OVERO */
|
||||
/* #define PIOS_OVERO_SPI */
|
||||
/* #define PIOS_INCLUDE_SDCARD */
|
||||
/* #define LOG_FILENAME "startup.log" */
|
||||
//#define PIOS_INCLUDE_FLASH
|
||||
//#define PIOS_INCLUDE_FLASH_LOGFS_SETTINGS
|
||||
// #define PIOS_INCLUDE_FLASH
|
||||
// #define PIOS_INCLUDE_FLASH_LOGFS_SETTINGS
|
||||
/* #define FLASH_FREERTOS */
|
||||
/* #define PIOS_INCLUDE_FLASH_EEPROM */
|
||||
/* #define PIOS_INCLUDE_FLASH_INTERNAL */
|
||||
@ -133,41 +133,41 @@
|
||||
#define PIOS_INCLUDE_COM
|
||||
#define PIOS_INCLUDE_DEBUG_CONSOLE
|
||||
/* #define PIOS_INCLUDE_COM_MSG */
|
||||
//#define PIOS_INCLUDE_TELEMETRY_RF
|
||||
// #define PIOS_INCLUDE_TELEMETRY_RF
|
||||
/* #define PIOS_INCLUDE_COM_TELEM */
|
||||
/* #define PIOS_INCLUDE_COM_FLEXI */
|
||||
/* #define PIOS_INCLUDE_COM_AUX */
|
||||
/* #define PIOS_TELEM_PRIORITY_QUEUE */
|
||||
//#define PIOS_INCLUDE_GPS
|
||||
//#define PIOS_GPS_MINIMAL
|
||||
//#define PIOS_INCLUDE_GPS_NMEA_PARSER
|
||||
//#define PIOS_INCLUDE_GPS_UBX_PARSER
|
||||
// #define PIOS_INCLUDE_GPS
|
||||
// #define PIOS_GPS_MINIMAL
|
||||
// #define PIOS_INCLUDE_GPS_NMEA_PARSER
|
||||
// #define PIOS_INCLUDE_GPS_UBX_PARSER
|
||||
/* #define PIOS_GPS_SETS_HOMELOCATION */
|
||||
|
||||
/* Stabilization options */
|
||||
/* #define PIOS_QUATERNION_STABILIZATION */
|
||||
|
||||
/* Alarm Thresholds */
|
||||
#define HEAP_LIMIT_WARNING 220
|
||||
#define HEAP_LIMIT_CRITICAL 40
|
||||
#define IRQSTACK_LIMIT_WARNING 100
|
||||
#define IRQSTACK_LIMIT_CRITICAL 60
|
||||
#define CPULOAD_LIMIT_WARNING 85
|
||||
#define CPULOAD_LIMIT_CRITICAL 95
|
||||
#define HEAP_LIMIT_WARNING 220
|
||||
#define HEAP_LIMIT_CRITICAL 40
|
||||
#define IRQSTACK_LIMIT_WARNING 100
|
||||
#define IRQSTACK_LIMIT_CRITICAL 60
|
||||
#define CPULOAD_LIMIT_WARNING 85
|
||||
#define CPULOAD_LIMIT_CRITICAL 95
|
||||
|
||||
/* Task stack sizes */
|
||||
//#define PIOS_ACTUATOR_STACK_SIZE 1020
|
||||
//#define PIOS_MANUAL_STACK_SIZE 850
|
||||
//#ifdef DIAG_TASKS
|
||||
//#define PIOS_SYSTEM_STACK_SIZE 720
|
||||
//#else
|
||||
//#define PIOS_SYSTEM_STACK_SIZE 660
|
||||
//#endif
|
||||
//#define PIOS_TELEM_STACK_SIZE 540
|
||||
//#define PIOS_EVENTDISPATCHER_STACK_SIZE 160
|
||||
// #define PIOS_ACTUATOR_STACK_SIZE 1020
|
||||
// #define PIOS_MANUAL_STACK_SIZE 850
|
||||
// #ifdef DIAG_TASKS
|
||||
// #define PIOS_SYSTEM_STACK_SIZE 720
|
||||
// #else
|
||||
// #define PIOS_SYSTEM_STACK_SIZE 660
|
||||
// #endif
|
||||
// #define PIOS_TELEM_STACK_SIZE 540
|
||||
// #define PIOS_EVENTDISPATCHER_STACK_SIZE 160
|
||||
|
||||
/* This can't be too high to stop eventdispatcher thread overflowing */
|
||||
//#define PIOS_EVENTDISAPTCHER_QUEUE 10
|
||||
// #define PIOS_EVENTDISAPTCHER_QUEUE 10
|
||||
|
||||
/* Revolution series */
|
||||
/* #define REVOLUTION */
|
||||
|
@ -43,12 +43,11 @@
|
||||
*/
|
||||
#include "../board_hw_defs.c"
|
||||
|
||||
#define PIOS_COM_MAIN_RX_BUF_LEN 16
|
||||
#define PIOS_COM_MAIN_TX_BUF_LEN 255
|
||||
#define PIOS_COM_MAIN_RX_BUF_LEN 16
|
||||
#define PIOS_COM_MAIN_TX_BUF_LEN 128
|
||||
|
||||
uint32_t pios_com_main_id;
|
||||
|
||||
|
||||
/**
|
||||
* PIOS_Board_Init()
|
||||
* initializes all the core subsystems on this specific hardware
|
||||
@ -80,10 +79,7 @@ void PIOS_Board_Init(void)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/* Initialize the task monitor */
|
||||
if (PIOS_TASK_MONITOR_Initialize(3)) {
|
||||
PIOS_Assert(0);
|
||||
}
|
||||
|
||||
#if defined(PIOS_INCLUDE_RTC)
|
||||
/* Initialize the real-time clock and its associated tick */
|
||||
PIOS_RTC_Init(&pios_rtc_main_cfg);
|
||||
@ -127,7 +123,6 @@ if (PIOS_TASK_MONITOR_Initialize(3)) {
|
||||
}
|
||||
}
|
||||
#endif /* PIOS_INCLUDE_I2C */
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -98,8 +98,8 @@
|
||||
// See also pios_board.c
|
||||
// ------------------------
|
||||
#define PIOS_I2C_MAX_DEVS 1
|
||||
extern uint32_t pios_i2c_gps_adapter_id;
|
||||
#define PIOS_I2C_GPS (pios_i2c_gps_adapter_id)
|
||||
extern uint32_t pios_i2c_gps_id;
|
||||
#define PIOS_I2C_GPS (pios_i2c_gps_id)
|
||||
|
||||
// -------------------------
|
||||
// SPI
|
||||
|
Loading…
Reference in New Issue
Block a user