Example program for EVAL-AD4130
Dependencies: tempsensors sdp_k1_sdram
app_config_mbed.h
00001 /***************************************************************************//** 00002 * @file app_config_mbed.h 00003 * @brief Header file for Mbed platform configurations 00004 ******************************************************************************** 00005 * Copyright (c) 2021-22 Analog Devices, Inc. 00006 * All rights reserved. 00007 * 00008 * This software is proprietary to Analog Devices, Inc. and its licensors. 00009 * By using this software you agree to the terms of the associated 00010 * Analog Devices Software License Agreement. 00011 *******************************************************************************/ 00012 00013 #ifndef APP_CONFIG_MBED_H_ 00014 #define APP_CONFIG_MBED_H_ 00015 00016 /******************************************************************************/ 00017 /***************************** Include Files **********************************/ 00018 /******************************************************************************/ 00019 00020 #include <stdint.h> 00021 #include <PinNames.h> 00022 00023 #include "no_os_gpio.h" 00024 #include "mbed_uart.h" 00025 #include "mbed_irq.h" 00026 #include "mbed_gpio_irq.h" 00027 #include "mbed_spi.h" 00028 #include "mbed_gpio.h" 00029 00030 /******************************************************************************/ 00031 /********************** Macros and Constants Definition ***********************/ 00032 /******************************************************************************/ 00033 00034 /* Select b/w Arduino or SDP-120 pin header (default is Arduino) */ 00035 //#define SDP_120 00036 00037 #ifdef SDP_120 00038 /* Pin mapping of SDP-K1 w.r.t SDP-120 connector */ 00039 #define SPI_CSB SDP_SPI_CS_A 00040 #define SPI_HOST_SDO SDP_SPI_MOSI 00041 #define SPI_HOST_SDI SDP_SPI_MISO 00042 #define SPI_SCK SDP_SPI_SCK 00043 00044 #define MBED_CONV_MON SDP_GPIO_1 00045 #else 00046 /* Pin mapping of SDP-K1 w.r.t Arduino connector */ 00047 #define SPI_CSB ARDUINO_UNO_D10 00048 #define SPI_HOST_SDO ARDUINO_UNO_D11 00049 #define SPI_HOST_SDI ARDUINO_UNO_D12 00050 #define SPI_SCK ARDUINO_UNO_D13 00051 00052 #define MBED_CONV_MON ARDUINO_UNO_D2 00053 #endif 00054 00055 #if defined(AD4130_WLCSP_PACKAGE_TYPE) 00056 #define CONV_MON MBED_CONV_MON 00057 #else 00058 #define CONV_MON ARDUINO_UNO_D2 // Conversion interrupt source pin (The selected interrupt source pin 00059 // e.g. MCLK or GPIO needs to be tied to D2 pin on Arduino header). 00060 // The selection of interrupt source is done in 'iio_data_capture_init' function 00061 #endif 00062 00063 /* Common pin mapping on SDP-K1 */ 00064 #define UART_TX CONSOLE_TX 00065 #define UART_RX CONSOLE_RX 00066 #define LED_GPO LED3 00067 00068 /* Select FS scaler value for the default user config mode. 00069 * This is not a max FS value that can be set into device but rather a value to 00070 * achieve max approximate ODR in the firmware for a given platform/setup. 00071 * Max ODR is derived by testing the firmware on SDP-K1 controller board 00072 * @10Mhz SPI clock. The max possible ODR can vary from board to board and 00073 * data continuity is not guaranteed above this ODR on IIO client */ 00074 #define FS_CONFIG_VALUE 1 // ODR = 2.4KSPS 00075 00076 /******************************************************************************/ 00077 /********************** Public/Extern Declarations ****************************/ 00078 /******************************************************************************/ 00079 00080 extern struct mbed_gpio_irq_init_param mbed_ext_int_extra_init_params; 00081 extern struct mbed_uart_init_param mbed_uart_extra_init_params; 00082 extern struct mbed_spi_init_param mbed_spi_extra_init_params; 00083 00084 #endif /* APP_CONFIG_MBED_H_ */
Generated on Wed Jul 20 2022 12:42:25 by 1.7.2