#ifndef STM32F765_PIN_MAP
#define STM32F765_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


#if 0
#define STM32F765_I2C1_SDA      GPIO_PIN_7
#define STM32F765_I2C1_SCK      GPIO_PIN_6
#define STM32F765_I2C1_PORT     GPIOB

#define STM32F765_UART6_TX       GPIO_PIN_6
#define STM32F765_UART6_RX       GPIO_PIN_7
#define STM32F765_UART6_PORT     GPIOC

#define STM32F765_UART1_TX       GPIO_PIN_14
#define STM32F765_UART1_RX       GPIO_PIN_15
#define STM32F765_UART1_PORT     GPIOB

#define STM32F765_SPI1_MOSI      GPIO_PIN_7
#define STM32F765_SPI1_MISO      GPIO_PIN_6
#define STM32F765_SPI1_SCK       GPIO_PIN_11
#define STM32F765_SPI1_PORT      GPIOA
#define STM32F765_SPI1_SCK_PORT  GPIOG

#define STM32F765_SPI2_MOSI      GPIO_PIN_1
#define STM32F765_SPI2_MISO      GPIO_PIN_2
#define STM32F765_SPI2_SCK       GPIO_PIN_10
#define STM32F765_SPI2_PORT      GPIOC
#define STM32F765_SPI2_SCK_PORT  GPIOB

#define STM32F765_CAN1_TX         GPIO_PIN_1
#define STM32F765_CAN1_RX         GPIO_PIN_0
#define STM32F765_CAN1_PORT       GPIOD

#define STM32F765_CAN3_TX         GPIO_PIN_4
#define STM32F765_CAN3_RX         GPIO_PIN_3
#define STM32F765_CAN3_PORT       GPIOB

#define STM32F765_CAN2_TX         GPIO_PIN_13
#define STM32F765_CAN2_RX         GPIO_PIN_12
#define STM32F765_CAN2_PORT       GPIOB
#endif
#define I2C1_SDA          GPIO_PIN_7
#define I2C1_SCK          GPIO_PIN_6
#define I2C1_PORT         GPIOB

#define UART6_TX           GPIO_PIN_6
#define UART6_RX           GPIO_PIN_7
#define UART6_PORT         GPIOC

#define UART1_TX           GPIO_PIN_14
#define UART1_RX           GPIO_PIN_15
#define UART1_PORT         GPIOB

#define SPI2_MOSI          GPIO_PIN_1
#define SPI2_MISO          GPIO_PIN_2
#define SPI2_SCK           GPIO_PIN_10
#define SPI2_PORT          GPIOC
#define SPI2_SCK_PORT      GPIOB

#define CAN1_TX             GPIO_PIN_1
#define CAN1_RX             GPIO_PIN_0
#define CAN1_PORT           GPIOD

#define CAN3_TX             GPIO_PIN_4
#define CAN3_RX             GPIO_PIN_3
#define CAN3_PORT           GPIOB

#define CAN2_TX             GPIO_PIN_13
#define CAN2_RX             GPIO_PIN_12
#define CAN2_PORT           GPIOB
#endif








