2013-05-19 16:37:30 +02:00
|
|
|
|
/**
|
2013-04-05 22:46:56 +02:00
|
|
|
|
******************************************************************************
|
|
|
|
|
*
|
|
|
|
|
* @file pios_board.h
|
2016-09-26 23:17:04 +02:00
|
|
|
|
* @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016.
|
|
|
|
|
* The OpenPilot Team, http://www.openpilot.org Copyright (C) 2013.
|
2013-05-26 08:12:35 +02:00
|
|
|
|
* @brief Defines PiOS board hardware for the OpenPilot OPLink Mini board.
|
2013-04-05 22:46:56 +02:00
|
|
|
|
* @see The GNU Public License (GPL) Version 3
|
|
|
|
|
*
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
/*
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
|
* for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
*/
|
|
|
|
|
|
2013-04-14 01:34:43 +02:00
|
|
|
|
#ifndef PIOS_BOARD_H
|
|
|
|
|
#define PIOS_BOARD_H
|
2013-04-05 22:46:56 +02:00
|
|
|
|
#define ADD_ONE_ADC
|
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// Timers and Channels Used
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
/*
|
2013-05-19 16:37:30 +02:00
|
|
|
|
Timer | Channel 1 | Channel 2 | Channel 3 | Channel 4
|
|
|
|
|
------+-----------+-----------+-----------+----------
|
|
|
|
|
TIM1 | Servo 4 | | |
|
|
|
|
|
TIM2 | RC In 5 | RC In 6 | Servo 6 |
|
|
|
|
|
TIM3 | Servo 5 | RC In 2 | RC In 3 | RC In 4
|
|
|
|
|
TIM4 | RC In 1 | Servo 3 | Servo 2 | Servo 1
|
|
|
|
|
------+-----------+-----------+-----------+----------
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
// ------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// DMA Channels Used
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
|
|
|
|
/* Channel 1 - */
|
|
|
|
|
/* Channel 2 - */
|
|
|
|
|
/* Channel 3 - */
|
|
|
|
|
/* Channel 4 - */
|
|
|
|
|
/* Channel 5 - */
|
|
|
|
|
/* Channel 6 - */
|
|
|
|
|
/* Channel 7 - */
|
|
|
|
|
/* Channel 8 - */
|
|
|
|
|
/* Channel 9 - */
|
|
|
|
|
/* Channel 10 - */
|
|
|
|
|
/* Channel 11 - */
|
|
|
|
|
/* Channel 12 - */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// BOOTLOADER_SETTINGS
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
|
|
|
|
#define BOARD_READABLE TRUE
|
|
|
|
|
#define BOARD_WRITABLE TRUE
|
|
|
|
|
#define MAX_DEL_RETRYS 3
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// WATCHDOG_SETTINGS
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
|
|
|
|
#define PIOS_WATCHDOG_TIMEOUT 500
|
|
|
|
|
#define PIOS_WDG_REGISTER BKP_DR4
|
|
|
|
|
#define PIOS_WDG_TELEMETRYTX 0x0001
|
|
|
|
|
#define PIOS_WDG_TELEMETRYRX 0x0002
|
2017-03-31 05:06:03 +02:00
|
|
|
|
#define PIOS_WDG_TELEMRADIOTX 0x0004
|
|
|
|
|
#define PIOS_WDG_TELEMRADIORX 0x0008
|
2013-06-16 17:48:18 +02:00
|
|
|
|
#define PIOS_WDG_RFM22B 0x000f
|
|
|
|
|
#define PIOS_WDG_PPMINPUT 0x0010
|
2013-05-19 16:37:30 +02:00
|
|
|
|
|
|
|
|
|
// ------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// TELEMETRY
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
|
|
|
|
#define TELEM_QUEUE_SIZE 20
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// PIOS_LED
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
|
|
|
|
#define PIOS_LED_USB 0
|
|
|
|
|
#define PIOS_LED_LINK 1
|
|
|
|
|
#define PIOS_LED_RX 2
|
|
|
|
|
#define PIOS_LED_TX 3
|
2013-04-05 22:46:56 +02:00
|
|
|
|
#ifdef PIOS_RFM22B_DEBUG_ON_TELEM
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define PIOS_LED_D1 4
|
|
|
|
|
#define PIOS_LED_D2 5
|
|
|
|
|
#define PIOS_LED_D3 6
|
|
|
|
|
#define PIOS_LED_D4 7
|
2013-04-05 22:46:56 +02:00
|
|
|
|
#endif
|
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define PIOS_LED_HEARTBEAT PIOS_LED_LINK
|
|
|
|
|
#define PIOS_LED_ALARM PIOS_LED_TX
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define USB_LED_ON PIOS_LED_On(PIOS_LED_USB)
|
|
|
|
|
#define USB_LED_OFF PIOS_LED_Off(PIOS_LED_USB)
|
|
|
|
|
#define USB_LED_TOGGLE PIOS_LED_Toggle(PIOS_LED_USB)
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define LINK_LED_ON PIOS_LED_On(PIOS_LED_LINK)
|
|
|
|
|
#define LINK_LED_OFF PIOS_LED_Off(PIOS_LED_LINK)
|
|
|
|
|
#define LINK_LED_TOGGLE PIOS_LED_Toggle(PIOS_LED_LINK)
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define RX_LED_ON PIOS_LED_On(PIOS_LED_RX)
|
|
|
|
|
#define RX_LED_OFF PIOS_LED_Off(PIOS_LED_RX)
|
|
|
|
|
#define RX_LED_TOGGLE PIOS_LED_Toggle(PIOS_LED_RX)
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define TX_LED_ON PIOS_LED_On(PIOS_LED_TX)
|
|
|
|
|
#define TX_LED_OFF PIOS_LED_Off(PIOS_LED_TX)
|
|
|
|
|
#define TX_LED_TOGGLE PIOS_LED_Toggle(PIOS_LED_TX)
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
|
|
|
|
#ifdef PIOS_RFM22B_DEBUG_ON_TELEM
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define D1_LED_ON PIOS_LED_On(PIOS_LED_D1)
|
|
|
|
|
#define D1_LED_OFF PIOS_LED_Off(PIOS_LED_D1)
|
|
|
|
|
#define D1_LED_TOGGLE PIOS_LED_Toggle(PIOS_LED_D1)
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define D2_LED_ON PIOS_LED_On(PIOS_LED_D2)
|
|
|
|
|
#define D2_LED_OFF PIOS_LED_Off(PIOS_LED_D2)
|
|
|
|
|
#define D2_LED_TOGGLE PIOS_LED_Toggle(PIOS_LED_D2)
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define D3_LED_ON PIOS_LED_On(PIOS_LED_D3)
|
|
|
|
|
#define D3_LED_OFF PIOS_LED_Off(PIOS_LED_D3)
|
|
|
|
|
#define D3_LED_TOGGLE PIOS_LED_Toggle(PIOS_LED_D3)
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define D4_LED_ON PIOS_LED_On(PIOS_LED_D4)
|
|
|
|
|
#define D4_LED_OFF PIOS_LED_Off(PIOS_LED_D4)
|
|
|
|
|
#define D4_LED_TOGGLE PIOS_LED_Toggle(PIOS_LED_D4)
|
2013-04-05 22:46:56 +02:00
|
|
|
|
#endif
|
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// System Settings
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2017-01-11 09:00:23 +01:00
|
|
|
|
#define PIOS_MASTER_CLOCK 72000000
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// Interrupt Priorities
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2017-01-11 09:00:23 +01:00
|
|
|
|
#define PIOS_IRQ_PRIO_LOW 12 // lower than RTOS
|
|
|
|
|
#define PIOS_IRQ_PRIO_MID 8 // higher than RTOS
|
|
|
|
|
#define PIOS_IRQ_PRIO_HIGH 5 // for SPI, ADC, I2C etc...
|
|
|
|
|
#define PIOS_IRQ_PRIO_HIGHEST 4 // for USART etc...
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// PIOS_I2C
|
|
|
|
|
// See also pios_board.c
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
|
|
|
|
#define PIOS_I2C_MAX_DEVS 1
|
2013-04-05 22:46:56 +02:00
|
|
|
|
extern uint32_t pios_i2c_flexi_adapter_id;
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define PIOS_I2C_MAIN_ADAPTER (pios_i2c_flexi_adapter_id)
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// PIOS_SPI
|
|
|
|
|
// See also pios_board.c
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
|
|
|
|
#define PIOS_SPI_MAX_DEVS 1
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// PIOS_USART
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
|
|
|
|
#define PIOS_USART_MAX_DEVS 3
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// PIOS_COM
|
|
|
|
|
//
|
|
|
|
|
// See also pios_board.c
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
|
|
|
|
#define PIOS_COM_MAX_DEVS 5
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2017-03-31 05:06:03 +02:00
|
|
|
|
// The direct com ports
|
|
|
|
|
extern uint32_t pios_com_hid_id;
|
2016-08-11 13:15:52 +02:00
|
|
|
|
extern uint32_t pios_com_vcp_id;
|
2017-03-31 05:06:03 +02:00
|
|
|
|
extern uint32_t pios_com_main_id;
|
|
|
|
|
extern uint32_t pios_com_flexi_id;
|
|
|
|
|
extern uint32_t pios_com_pri_radio_id;
|
|
|
|
|
extern uint32_t pios_com_aux_radio_id;
|
|
|
|
|
// The port that the GCS is connected to
|
|
|
|
|
extern uint32_t pios_com_gcs_id;
|
|
|
|
|
// The destination port from the GCS port
|
|
|
|
|
extern uint32_t pios_com_gcs_out_id;
|
|
|
|
|
// The destination port from the VCP com bridge
|
|
|
|
|
extern uint32_t pios_com_bridge_id;
|
|
|
|
|
// The destination port for the primary radio port
|
|
|
|
|
extern uint32_t pios_com_pri_radio_out_id;
|
|
|
|
|
// The destination port for the auxiliary radio port.
|
|
|
|
|
extern uint32_t pios_com_aux_radio_out_id;
|
|
|
|
|
// The PPM IDs
|
2013-04-05 22:46:56 +02:00
|
|
|
|
extern uint32_t pios_ppm_rcvr_id;
|
|
|
|
|
extern uint32_t pios_ppm_out_id;
|
2017-03-31 05:06:03 +02:00
|
|
|
|
#define PIOS_COM_HID (pios_com_hid_id)
|
|
|
|
|
#define PIOS_COM_VCP (pios_com_vcp_id)
|
|
|
|
|
#define PIOS_COM_MAIN (pios_com_main_id)
|
|
|
|
|
#define PIOS_COM_FLEXI (pios_com_flexi_id)
|
|
|
|
|
#define PIOS_COM_PRI_RADIO (pios_com_pri_radio_id)
|
|
|
|
|
#define PIOS_COM_AUX_RADIO (pios_com_aux_radio_id)
|
|
|
|
|
#define PIOS_COM_PRI_RADIO_OUT (pios_com_pri_radio_out_id)
|
|
|
|
|
#define PIOS_COM_AUX_RADIO_OUT (pios_com_aux_radio_out_id)
|
|
|
|
|
#define PIOS_COM_GCS (pios_com_gcs_id)
|
|
|
|
|
#define PIOS_COM_GCS_OUT (pios_com_gcs_out_id)
|
|
|
|
|
#define PIOS_COM_BRIDGE (pios_com_bridge_id)
|
|
|
|
|
#define PIOS_PPM_RECEIVER (pios_ppm_rcvr_id)
|
|
|
|
|
#define PIOS_PPM_OUTPUT (pios_ppm_out_id)
|
|
|
|
|
#define RFM22_DEBUG 1
|
2013-05-19 16:37:30 +02:00
|
|
|
|
|
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// ADC
|
|
|
|
|
// None
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
|
|
|
|
// #define PIOS_ADC_OVERSAMPLING_RATE 1
|
|
|
|
|
#define PIOS_ADC_USE_TEMP_SENSOR 0
|
|
|
|
|
#define PIOS_ADC_TEMP_SENSOR_ADC ADC1
|
|
|
|
|
#define PIOS_ADC_TEMP_SENSOR_ADC_CHANNEL 1
|
|
|
|
|
|
|
|
|
|
#define PIOS_ADC_NUM_PINS 0
|
|
|
|
|
|
|
|
|
|
#define PIOS_ADC_PORTS {}
|
|
|
|
|
#define PIOS_ADC_PINS {}
|
|
|
|
|
#define PIOS_ADC_CHANNELS {}
|
|
|
|
|
#define PIOS_ADC_MAPPING {}
|
|
|
|
|
#define PIOS_ADC_CHANNEL_MAPPING {}
|
|
|
|
|
#define PIOS_ADC_NUM_CHANNELS (PIOS_ADC_NUM_PINS + PIOS_ADC_USE_TEMP_SENSOR)
|
|
|
|
|
#define PIOS_ADC_NUM_ADC_CHANNELS 0
|
|
|
|
|
#define PIOS_ADC_USE_ADC2 0
|
|
|
|
|
#define PIOS_ADC_CLOCK_FUNCTION RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1 | RCC_APB2Periph_ADC2, ENABLE)
|
|
|
|
|
#define PIOS_ADC_ADCCLK RCC_PCLK2_Div8
|
2013-04-05 22:46:56 +02:00
|
|
|
|
/* RCC_PCLK2_Div2: ADC clock = PCLK2/2 */
|
|
|
|
|
/* RCC_PCLK2_Div4: ADC clock = PCLK2/4 */
|
|
|
|
|
/* RCC_PCLK2_Div6: ADC clock = PCLK2/6 */
|
|
|
|
|
/* RCC_PCLK2_Div8: ADC clock = PCLK2/8 */
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define PIOS_ADC_SAMPLE_TIME ADC_SampleTime_239Cycles5
|
2013-04-05 22:46:56 +02:00
|
|
|
|
/* Sample time: */
|
|
|
|
|
/* With an ADCCLK = 14 MHz and a sampling time of 239.5 cycles: */
|
|
|
|
|
/* Tconv = 239.5 + 12.5 = 252 cycles = 18<31>s */
|
|
|
|
|
/* (1 / (ADCCLK / CYCLES)) = Sample Time (<28>S) */
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define PIOS_ADC_IRQ_PRIO PIOS_IRQ_PRIO_LOW
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
|
|
|
|
// Currently analog acquistion hard coded at 480 Hz
|
|
|
|
|
// PCKL2 = HCLK / 16
|
|
|
|
|
// ADCCLK = PCLK2 / 2
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define PIOS_ADC_RATE (72.0e6 / 1.0 / 8.0 / 252.0 / (PIOS_ADC_NUM_CHANNELS >> PIOS_ADC_USE_ADC2))
|
|
|
|
|
#define PIOS_ADC_MAX_OVERSAMPLING 36
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-06-24 18:50:44 +02:00
|
|
|
|
#define PIOS_ADC_TEMPERATURE_PIN 0
|
2013-06-15 18:47:33 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// PIOS_RCVR
|
|
|
|
|
// See also pios_board.c
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// ------------------------
|
|
|
|
|
#define PIOS_RCVR_MAX_DEVS 3
|
|
|
|
|
#define PIOS_RCVR_MAX_CHANNELS 12
|
|
|
|
|
#define PIOS_GCSRCVR_TIMEOUT_MS 100
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// Receiver PPM input
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
|
|
|
|
#define PIOS_PPM_MAX_DEVS 1
|
2016-01-23 16:09:08 +01:00
|
|
|
|
#define PIOS_PPM_NUM_INPUTS 12
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-07-04 03:58:34 +02:00
|
|
|
|
// -------------------------
|
|
|
|
|
// Receiver PWM inputs
|
|
|
|
|
// -------------------------
|
|
|
|
|
#define PIOS_PWM_NUM_INPUTS 4
|
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// Servo outputs
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
|
|
|
|
#define PIOS_SERVO_UPDATE_HZ 50
|
|
|
|
|
#define PIOS_SERVOS_INITIAL_POSITION 0 /* dont want to start motors, have no pulse till settings loaded */
|
2015-01-24 13:08:56 +01:00
|
|
|
|
#define PIOS_SERVO_BANKS 6
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// --------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// Timer controller settings
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// --------------------------
|
|
|
|
|
#define PIOS_TIM_MAX_DEVS 3
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// GPIO
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
|
|
|
|
#define PIOS_GPIO_PORTS {}
|
|
|
|
|
#define PIOS_GPIO_PINS {}
|
|
|
|
|
#define PIOS_GPIO_CLKS {}
|
|
|
|
|
#define PIOS_GPIO_NUM 0
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// USB
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
|
|
|
|
#define PIOS_USB_HID_MAX_DEVS 1
|
|
|
|
|
#define PIOS_USB_ENABLED 1
|
|
|
|
|
#define PIOS_USB_HID_MAX_DEVS 1
|
|
|
|
|
#define PIOS_USB_MAX_DEVS 1
|
|
|
|
|
#define PIOS_USB_DETECT_GPIO_PORT GPIOC
|
|
|
|
|
#define PIOS_USB_DETECT_GPIO_PIN GPIO_Pin_15
|
|
|
|
|
#define PIOS_USB_DETECT_EXTI_LINE EXTI_Line15
|
|
|
|
|
|
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// RFM22
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
|
|
|
|
#if defined(PIOS_INCLUDE_RFM22B)
|
|
|
|
|
extern uint32_t pios_spi_rfm22b_id;
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define PIOS_RFM22_SPI_PORT (pios_spi_rfm22b_id)
|
2013-04-05 22:46:56 +02:00
|
|
|
|
extern uint32_t pios_rfm22b_id;
|
|
|
|
|
#endif /* PIOS_INCLUDE_RFM22B */
|
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// Packet Handler
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
extern uint32_t pios_packet_handler;
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define PIOS_PACKET_HANDLER (pios_packet_handler)
|
|
|
|
|
#define PIOS_PH_MAX_PACKET 255
|
|
|
|
|
#define PIOS_PH_WIN_SIZE 3
|
2013-04-05 22:46:56 +02:00
|
|
|
|
#define PIOS_PH_MAX_CONNECTIONS 1
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define RS_ECC_NPARITY 4
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// Reed-Solomon ECC
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
|
|
|
|
#define RS_ECC_NPARITY 4
|
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
// Flash EEPROM Emulation
|
2013-05-19 16:37:30 +02:00
|
|
|
|
// -------------------------
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define PIOS_FLASH_SIZE 0x20000
|
2013-04-05 22:46:56 +02:00
|
|
|
|
#define PIOS_FLASH_EEPROM_START_ADDR 0x08000000
|
2013-05-19 16:37:30 +02:00
|
|
|
|
#define PIOS_FLASH_PAGE_SIZE 1024
|
|
|
|
|
#define PIOS_FLASH_EEPROM_ADDR (PIOS_FLASH_EEPROM_START_ADDR + PIOS_FLASH_SIZE - PIOS_FLASH_PAGE_SIZE)
|
|
|
|
|
#define PIOS_FLASH_EEPROM_LEN PIOS_FLASH_PAGE_SIZE
|
2013-04-05 22:46:56 +02:00
|
|
|
|
|
2013-04-14 01:34:43 +02:00
|
|
|
|
#endif /* PIOS_BOARD_H */
|