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