ti_msp_dl_config.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. * Copyright (c) 2023, Texas Instruments Incorporated - http://www.ti.com
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. *
  9. * * Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. *
  12. * * Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. *
  16. * * Neither the name of Texas Instruments Incorporated nor the names of
  17. * its contributors may be used to endorse or promote products derived
  18. * from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  21. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  22. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  23. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  24. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  25. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  26. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  27. * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  28. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  29. * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  30. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. */
  32. /*
  33. * ============ ti_msp_dl_config.h =============
  34. * Configured MSPM0 DriverLib module declarations
  35. *
  36. * DO NOT EDIT - This file is generated for the MSPM0G350X
  37. * by the SysConfig tool.
  38. */
  39. #ifndef ti_msp_dl_config_h
  40. #define ti_msp_dl_config_h
  41. #define CONFIG_MSPM0G350X
  42. #define CONFIG_MSPM0G3507
  43. #if defined(__ti_version__) || defined(__TI_COMPILER_VERSION__)
  44. #define SYSCONFIG_WEAK __attribute__((weak))
  45. #elif defined(__IAR_SYSTEMS_ICC__)
  46. #define SYSCONFIG_WEAK __weak
  47. #elif defined(__GNUC__)
  48. #define SYSCONFIG_WEAK __attribute__((weak))
  49. #endif
  50. #include <ti/devices/msp/msp.h>
  51. #include <ti/driverlib/driverlib.h>
  52. #include <ti/driverlib/m0p/dl_core.h>
  53. #ifdef __cplusplus
  54. extern "C" {
  55. #endif
  56. /*
  57. * ======== SYSCFG_DL_init ========
  58. * Perform all required MSP DL initialization
  59. *
  60. * This function should be called once at a point before any use of
  61. * MSP DL.
  62. */
  63. /* clang-format off */
  64. #define POWER_STARTUP_DELAY (16)
  65. #define CPUCLK_FREQ 32000000
  66. /* Defines for I2C_controller */
  67. #define I2C_controller_INST I2C1
  68. #define I2C_controller_INST_IRQHandler I2C1_IRQHandler
  69. #define I2C_controller_INST_INT_IRQN I2C1_INT_IRQn
  70. #define I2C_controller_BUS_SPEED_HZ 100000
  71. #define GPIO_I2C_controller_SDA_PORT GPIOB
  72. #define GPIO_I2C_controller_SDA_PIN DL_GPIO_PIN_3
  73. #define GPIO_I2C_controller_IOMUX_SDA (IOMUX_PINCM16)
  74. #define GPIO_I2C_controller_IOMUX_SDA_FUNC IOMUX_PINCM16_PF_I2C1_SDA
  75. #define GPIO_I2C_controller_SCL_PORT GPIOB
  76. #define GPIO_I2C_controller_SCL_PIN DL_GPIO_PIN_2
  77. #define GPIO_I2C_controller_IOMUX_SCL (IOMUX_PINCM15)
  78. #define GPIO_I2C_controller_IOMUX_SCL_FUNC IOMUX_PINCM15_PF_I2C1_SCL
  79. /* Defines for CRC */
  80. #define CRC_SEED (0xFFFF)
  81. /* clang-format on */
  82. void SYSCFG_DL_init(void);
  83. void SYSCFG_DL_initPower(void);
  84. void SYSCFG_DL_GPIO_init(void);
  85. void SYSCFG_DL_SYSCTL_init(void);
  86. void SYSCFG_DL_I2C_controller_init(void);
  87. void SYSCFG_DL_CRC_init(void);
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91. #endif /* ti_msp_dl_config_h */