precision-converters-firmware
app_config_mbed.h
Go to the documentation of this file.
1 /***************************************************************************/
13 #ifndef APP_CONFIG_MBED_H_
14 #define APP_CONFIG_MBED_H_
15 
16 /******************************************************************************/
17 /***************************** Include Files **********************************/
18 /******************************************************************************/
19 
20 #include <stdint.h>
21 #include <PinNames.h>
22 #include "mbed_spi.h"
23 #include "mbed_uart.h"
24 #include "mbed_irq.h"
25 #include "mbed_i2c.h"
26 #include "mbed_gpio.h"
27 #include "mbed_gpio_irq.h"
28 
29 /******************************************************************************/
30 /********************** Macros and Constants Definition ***********************/
31 /******************************************************************************/
41 /* NOTE: Only EVAL-AD4114SDZ, EVAL-AD4115SDZ and EVAL-AD4116ASDZ support Arduino and SDP_120
42  * interface. The other EVAL Boadrds (EVAL-AD4111SDZ, EVAL-AD4112SDZ,
43  * EVAL-AD7172-4SDZ, EVAL-AD7172-2SDZ , EVAL-AD7173-8SDZ, EVAL-AD7175-2SDZ,
44  * EVAL-AD7175-8SDZ, EVAL-AD7176-2SDZ, EVAL-AD7177-2SDZ) support only the
45  * SDP-120 interface.
46  */
47 
48 //#define ARDUINO
49 
50 #ifdef ARDUINO
51 /* SPI Pins on SDP-K1-Arduino Interface */
52 #define SPI_CSB ARDUINO_UNO_D10 // SPI_CS
53 #define SPI_HOST_SDO ARDUINO_UNO_D11 // SPI_MOSI
54 #define SPI_HOST_SDI ARDUINO_UNO_D12 // SPI_MISO
55 #define SPI_SCK ARDUINO_UNO_D13 // SPI_SCK
56 #define I2C_SCL ARDUINO_UNO_D15
57 #define I2C_SDA ARDUINO_UNO_D14
58 #else // Default- SDP_120 Interface
59 /* SPI Pins on SDP-K1-SDP-120 Interface */
60 #define SPI_CSB SDP_SPI_CS_A
61 #define SPI_HOST_SDI SDP_SPI_MISO
62 #define SPI_HOST_SDO SDP_SPI_MOSI
63 #define SPI_SCK SDP_SPI_SCK
64 #define I2C_SCL SDP_I2C_SCL
65 #define I2C_SDA SDP_I2C_SDA
66 #endif // ARDUINO
67 
68 /* UART Common Pin Mapping on SDP-K1 */
69 #define UART_TX CONSOLE_TX
70 #define UART_RX CONSOLE_RX
71 
72 /* RDY Pin indicates the end of conversion.
73 * NOTE: D8 pin on the Arduino header of the micro controller has been
74 * chosen to serve as the source of interrupt to denote EOC. Hence, the
75 * MISO pin on the AD411x/AD717x device needs to be
76 * externally connected to D8 on the arduino header
77 * of the micro-controller board via a jumper */
78 #define RDY_PIN ARDUINO_UNO_D8
79 
80 /******************************************************************************/
81 /********************** Public/Extern Declarations ****************************/
82 /******************************************************************************/
83 
84 extern struct mbed_uart_init_param mbed_uart_extra_init_params;
85 extern struct mbed_uart_init_param mbed_vcom_extra_init_params;
86 extern struct mbed_spi_init_param mbed_spi_extra_init_params;
87 extern struct mbed_gpio_irq_init_param mbed_trigger_gpio_irq_init_params;
88 extern struct mbed_i2c_init_param mbed_i2c_extra_init_params;
89 
90 #endif // APP_CONFIG_MBED_H_
91 
struct mbed_gpio_irq_init_param mbed_trigger_gpio_irq_init_params
Definition: app_config_mbed.c:65
struct mbed_uart_init_param mbed_vcom_extra_init_params
Definition: app_config_mbed.c:42
struct mbed_uart_init_param mbed_uart_extra_init_params
Definition: app_config_mbed.c:31
struct mbed_spi_init_param mbed_spi_extra_init_params
Definition: app_config_mbed.c:54
struct mbed_i2c_init_param mbed_i2c_extra_init_params
Definition: app_config_mbed.c:69