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 
67 #define UART_TX_PIN UART0_TX_GP0
68 #define UART_RX_PIN UART0_RX_GP1
69 
70 
71 #define SPI_DEVICE_ID 0
72 #define SPI_BAUDRATE 1000000
73 #define SPI_CS SPI0_CS_GP17
74 #define SPI_OPS &pico_spi_ops
75 #define SPI_EXTRA &adxrs290_spi_extra_ip
76 
78 
79 #define GPIO_SYNC_PIN_NUM 20
80 #define GPIO_SYNC_PORT_NUM 0 /* Not used for pico platform */
81 #define GPIO_OPS &pico_gpio_ops
82 #define GPIO_EXTRA NULL /* Not used for pico platform */
83 
84 
85 #ifdef IIO_TRIGGER_EXAMPLE
86 #define GPIO_IRQ_ID GPIO_SYNC_PIN_NUM
87 #define GPIO_IRQ_OPS &pico_gpio_irq_ops
88 #define GPIO_IRQ_EXTRA NULL /* Not used for pico platform */
89 
90 #define ADXRS290_GPIO_TRIG_IRQ_ID GPIO_SYNC_PIN_NUM
91 #define ADXRS290_GPIO_CB_HANDLE NULL /* Not used for pico platform */
92 #endif
93 
94 
95 #ifdef IIO_TIMER_TRIGGER_EXAMPLE
96 #define ADXRS290_TIMER_DEVICE_ID 0 /* For alarm0 */
97 #define ADXRS290_TIMER_FREQ_HZ 1000000
98 #define ADXRS290_TIMER_TICKS_COUNT 1000
99 #define ADXRS290_TIMER_EXTRA NULL /* Not used for pico platform */
100 #define TIMER_OPS &pico_timer_ops
101 
102 /* ADXRS290 Timer trigger settings */
103 #define ADXRS290_TIMER_IRQ_ID 0 /* for TIMER_IRQ_0 */
104 #define TIMER_IRQ_OPS &pico_irq_ops
105 #define ADADXRS290_TIMER_IRQ_EXTRA NULL /* Not used for pico platform */
106 
107 /* ADXRS290 timer trigger settings */
108 extern uint8_t adxrs290_timer_extra_ip;
109 #define ADXRS290_TIMER_CB_HANDLE &adxrs290_timer_extra_ip /* for alarm0 */
110 #define ADXRS290_TIMER_TRIG_IRQ_ID 0 /* for TIMER_IRQ_0 */
111 #endif
112 
113 #endif /* __PARAMETERS_H__ */
pico_uart.h
Header file of UART driver for pico.
pico_spi.h
Header file for the pico spi driver.
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