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 
23 #include "mbed_spi.h"
24 #include "mbed_uart.h"
25 #include "mbed_i2c.h"
26 #include "mbed_gpio.h"
27 #include "mbed_gpio_irq.h"
28 #include "mbed_irq.h"
29 
30 /******************************************************************************/
31 /********************** Macros and Constants Definition ***********************/
32 /******************************************************************************/
40 #define ARDUINO
41 
42 #ifdef ARDUINO
43 #define SPI_CSB ARDUINO_UNO_D10
44 #define SPI_HOST_SDO ARDUINO_UNO_D11
45 #define SPI_HOST_SDI ARDUINO_UNO_D12
46 #define SPI_SCK ARDUINO_UNO_D13
47 #define I2C_SCL ARDUINO_UNO_D15
48 #define I2C_SDA ARDUINO_UNO_D14
49 #else // SDP-120 Connector
50 #define SPI_CSB SDP_SPI_CS_A
51 #define SPI_HOST_SDI SDP_SPI_MISO
52 #define SPI_HOST_SDO SDP_SPI_MOSI
53 #define SPI_SCK SDP_SPI_SCK
54 #define I2C_SCL SDP_I2C_SCL
55 #define I2C_SDA SDP_I2C_SDA
56 #endif
57 
58 /* UART Pins on SDP-K1 */
59 #define UART_TX CONSOLE_TX
60 #define UART_RX CONSOLE_RX
61 
62 /* RDY Pin */
63 #define RDY_PIN ARDUINO_UNO_D8
64 
65 #define TICKER_ID TICKER_INT_ID
66 #define ticker_ops mbed_irq_ops
67 
68 #define RDY_PORT 0 // Unused
69 #define SPI_DEVICE_ID 0 // Unused
70 #define SPI_CS_PORT 0 // Unused
71 
72 #define I2C_DEVICE_ID 0 // Unused
73 
74 /******************************************************************************/
75 /********************** Public/Extern Declarations ****************************/
76 /******************************************************************************/
77 
78 extern struct mbed_uart_init_param mbed_uart_extra_init_params;
79 extern struct mbed_uart_init_param mbed_vcom_extra_init_params;
80 extern struct mbed_spi_init_param mbed_spi_extra_init_params;
81 extern struct mbed_i2c_init_param mbed_i2c_extra_init_params;
82 extern struct mbed_gpio_irq_init_param mbed_trigger_gpio_irq_init_params;
83 extern struct mbed_irq_init_param mbed_ticker_int_extra_init_params;
84 
85 #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_irq_init_param mbed_ticker_int_extra_init_params
Definition: app_config_mbed.c:65