no-OS
parameters.h
Go to the documentation of this file.
1 /***************************************************************************/
34 #ifndef __PARAMETERS_H__
35 #define __PARAMETERS_H__
36 
37 /******************************************************************************/
38 /***************************** Include Files **********************************/
39 /******************************************************************************/
40 #include "stm32_hal.h"
41 #include "stm32_irq.h"
42 #include "stm32_timer.h"
43 #include "stm32_uart_stdio.h"
44 #include "common_data.h"
45 #include "no_os_util.h"
46 
47 #if defined NO_OS_USB_UART
48 #include "stm32_usb_uart.h"
49 #else
50 #include "stm32_uart.h"
51 #endif
52 
53 /******************************************************************************/
54 /********************** Macros and Constants Definitions **********************/
55 /******************************************************************************/
56 /* This value can be modified based on the number
57 of samples needed to be stored in the device buffer
58 and based on the available RAM memory of the platform */
59 #define SAMPLES_PER_CHANNEL_PLATFORM 2000
60 
61 #if defined NO_OS_USB_UART
62 #define UART_EXTRA &iio_demo_usb_uart_extra_ip
63 #define UART_OPS &stm32_usb_uart_ops
64 #else
65 #define UART_EXTRA &iio_demo_uart_extra_ip
66 #define UART_OPS &stm32_uart_ops
67 #endif
68 
69 extern UART_HandleTypeDef huart5;
70 #define UART_IRQ_ID UART5_IRQn
71 #define INTC_DEVICE_ID 0
72 #define IIO_APP_HUART (&huart5)
73 #define UART_DEVICE_ID 5
74 #define UART_BAUDRATE 115200
75 
76 #if defined NO_OS_USB_UART
78 #if defined(STM32F413xx) || defined(STM32H743xx)
79 extern USBD_HandleTypeDef hUsbDeviceFS;
80 #define IIO_APP_HUSBUART (&hUsbDeviceFS)
81 #elif defined(STM32F469xx)
82 extern USBD_HandleTypeDef hUsbDeviceHS;
83 #define IIO_APP_HUSBUART (&hUsbDeviceHS)
84 #endif
85 #else
87 #endif
88 
89 #ifdef IIO_TIMER_TRIGGER_EXAMPLE
90 /* Adc Demo Timer settings */
91 extern struct stm32_timer_init_param adc_demo_xtip;
92 #define ADC_DEMO_TIMER_DEVICE_ID 13
93 #define ADC_DEMO_TIMER_FREQ_HZ 1000000
94 #define ADC_DEMO_TIMER_TICKS_COUNT 2000
95 #define ADC_DEMO_TIMER_EXTRA &adc_demo_xtip
96 #define TIMER_OPS &stm32_timer_ops
97 
98 /* Adc Demo Timer trigger settings */
99 extern TIM_HandleTypeDef htim13;
100 #define ADC_DEMO_TIMER_IRQ_ID TIM8_UP_TIM13_IRQn
101 #define TIMER_IRQ_OPS &stm32_irq_ops
102 #define ADC_DEMO_TIMER_IRQ_EXTRA &htim13
103 
104 /* Adc Demo timer trigger settings */
105 #define ADC_DEMO_TIMER_CB_HANDLE &htim13
106 #define ADC_DEMO_TIMER_TRIG_IRQ_ID TIM8_UP_TIM13_IRQn
107 
108 /* Dac Demo Timer settings */
109 extern struct stm32_timer_init_param dac_demo_xtip;
110 #define DAC_DEMO_TIMER_DEVICE_ID 14
111 #define DAC_DEMO_TIMER_FREQ_HZ 1000000
112 #define DAC_DEMO_TIMER_TICKS_COUNT 2000
113 #define DAC_DEMO_TIMER_EXTRA &dac_demo_xtip
114 #define TIMER_OPS &stm32_timer_ops
115 
116 /* Dac Demo Timer trigger settings */
117 extern TIM_HandleTypeDef htim14;
118 #define DAC_DEMO_TIMER_IRQ_ID TIM8_TRG_COM_TIM14_IRQn
119 #define TIMER_IRQ_OPS &stm32_irq_ops
120 #define DAC_DEMO_TIMER_IRQ_EXTRA &htim14
121 
122 /* Dac Demo timer trigger settings */
123 #define DAC_DEMO_TIMER_CB_HANDLE &htim14
124 #define DAC_DEMO_TIMER_TRIG_IRQ_ID TIM8_TRG_COM_TIM14_IRQn
125 
126 #endif
127 
128 #endif /* __PARAMETERS_H__ */
stm32_timer.h
Header file for the stm32 timer driver.
iio_demo_usb_uart_extra_ip
struct max_usb_uart_init_param iio_demo_usb_uart_extra_ip
Definition: parameters.c:56
stm32_usb_uart.h
UART over USB driver for stm32 as a no_os_uart implementation.
stm32_timer_init_param
Structure holding the initialization parameters for stm32 platform specific timer parameters.
Definition: stm32_timer.h:45
stm32_uart_init_param
Specific initialization parameters for stm32 UART.
Definition: stm32_uart.h:46
stm32_uart.h
Header file of UART driver for STM32.
stm32_uart_stdio.h
Header file of stm32 UART driver stdout/stdin redirection.
stm32_irq.h
Header file for stm32 irq specifics.
stm32_usb_uart_init_param
Specific initialization parameters for stm32 UART over USB.
Definition: stm32_usb_uart.h:46
iio_demo_uart_extra_ip
struct max_uart_init_param iio_demo_uart_extra_ip
Definition: parameters.c:42
no_os_util.h
Header file of utility functions.
huart5
UART_HandleTypeDef huart5
stm32_hal.h