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 "common_data.h"
41 #include "no_os_util.h"
42 #include "pico_uart.h"
43 #include "pico_spi.h"
44 #include "pico_gpio.h"
45 #include "pico_gpio_irq.h"
46 #include "pico_irq.h"
47 #include "pico_timer.h"
48 
49 /******************************************************************************/
50 /********************** Macros and Constants Definitions **********************/
51 /******************************************************************************/
52 /* This value can be modified based on the number
53 of samples needed to be stored in the device buffer
54 and based on the available RAM memory of the platform */
55 #define SAMPLES_PER_CHANNEL_PLATFORM 2000
56 
57 #define UART_DEVICE_ID 0
58 #define UART_BAUDRATE 115200
59 #define UART_IRQ_ID 20
60 #define UART_EXTRA &adxrs290_uart_extra_ip
61 #define UART_OPS &pico_uart_ops
62 
63 #define UART_TX_PIN UART0_TX_GP0
64 #define UART_RX_PIN UART0_RX_GP1
65 
66 
67 #define SPI_DEVICE_ID 0
68 #define SPI_BAUDRATE 1000000
69 #define SPI_CS SPI0_CS_GP17
70 #define SPI_OPS &pico_spi_ops
71 #define SPI_EXTRA &adxrs290_spi_extra_ip
72 
75 
76 #define GPIO_SYNC_PIN_NUM 20
77 #define GPIO_SYNC_PORT_NUM 0 /* Not used for pico platform */
78 #define GPIO_OPS &pico_gpio_ops
79 #define GPIO_EXTRA NULL /* Not used for pico platform */
80 
81 
82 #ifdef IIO_TRIGGER_EXAMPLE
83 #define GPIO_IRQ_ID GPIO_SYNC_PIN_NUM
84 #define GPIO_IRQ_OPS &pico_gpio_irq_ops
85 #define GPIO_IRQ_EXTRA NULL /* Not used for pico platform */
86 
87 #define ADXRS290_GPIO_TRIG_IRQ_ID GPIO_SYNC_PIN_NUM
88 #define ADXRS290_GPIO_CB_HANDLE NULL /* Not used for pico platform */
89 #endif
90 
91 
92 #ifdef IIO_TIMER_TRIGGER_EXAMPLE
93 #define ADXRS290_TIMER_DEVICE_ID 0 /* For alarm0 */
94 #define ADXRS290_TIMER_FREQ_HZ 1000000
95 #define ADXRS290_TIMER_TICKS_COUNT 1000
96 #define ADXRS290_TIMER_EXTRA NULL /* Not used for pico platform */
97 #define TIMER_OPS &pico_timer_ops
98 
99 /* ADXRS290 Timer trigger settings */
100 #define ADXRS290_TIMER_IRQ_ID 0 /* for TIMER_IRQ_0 */
101 #define TIMER_IRQ_OPS &pico_irq_ops
102 #define ADADXRS290_TIMER_IRQ_EXTRA NULL /* Not used for pico platform */
103 
104 /* ADXRS290 timer trigger settings */
105 extern uint8_t adxrs290_timer_extra_ip;
106 #define ADXRS290_TIMER_CB_HANDLE &adxrs290_timer_extra_ip /* for alarm0 */
107 #define ADXRS290_TIMER_TRIG_IRQ_ID 0 /* for TIMER_IRQ_0 */
108 #endif
109 
110 #endif /* __PARAMETERS_H__ */
pico_uart.h
Header file of UART driver for pico.
pico_spi.h
Header file for the pico spi driver.
adxrs290_uart_extra_ip
struct max_uart_init_param adxrs290_uart_extra_ip
Definition: parameters.c:42
pico_spi_init_param
Additional SPI config parameters.
Definition: pico_spi.h:119
adxrs290_timer_extra_ip
struct aducm_timer_init_param adxrs290_timer_extra_ip
Definition: parameters.c:49
pico_timer.h
Header file for the pico timer driver.
pico_gpio_irq.h
Header file for pico gpio irq specifics.
pico_irq.h
Header file for pico irq specifics.
pico_gpio.h
Header file for pico gpio specifics.
no_os_util.h
Header file of utility functions.
adxrs290_spi_extra_ip
struct aducm_spi_init_param adxrs290_spi_extra_ip
Definition: parameters.c:42
pico_uart_init_param
Additional UART config parameters.
Definition: pico_uart.h:90