Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: sdp_k1_sdram
app/app_config_mbed.c@2:007533849deb, 2022-07-21 (annotated)
- Committer:
- Mahesh Phalke
- Date:
- Thu Jul 21 16:45:24 2022 +0530
- Revision:
- 2:007533849deb
Initial firmware commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Mahesh Phalke |
2:007533849deb | 1 | /***************************************************************************//** |
Mahesh Phalke |
2:007533849deb | 2 | * @file app_config_mbed.c |
Mahesh Phalke |
2:007533849deb | 3 | * @brief Application configurations module for Mbed platform |
Mahesh Phalke |
2:007533849deb | 4 | ******************************************************************************** |
Mahesh Phalke |
2:007533849deb | 5 | * Copyright (c) 2021-22 Analog Devices, Inc. |
Mahesh Phalke |
2:007533849deb | 6 | * All rights reserved. |
Mahesh Phalke |
2:007533849deb | 7 | * |
Mahesh Phalke |
2:007533849deb | 8 | * This software is proprietary to Analog Devices, Inc. and its licensors. |
Mahesh Phalke |
2:007533849deb | 9 | * By using this software you agree to the terms of the associated |
Mahesh Phalke |
2:007533849deb | 10 | * Analog Devices Software License Agreement. |
Mahesh Phalke |
2:007533849deb | 11 | *******************************************************************************/ |
Mahesh Phalke |
2:007533849deb | 12 | |
Mahesh Phalke |
2:007533849deb | 13 | /******************************************************************************/ |
Mahesh Phalke |
2:007533849deb | 14 | /***************************** Include Files **********************************/ |
Mahesh Phalke |
2:007533849deb | 15 | /******************************************************************************/ |
Mahesh Phalke |
2:007533849deb | 16 | |
Mahesh Phalke |
2:007533849deb | 17 | #include <stdbool.h> |
Mahesh Phalke |
2:007533849deb | 18 | #include "app_config.h" |
Mahesh Phalke |
2:007533849deb | 19 | #include "app_config_mbed.h" |
Mahesh Phalke |
2:007533849deb | 20 | |
Mahesh Phalke |
2:007533849deb | 21 | /******************************************************************************/ |
Mahesh Phalke |
2:007533849deb | 22 | /************************ Macros/Constants ************************************/ |
Mahesh Phalke |
2:007533849deb | 23 | /******************************************************************************/ |
Mahesh Phalke |
2:007533849deb | 24 | |
Mahesh Phalke |
2:007533849deb | 25 | /******************************************************************************/ |
Mahesh Phalke |
2:007533849deb | 26 | /******************** Variables and User Defined Data Types *******************/ |
Mahesh Phalke |
2:007533849deb | 27 | /******************************************************************************/ |
Mahesh Phalke |
2:007533849deb | 28 | |
Mahesh Phalke |
2:007533849deb | 29 | /* UART Mbed platform specific init parameters */ |
Mahesh Phalke |
2:007533849deb | 30 | struct mbed_uart_init_param mbed_uart_extra_init_params = { |
Mahesh Phalke |
2:007533849deb | 31 | #if defined(USE_PHY_COM_PORT) |
Mahesh Phalke |
2:007533849deb | 32 | .virtual_com_enable = false, |
Mahesh Phalke |
2:007533849deb | 33 | .uart_tx_pin = UART_TX, |
Mahesh Phalke |
2:007533849deb | 34 | .uart_rx_pin = UART_RX |
Mahesh Phalke |
2:007533849deb | 35 | #else |
Mahesh Phalke |
2:007533849deb | 36 | .virtual_com_enable = true, |
Mahesh Phalke |
2:007533849deb | 37 | .vendor_id = VIRTUAL_COM_PORT_VID, |
Mahesh Phalke |
2:007533849deb | 38 | .product_id = VIRTUAL_COM_PORT_PID, |
Mahesh Phalke |
2:007533849deb | 39 | .serial_number = VIRTUAL_COM_SERIAL_NUM |
Mahesh Phalke |
2:007533849deb | 40 | #endif |
Mahesh Phalke |
2:007533849deb | 41 | }; |
Mahesh Phalke |
2:007533849deb | 42 | |
Mahesh Phalke |
2:007533849deb | 43 | /* External interrupt Mbed platform specific parameters */ |
Mahesh Phalke |
2:007533849deb | 44 | struct mbed_irq_init_param mbed_ext_int_extra_init_params = { |
Mahesh Phalke |
2:007533849deb | 45 | .int_mode = EXT_IRQ_FALL, |
Mahesh Phalke |
2:007533849deb | 46 | .ext_int_pin = INT_EVENT, |
Mahesh Phalke |
2:007533849deb | 47 | .int_obj_type = NULL |
Mahesh Phalke |
2:007533849deb | 48 | }; |
Mahesh Phalke |
2:007533849deb | 49 | |
Mahesh Phalke |
2:007533849deb | 50 | struct mbed_pwm_init_param mbed_pwm_extra_init_params = { |
Mahesh Phalke |
2:007533849deb | 51 | .pwm_pin = PWM_TRIGGER |
Mahesh Phalke |
2:007533849deb | 52 | }; |
Mahesh Phalke |
2:007533849deb | 53 | |
Mahesh Phalke |
2:007533849deb | 54 | /* SPI Mbed platform specific parameters */ |
Mahesh Phalke |
2:007533849deb | 55 | struct mbed_spi_init_param mbed_spi_extra_init_params = { |
Mahesh Phalke |
2:007533849deb | 56 | .spi_clk_pin = SPI_SCK, |
Mahesh Phalke |
2:007533849deb | 57 | .spi_miso_pin = SPI_HOST_SDI, |
Mahesh Phalke |
2:007533849deb | 58 | .spi_mosi_pin = SPI_HOST_SDO |
Mahesh Phalke |
2:007533849deb | 59 | }; |
Mahesh Phalke |
2:007533849deb | 60 | |
Mahesh Phalke |
2:007533849deb | 61 | /******************************************************************************/ |
Mahesh Phalke |
2:007533849deb | 62 | /************************** Functions Declarations ****************************/ |
Mahesh Phalke |
2:007533849deb | 63 | /******************************************************************************/ |
Mahesh Phalke |
2:007533849deb | 64 | |
Mahesh Phalke |
2:007533849deb | 65 | /******************************************************************************/ |
Mahesh Phalke |
2:007533849deb | 66 | /************************** Functions Definitions *****************************/ |
Mahesh Phalke |
2:007533849deb | 67 | /******************************************************************************/ |