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 MAX_SPI_BAUDRATE 10000000
32 #define SPI_CSB ARDUINO_UNO_D10
33 #define SPI_HOST_SDO ARDUINO_UNO_D11
34 #define SPI_HOST_SDI ARDUINO_UNO_D12
35 #define SPI_SCK ARDUINO_UNO_D13
36 
37 /* Common pin mapping on SDP-K1 */
38 #define UART_TX CONSOLE_TX
39 #define UART_RX CONSOLE_RX
40 
41 /* I2C Pin connected to EEPROM Chip */
42 #define I2C_SCL ARDUINO_UNO_D15
43 #define I2C_SDA ARDUINO_UNO_D14
44 
45 /* This pin is used to detect the End of Conversion
46  * signal and should be connected to the MOSI (D12)
47  * pin physically on the EVAL board.
48  * */
49 #define RDY_PIN ARDUINO_UNO_D8
50 
51 /* To explicitly have control over the CS line,
52  * the firmware makes use of D9 pin on the Arduino.
53  * This done by switching the LK12 header on the
54  * EVAL board to position 2 */
55 #define CS_ARD_TWO ARDUINO_UNO_D9
56 
57 /* The SYNC pin allows the user to reset the modulator
58  * without affecting any of the setup conditions on the part.
59  * This allows the firmware to start gathering samples of the
60  * analog input from a known point in time.
61  * */
62 #define SYNC_PIN ARDUINO_UNO_D4
63 
64 #define I2C_DEVICE_ID 0 // Unused
65 #define SPI_DEVICE_ID 0 // Unused
66 #define SPI_CS_PORT 0 // Unused
67 #define SYNC_PORT 0 // Unused
68 #define RDY_PORT 0 // Unused
69 
70 /******************************************************************************/
71 /********************** Public/Extern Declarations ****************************/
72 /******************************************************************************/
73 extern struct mbed_uart_init_param mbed_uart_extra_init_params;
74 extern struct mbed_uart_init_param mbed_vcom_extra_init_params;
75 extern struct mbed_spi_init_param mbed_spi_extra_init_params;
76 extern struct mbed_i2c_init_param mbed_i2c_extra_init_params;
77 extern struct mbed_gpio_init_param mbed_gpio_sync_extra_init_params;
78 extern struct mbed_gpio_irq_init_param mbed_trigger_gpio_irq_init_params;
79 
80 #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