precision-converters-firmware
app_config_stm32.h
Go to the documentation of this file.
1 /***************************************************************************/
13 #ifndef APP_CONFIG_STM32_H_
14 #define APP_CONFIG_STM32_H_
15 
16 /******************************************************************************/
17 /***************************** Include Files **********************************/
18 /******************************************************************************/
19 
20 #include <stdint.h>
21 #include "stm32_uart.h"
22 #include "stm32_spi.h"
23 #include "stm32_gpio.h"
24 
25 /******************************************************************************/
26 /********************** Macros and Constants Definition ***********************/
27 /******************************************************************************/
28 
29 /* Note: The SDP-K1 board with the STM32F469NI MCU has been used
30  * for developing the firmware. The below parameters will change depending
31  * on the controller used. */
32 #define TARGET_NAME SDP_K1
33 
34 /* STM32 UART specific parameters */
35 #define APP_UART_HANDLE &huart5
36 #define UART_IRQ_ID UART5_IRQn
37 
38 /* STM32 SPI Specific parameters */
39 #define SPI_DEVICE_ID 1 //SPI1
40 #define SPI_CSB 15 //PA15
41 #define STM32_SPI_CS_PORT 0 //PORTA
42 
43 /* Peripheral IDs (Unused) */
44 #define UART_ID 0
45 
46 /* Redefine the init params structure mapping wrt platform */
47 #define spi_extra_init_params stm32_spi_init_params
48 #define uart_extra_init_params stm32_uart_init_params
49 
50 /* Redefine platform ops mapping wrt STM32 platform */
51 #define gpio_ops stm32_gpio_ops
52 #define spi_ops stm32_spi_ops
53 #define uart_ops stm32_uart_ops
54 
55 /******************************************************************************/
56 /********************** Public/Extern Declarations ****************************/
57 /******************************************************************************/
58 
59 extern struct stm32_uart_init_param stm32_uart_init_params;
60 extern struct stm32_spi_init_param stm32_spi_init_params;
61 
62 extern UART_HandleTypeDef huart5;
63 
64 void stm32_system_init(void);
65 
66 #endif /* APP_CONFIG_STM32_H_ */
UART_HandleTypeDef huart5
struct stm32_spi_init_param stm32_spi_init_params
Definition: app_config_stm32.c:40
struct stm32_uart_init_param stm32_uart_init_params
Definition: app_config_stm32.c:30
void stm32_system_init(void)
Initialize the STM32 system peripherals.
Definition: app_config_stm32.c:111