ti_msp_dl_config.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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 MSPM0L130X
  37. * by the SysConfig tool.
  38. */
  39. #ifndef ti_msp_dl_config_h
  40. #define ti_msp_dl_config_h
  41. #define CONFIG_MSPM0L130X
  42. #define CONFIG_MSPM0L1304
  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 PWM_0 */
  67. #define PWM_0_INST TIMG1
  68. #define PWM_0_INST_IRQHandler TIMG1_IRQHandler
  69. #define PWM_0_INST_INT_IRQN (TIMG1_INT_IRQn)
  70. #define PWM_0_INST_CLK_FREQ 32000000
  71. /* GPIO defines for channel 0 */
  72. #define GPIO_PWM_0_C0_PORT GPIOA
  73. #define GPIO_PWM_0_C0_PIN DL_GPIO_PIN_26
  74. #define GPIO_PWM_0_C0_IOMUX (IOMUX_PINCM27)
  75. #define GPIO_PWM_0_C0_IOMUX_FUNC IOMUX_PINCM27_PF_TIMG1_CCP0
  76. #define GPIO_PWM_0_C0_IDX DL_TIMER_CC_0_INDEX
  77. /* Defines for I2C_controller */
  78. #define I2C_controller_INST I2C1
  79. #define I2C_controller_INST_IRQHandler I2C1_IRQHandler
  80. #define I2C_controller_INST_INT_IRQN I2C1_INT_IRQn
  81. #define I2C_controller_BUS_SPEED_HZ 100000
  82. #define GPIO_I2C_controller_SDA_PORT GPIOA
  83. #define GPIO_I2C_controller_SDA_PIN DL_GPIO_PIN_18
  84. #define GPIO_I2C_controller_IOMUX_SDA (IOMUX_PINCM19)
  85. #define GPIO_I2C_controller_IOMUX_SDA_FUNC IOMUX_PINCM19_PF_I2C1_SDA
  86. #define GPIO_I2C_controller_SCL_PORT GPIOA
  87. #define GPIO_I2C_controller_SCL_PIN DL_GPIO_PIN_17
  88. #define GPIO_I2C_controller_IOMUX_SCL (IOMUX_PINCM18)
  89. #define GPIO_I2C_controller_IOMUX_SCL_FUNC IOMUX_PINCM18_PF_I2C1_SCL
  90. /* Defines for I2C_target */
  91. #define I2C_target_INST I2C0
  92. #define I2C_target_INST_IRQHandler I2C0_IRQHandler
  93. #define I2C_target_INST_INT_IRQN I2C0_INT_IRQn
  94. #define I2C_target_TARGET_OWN_ADDR 0x48
  95. #define GPIO_I2C_target_SDA_PORT GPIOA
  96. #define GPIO_I2C_target_SDA_PIN DL_GPIO_PIN_0
  97. #define GPIO_I2C_target_IOMUX_SDA (IOMUX_PINCM1)
  98. #define GPIO_I2C_target_IOMUX_SDA_FUNC IOMUX_PINCM1_PF_I2C0_SDA
  99. #define GPIO_I2C_target_SCL_PORT GPIOA
  100. #define GPIO_I2C_target_SCL_PIN DL_GPIO_PIN_1
  101. #define GPIO_I2C_target_IOMUX_SCL (IOMUX_PINCM2)
  102. #define GPIO_I2C_target_IOMUX_SCL_FUNC IOMUX_PINCM2_PF_I2C0_SCL
  103. /* clang-format on */
  104. void SYSCFG_DL_init(void);
  105. void SYSCFG_DL_initPower(void);
  106. void SYSCFG_DL_GPIO_init(void);
  107. void SYSCFG_DL_SYSCTL_init(void);
  108. void SYSCFG_DL_PWM_0_init(void);
  109. void SYSCFG_DL_I2C_controller_init(void);
  110. void SYSCFG_DL_I2C_target_init(void);
  111. #ifdef __cplusplus
  112. }
  113. #endif
  114. #endif /* ti_msp_dl_config_h */