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 #include <PinNames.h>
20 #include "mbed_spi.h"
21 #include "mbed_uart.h"
22 #include "mbed_gpio.h"
23 #include "mbed_gpio_irq.h"
24 #include "mbed_irq.h"
25 #include "mbed_i2c.h"
26 
27 /******************************************************************************/
28 /********************** Macros and Constants Definition ***********************/
29 /******************************************************************************/
30 /* Pin mapping for AD719x w.r.t Arduino Headers */
31 #define SPI_CSB ARDUINO_UNO_D10
32 #define SPI_HOST_SDO ARDUINO_UNO_D11
33 #define SPI_HOST_SDI ARDUINO_UNO_D12
34 #define SPI_SCK ARDUINO_UNO_D13
35 
36 /* Common pin mapping on SDP-K1 */
37 #define UART_TX CONSOLE_TX
38 #define UART_RX CONSOLE_RX
39 
40 /* I2C Pin connected to EEPROM Chip */
41 #define I2C_SCL ARDUINO_UNO_D15
42 #define I2C_SDA ARDUINO_UNO_D14
43 
44 /* This pin is used to detect the End of Conversion
45  * signal and should be connected to the MOSI (D12)
46  * pin physically on the EVAL board.
47  * */
48 #define RDY_PIN ARDUINO_UNO_D8
49 
50 /* To explicitly have control over the CS line,
51  * the firmware makes use of D9 pin on the Arduino.
52  * This done by switching the LK12 header on the
53  * EVAL board to position 2 */
54 #define CS_ARD_TWO ARDUINO_UNO_D9
55 
56 /* The SYNC pin allows the user to reset the modulator
57  * without affecting any of the setup conditions on the part.
58  * This allows the firmware to start gathering samples of the
59  * analog input from a known point in time.
60  * */
61 #define SYNC_PIN ARDUINO_UNO_D4
62 
63 /******************************************************************************/
64 /********************** Public/Extern Declarations ****************************/
65 /******************************************************************************/
66 extern struct mbed_uart_init_param mbed_uart_extra_init_params;
67 extern struct mbed_uart_init_param mbed_vcom_extra_init_params;
68 extern struct mbed_spi_init_param mbed_spi_extra_init_params;
69 extern struct mbed_i2c_init_param mbed_i2c_extra_init_params;
70 extern struct mbed_gpio_init_param mbed_gpio_sync_extra_init_params;
71 extern struct mbed_gpio_irq_init_param mbed_trigger_gpio_irq_init_params;
72 
73 #endif /* APP_CONFIG_MBED_H_ */
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
struct mbed_gpio_init_param mbed_gpio_sync_extra_init_params
Definition: app_config_mbed.c:56