#ifndef _ARENA_BOARD_CONFIG_F407_H_
#define _ARENA_BOARD_CONFIG_F407_H_
//-----------------------------------------------------------------------------
///
/// \brief  Libbiwak board description
///
///         Basic STM32F407 Nucleo board
///
/// \author Maximilian Seesslen <mes@seesslen.net>
///
//-----------------------------------------------------------------------------


#include <arena/boards/generic_stm32.h>    // Based on STM32 board


#define ARENA_ADC_0           eAdc1

#define ARENA_RTC_0           1

#define ARENA_HAS_LED         4
#define ARENA_LED_0           eGpioPeripheralD, eGpioPin12
#define ARENA_LED_1           eGpioPeripheralD, eGpioPin13
#define ARENA_LED_2           eGpioPeripheralD, eGpioPin14
#define ARENA_LED_3           eGpioPeripheralD, eGpioPin15

#define ARENA_HAS_GPIO        8
#define ARENA_GPIO_0             eGpioPeripheralE, eGpioPin1
#define ARENA_GPIO_0_EXTI_IRQ    EXTI1_IRQHandler
#define ARENA_GPIO_1             eGpioPeripheralE, eGpioPin2
#define ARENA_GPIO_1_EXTI_IRQ    EXTI2_IRQHandler
#define ARENA_GPIO_2             eGpioPeripheralE, eGpioPin3
#define ARENA_GPIO_2_EXTI_IRQ    EXTI3_IRQHandler
#define ARENA_GPIO_3             eGpioPeripheralE, eGpioPin4
#define ARENA_GPIO_3_EXTI_IRQ    EXTI4_IRQHandler
#define ARENA_GPIO_4             eGpioPeripheralE, eGpioPin5
#define ARENA_GPIO_4_EXTI_IRQ    EXTI9_5_IRQHandler
#define ARENA_GPIO_5             eGpioPeripheralE, eGpioPin6
#define ARENA_GPIO_5_EXTI_IRQ    EXTI9_5_IRQHandler
#define ARENA_GPIO_6             eGpioPeripheralE, eGpioPin7
#define ARENA_GPIO_6_EXTI_IRQ    EXTI9_5_IRQHandler
#define ARENA_GPIO_7             eGpioPeripheralE, eGpioPin8
#define ARENA_GPIO_7_EXTI_IRQ    EXTI9_5_IRQHandler

/*
#define ARENA_LED_5           eGpioPeripheralD, eGpioPin6  // - PD6, User
#define ARENA_LED_5_NAME      User5
*/

#define ARENA_UART_0         eUsart3, \
                                   eGpioPeripheralB, eGpioPin10,   /* Tx yellow */ \
                                   eGpioPeripheralB, eGpioPin11    /* RX red    */
#define ARENA_UART_0_IRQ     USART3_IRQHandler

// UNTESTET
#define ARENA_CAN_0           eCan1, \
                              eGpioPeripheralA, eGpioPin12, /* Pin D2  Tx  */ \
                              eGpioPeripheralA, eGpioPin11  /* Pin D10 Rx */ \
// NOT VALID!
#define ARENA_SPI_0           eSpi1, \
                              eGpioPeripheralB, eGpioPin3, /* Pin D13 SCK  */ \
                              eGpioPeripheralB, eGpioPin5, /* Pin D11 MOSI */ \
                              eGpioPeripheralB, eGpioPin4  /* Pin D12 MISO */


//---fin-----------------------------------------------------------------------
#endif // ? ! _ARENA_BOARD_CONFIG_F407_H_
