#ifndef STM32F769_PIN_MAP
#define STM32F769_PIN_MAP


#define RTC_CLOCK_SOURCE_LSE

#ifdef RTC_CLOCK_SOURCE_LSI
#define RTC_ASYNCH_PREDIV    0x7F
#define RTC_SYNCH_PREDIV     0x00F9
#endif

#ifdef RTC_CLOCK_SOURCE_LSE
#define RTC_ASYNCH_PREDIV  0x7F
#define RTC_SYNCH_PREDIV   0x00FF
#endif

#define STM32F769_I2C1_SDA      GPIO_PIN_9
#define STM32F769_I2C1_SCK      GPIO_PIN_8
#define STM32F769_I2C1_PORT     GPIOB

#define STM32F769_UART6_TX       GPIO_PIN_6
#define STM32F769_UART6_RX       GPIO_PIN_7
#define STM32F769_UART6_PORT     GPIOC

#define STM32F769_UART1_TX       GPIO_PIN_9
#define STM32F769_UART1_RX       GPIO_PIN_10
#define STM32F769_UART1_PORT     GPIOA

#define STM32F769_SPI2_MOSI      GPIO_PIN_15
#define STM32F769_SPI2_MISO      GPIO_PIN_14
#define STM32F769_SPI2_SCK       GPIO_PIN_12
#define STM32F769_SPI2_PORT      GPIOB
#define STM32F769_SPI2_SCK_PORT  GPIOA

#define STM32F769_CAN1_TX         GPIO_PIN_9
#define STM32F769_CAN1_RX         GPIO_PIN_8
#define STM32F769_CAN1_PORT       GPIOB

#define STM32F769_CAN3_TX         GPIO_PIN_4
#define STM32F769_CAN3_RX         GPIO_PIN_3
#define STM32F769_CAN3_PORT       GPIOB

#define STM32F769_CAN2_TX         GPIO_PIN_13
#define STM32F769_CAN2_RX         GPIO_PIN_12
#define STM32F769_CAN2_PORT       GPIOB



#define I2C1_SDA          STM32F769_I2C1_SDA
#define I2C1_SCK          STM32F769_I2C1_SCK
#define I2C1_PORT         STM32F769_I2C1_PORT

#define UART6_TX          STM32F769_UART6_TX
#define UART6_RX          STM32F769_UART6_RX
#define UART6_PORT        STM32F769_UART6_PORT

#define UART1_TX          STM32F769_UART1_TX
#define UART1_RX          STM32F769_UART1_RX
#define UART1_PORT        STM32F769_UART1_PORT

#define SPI2_MOSI  	      STM32F769_SPI2_MOSI
#define SPI2_MISO         STM32F769_SPI2_MISO
#define SPI2_SCK          STM32F769_SPI2_SCK
#define SPI2_PORT         STM32F769_SPI2_PORT
#define SPI2_SCK_PORT     STM32F769_SPI2_SCK_PORT

#define CAN1_TX           STM32F769_CAN1_TX
#define CAN1_RX           STM32F769_CAN1_RX
#define CAN1_PORT         STM32F769_CAN1_PORT

#define CAN3_TX           STM32F769_CAN3_TX
#define CAN3_RX           STM32F769_CAN3_RX
#define CAN3_PORT         STM32F769_CAN3_PORT

#define CAN2_TX           STM32F769_CAN2_TX
#define CAN2_RX           STM32F769_CAN2_RX
#define CAN2_PORT         STM32F769_CAN2_PORT


#endif
