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