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_uart.h"
24 #include "mbed_irq.h"
25 #include "mbed_spi.h"
26 #include "mbed_gpio.h"
27 
28 /******************************************************************************/
29 /********************** Macros and Constants Definition ***********************/
30 /******************************************************************************/
31 
32 /* Pin mapping of SDP-K1 w.r.t Arduino connector */
33 #define SPI_CSB ARDUINO_UNO_D10
34 #define SPI_HOST_SDO ARDUINO_UNO_D11
35 #define SPI_HOST_SDI ARDUINO_UNO_D12
36 #define SPI_SCK ARDUINO_UNO_D13
37 
38 #define SPI_DEVICE_ID 0 //unused
39 #define I2C_DEVICE_ID 0 //unused
40 #define UART_ID 0 //unused
41 
42 #define I2C_SCL ARDUINO_UNO_D15
43 #define I2C_SDA ARDUINO_UNO_D14
44 
45 /* Console pin mapping on SDP-K1 */
46 #define UART_TX CONSOLE_TX
47 #define UART_RX CONSOLE_RX
48 
49 /* Redefine the init params structure mapping w.r.t. platform */
50 #define uart_extra_init_params mbed_uart_extra_init_params
51 #define vcom_extra_init_params mbed_vcom_extra_init_params
52 #define spi_extra_init_params mbed_spi_extra_init_params
53 
54 /* Redefine platform ops mapping wrt Mbed platform */
55 #define gpio_ops mbed_gpio_ops
56 #define spi_ops mbed_spi_ops
57 #define uart_ops mbed_uart_ops
58 #define vcom_ops mbed_virtual_com_ops
59 
60 /******************************************************************************/
61 /********************** Public/Extern Declarations ****************************/
62 /******************************************************************************/
63 
64 extern struct mbed_uart_init_param mbed_uart_extra_init_params;
65 extern struct mbed_uart_init_param mbed_vcom_extra_init_params;
66 extern struct mbed_spi_init_param mbed_spi_extra_init_params;
67 
68 #endif /* APP_CONFIG_MBED_H_ */
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