IIO firmware for the AD4110
Dependencies: tempsensors sdp_k1_sdram
app/app_config_mbed.h@0:6ca37a8f8ba9, 2022-07-27 (annotated)
- Committer:
- Janani Sunil
- Date:
- Wed Jul 27 17:04:15 2022 +0530
- Revision:
- 0:6ca37a8f8ba9
Initial implementation for AD4110 IIO Firmware
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Janani Sunil | 0:6ca37a8f8ba9 | 1 | /***************************************************************************//** |
Janani Sunil | 0:6ca37a8f8ba9 | 2 | * @file app_config_mbed.h |
Janani Sunil | 0:6ca37a8f8ba9 | 3 | * @brief Header file for Mbed platform configurations |
Janani Sunil | 0:6ca37a8f8ba9 | 4 | ******************************************************************************** |
Janani Sunil | 0:6ca37a8f8ba9 | 5 | * Copyright (c) 2022 Analog Devices, Inc. |
Janani Sunil | 0:6ca37a8f8ba9 | 6 | * All rights reserved. |
Janani Sunil | 0:6ca37a8f8ba9 | 7 | * |
Janani Sunil | 0:6ca37a8f8ba9 | 8 | * This software is proprietary to Analog Devices, Inc. and its licensors. |
Janani Sunil | 0:6ca37a8f8ba9 | 9 | * By using this software you agree to the terms of the associated |
Janani Sunil | 0:6ca37a8f8ba9 | 10 | * Analog Devices Software License Agreement. |
Janani Sunil | 0:6ca37a8f8ba9 | 11 | *******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 12 | |
Janani Sunil | 0:6ca37a8f8ba9 | 13 | #ifndef APP_CONFIG_MBED_H_ |
Janani Sunil | 0:6ca37a8f8ba9 | 14 | #define APP_CONFIG_MBED_H_ |
Janani Sunil | 0:6ca37a8f8ba9 | 15 | |
Janani Sunil | 0:6ca37a8f8ba9 | 16 | /******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 17 | /***************************** Include Files **********************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 18 | /******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 19 | |
Janani Sunil | 0:6ca37a8f8ba9 | 20 | #include <stdint.h> |
Janani Sunil | 0:6ca37a8f8ba9 | 21 | #include <PinNames.h> |
Janani Sunil | 0:6ca37a8f8ba9 | 22 | #include "mbed_uart.h" |
Janani Sunil | 0:6ca37a8f8ba9 | 23 | #include "mbed_spi.h" |
Janani Sunil | 0:6ca37a8f8ba9 | 24 | #include "mbed_irq.h" |
Janani Sunil | 0:6ca37a8f8ba9 | 25 | #include "mbed_gpio.h" |
Janani Sunil | 0:6ca37a8f8ba9 | 26 | |
Janani Sunil | 0:6ca37a8f8ba9 | 27 | #if defined(TARGET_SDP_K1) |
Janani Sunil | 0:6ca37a8f8ba9 | 28 | #include "sdram_sdpk1.h" |
Janani Sunil | 0:6ca37a8f8ba9 | 29 | #endif |
Janani Sunil | 0:6ca37a8f8ba9 | 30 | |
Janani Sunil | 0:6ca37a8f8ba9 | 31 | /******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 32 | /********************** Macros and Constants Definition ***********************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 33 | /******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 34 | /** |
Janani Sunil | 0:6ca37a8f8ba9 | 35 | * The ADI SDP_K1 can be used with either arduino headers |
Janani Sunil | 0:6ca37a8f8ba9 | 36 | * or the 120-pin SDP connector found on ADI evaluation |
Janani Sunil | 0:6ca37a8f8ba9 | 37 | * boards. The default is the Arduino connector. |
Janani Sunil | 0:6ca37a8f8ba9 | 38 | * |
Janani Sunil | 0:6ca37a8f8ba9 | 39 | * Comment the SDP_120 #define below to enable the Arduino connector |
Janani Sunil | 0:6ca37a8f8ba9 | 40 | */ |
Janani Sunil | 0:6ca37a8f8ba9 | 41 | |
Janani Sunil | 0:6ca37a8f8ba9 | 42 | // #define SDP_120 |
Janani Sunil | 0:6ca37a8f8ba9 | 43 | |
Janani Sunil | 0:6ca37a8f8ba9 | 44 | #if defined (SDP_120) |
Janani Sunil | 0:6ca37a8f8ba9 | 45 | /* Pin mapping of AD4110-1 with SDP-K1 SDP headers */ |
Janani Sunil | 0:6ca37a8f8ba9 | 46 | #define SPI_CSB SDP_SPI_CS_A |
Janani Sunil | 0:6ca37a8f8ba9 | 47 | #define SPI_HOST_SDO SDP_SPI_MOSI |
Janani Sunil | 0:6ca37a8f8ba9 | 48 | #define SPI_HOST_SDI SDP_SPI_MISO |
Janani Sunil | 0:6ca37a8f8ba9 | 49 | #define SPI_SCK SDP_SPI_SCK |
Janani Sunil | 0:6ca37a8f8ba9 | 50 | #else |
Janani Sunil | 0:6ca37a8f8ba9 | 51 | /* Pin mapping of SDP-K1 w.r.t Arduino connector */ |
Janani Sunil | 0:6ca37a8f8ba9 | 52 | #define SPI_CSB ARDUINO_UNO_D10 |
Janani Sunil | 0:6ca37a8f8ba9 | 53 | #define SPI_HOST_SDO ARDUINO_UNO_D11 |
Janani Sunil | 0:6ca37a8f8ba9 | 54 | #define SPI_HOST_SDI ARDUINO_UNO_D12 |
Janani Sunil | 0:6ca37a8f8ba9 | 55 | #define SPI_SCK ARDUINO_UNO_D13 |
Janani Sunil | 0:6ca37a8f8ba9 | 56 | #endif |
Janani Sunil | 0:6ca37a8f8ba9 | 57 | |
Janani Sunil | 0:6ca37a8f8ba9 | 58 | /* Common Pin mapping of UART */ |
Janani Sunil | 0:6ca37a8f8ba9 | 59 | #define UART_TX CONSOLE_TX |
Janani Sunil | 0:6ca37a8f8ba9 | 60 | #define UART_RX CONSOLE_RX |
Janani Sunil | 0:6ca37a8f8ba9 | 61 | |
Janani Sunil | 0:6ca37a8f8ba9 | 62 | /* RDY pin- which gives the end of conversion status. |
Janani Sunil | 0:6ca37a8f8ba9 | 63 | This pin is also the MISO pin for SPI communications */ |
Janani Sunil | 0:6ca37a8f8ba9 | 64 | #define RDY_PIN SPI_HOST_SDI |
Janani Sunil | 0:6ca37a8f8ba9 | 65 | |
Janani Sunil | 0:6ca37a8f8ba9 | 66 | /******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 67 | /********************** Public/Extern Declarations ****************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 68 | /******************************************************************************/ |
Janani Sunil | 0:6ca37a8f8ba9 | 69 | |
Janani Sunil | 0:6ca37a8f8ba9 | 70 | extern struct mbed_uart_init_param mbed_uart_extra_init_params; |
Janani Sunil | 0:6ca37a8f8ba9 | 71 | extern struct mbed_spi_init_param mbed_spi_extra_init_params; |
Janani Sunil | 0:6ca37a8f8ba9 | 72 | extern struct mbed_irq_init_param mbed_ext_int_extra_init_params; |
Janani Sunil | 0:6ca37a8f8ba9 | 73 | |
Janani Sunil | 0:6ca37a8f8ba9 | 74 | #endif /* APP_CONFIG_MBED_H_ */ |
Janani Sunil | 0:6ca37a8f8ba9 | 75 |