You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
6.3KB

  1. /*
  2. * Copyright 2019 NXP
  3. * All rights reserved.
  4. *
  5. * SPDX-License-Identifier: BSD-3-Clause
  6. */
  7. #ifndef _BOARD_H_
  8. #define _BOARD_H_
  9. //#include "clock_config.h"
  10. #include "fsl_common.h"
  11. //#include "fsl_gpio.h"
  12. //
  13. ///*******************************************************************************
  14. // * Definitions
  15. // ******************************************************************************/
  16. ///*! @brief The board name */
  17. //#define BOARD_NAME "MIMXRT1010-EVK"
  18. //
  19. ///* The UART to use for debug messages. */
  20. //#define BOARD_DEBUG_UART_TYPE kSerialPort_Uart
  21. //#define BOARD_DEBUG_UART_BASEADDR (uint32_t) LPUART1
  22. //#define BOARD_DEBUG_UART_INSTANCE 1U
  23. //
  24. //#define BOARD_DEBUG_UART_CLK_FREQ BOARD_DebugConsoleSrcFreq()
  25. //
  26. //#define BOARD_UART_IRQ LPUART1_IRQn
  27. //#define BOARD_UART_IRQ_HANDLER LPUART1_IRQHandler
  28. //
  29. //#ifndef BOARD_DEBUG_UART_BAUDRATE
  30. //#define BOARD_DEBUG_UART_BAUDRATE (115200U)
  31. //#endif /* BOARD_DEBUG_UART_BAUDRATE */
  32. //
  33. ///* @Brief Board accelerator sensor configuration */
  34. //#define BOARD_ACCEL_I2C_BASEADDR LPI2C1
  35. //#define BOARD_ACCEL_I2C_CLOCK_SOURCE_SELECT (0U)
  36. //#define BOARD_ACCEL_I2C_CLOCK_SOURCE_DIVIDER (5U)
  37. //#define BOARD_ACCEL_I2C_CLOCK_FREQ (CLOCK_GetFreq(kCLOCK_Usb1PllClk) / 8 / (BOARD_ACCEL_I2C_CLOCK_SOURCE_DIVIDER + 1U))
  38. //
  39. //#define BOARD_CODEC_I2C_BASEADDR LPI2C1
  40. //#define BOARD_CODEC_I2C_INSTANCE 1U
  41. //#define BOARD_CODEC_I2C_CLOCK_SOURCE_SELECT (0U)
  42. //#define BOARD_CODEC_I2C_CLOCK_SOURCE_DIVIDER (5U)
  43. //#define BOARD_CODEC_I2C_CLOCK_FREQ (10000000U)
  44. //
  45. ///*! @brief The USER_LED used for board */
  46. //#define LOGIC_LED_ON (0U)
  47. //#define LOGIC_LED_OFF (1U)
  48. //#ifndef BOARD_USER_LED_GPIO
  49. //#define BOARD_USER_LED_GPIO GPIO1
  50. //#endif
  51. //#ifndef BOARD_USER_LED_GPIO_PIN
  52. //#define BOARD_USER_LED_GPIO_PIN (11U)
  53. //#endif
  54. //
  55. /*#define USER_LED_INIT(output) \
  56. GPIO_PinWrite(BOARD_USER_LED_GPIO, BOARD_USER_LED_GPIO_PIN, output); \
  57. BOARD_USER_LED_GPIO->GDIR |= (1U << BOARD_USER_LED_GPIO_PIN)
  58. */
  59. //#define USER_LED_OFF() GPIO_PortClear(BOARD_USER_LED_GPIO, 1U << BOARD_USER_LED_GPIO_PIN)
  60. //#define USER_LED_ON() GPIO_PortSet(BOARD_USER_LED_GPIO, 1U << BOARD_USER_LED_GPIO_PIN) /*!<Turn on target USER_LED*/
  61. /*#define USER_LED_TOGGLE() \
  62. GPIO_PinWrite(BOARD_USER_LED_GPIO, BOARD_USER_LED_GPIO_PIN, \
  63. 0x1 ^ GPIO_PinRead(BOARD_USER_LED_GPIO, BOARD_USER_LED_GPIO_PIN))
  64. */
  65. ///*! @brief Define the port interrupt number for the board switches */
  66. //#ifndef BOARD_USER_BUTTON_GPIO
  67. //#define BOARD_USER_BUTTON_GPIO GPIO2
  68. //#endif
  69. //#ifndef BOARD_USER_BUTTON_GPIO_PIN
  70. //#define BOARD_USER_BUTTON_GPIO_PIN (5U)
  71. //#endif
  72. //#define BOARD_USER_BUTTON_IRQ GPIO2_Combined_0_15_IRQn
  73. //#define BOARD_USER_BUTTON_IRQ_HANDLER GPIO2_Combined_0_15_IRQHandler
  74. //#define BOARD_USER_BUTTON_NAME "SW4"
  75. //
  76. ///*! @brief The flash size */
  77. #define BOARD_FLASH_SIZE (0x1000000U)
  78. //
  79. ///* USB PHY condfiguration */
  80. //#define BOARD_USB_PHY_D_CAL (0x0CU)
  81. //#define BOARD_USB_PHY_TXCAL45DP (0x06U)
  82. //#define BOARD_USB_PHY_TXCAL45DM (0x06U)
  83. //
  84. //#define BOARD_ARDUINO_INT_IRQ (GPIO1_Combined_16_31_IRQn)
  85. //#define BOARD_ARDUINO_I2C_IRQ (LPI2C1_IRQn)
  86. //#define BOARD_ARDUINO_I2C_INDEX (1)
  87. //
  88. ///*! @brief The WIFI-QCA shield pin. */
  89. //#define BOARD_INITSILEX2401SHIELD_PWRON_GPIO GPIO1 /*!< GPIO device name: GPIO */
  90. //#define BOARD_INITSILEX2401SHIELD_PWRON_PORT 1U /*!< PORT device index: 1 */
  91. //#define BOARD_INITSILEX2401SHIELD_PWRON_GPIO_PIN 8U /*!< PIO1 pin index: 8 */
  92. //#define BOARD_INITSILEX2401SHIELD_PWRON_PIN_NAME GPIO1_08 /*!< Pin name */
  93. //#define BOARD_INITSILEX2401SHIELD_PWRON_LABEL "PWRON" /*!< Label */
  94. //#define BOARD_INITSILEX2401SHIELD_PWRON_NAME "PWRON" /*!< Identifier name */
  95. //#define BOARD_INITSILEX2401SHIELD_PWRON_DIRECTION kGPIO_DigitalOutput /*!< Direction */
  96. //
  97. //#define BOARD_INITSILEX2401SHIELD_IRQ_GPIO GPIO1 /*!< GPIO device name: GPIO */
  98. //#define BOARD_INITSILEX2401SHIELD_IRQ_PORT 1U /*!< PORT device index: 1 */
  99. //#define BOARD_INITSILEX2401SHIELD_IRQ_GPIO_PIN 4U /*!< PIO1 pin index: 4 */
  100. //#define BOARD_INITSILEX2401SHIELD_IRQ_PIN_NAME GPIO1_04 /*!< Pin name */
  101. //#define BOARD_INITSILEX2401SHIELD_IRQ_LABEL "IRQ" /*!< Label */
  102. //#define BOARD_INITSILEX2401SHIELD_IRQ_NAME "IRQ" /*!< Identifier name */
  103. //#define BOARD_INITSILEX2401SHIELD_IRQ_DIRECTION kGPIO_DigitalInput /*!< Direction */
  104. //
  105. //#if defined(__cplusplus)
  106. //extern "C" {
  107. //#endif /* __cplusplus */
  108. //
  109. ///*******************************************************************************
  110. // * API
  111. // ******************************************************************************/
  112. //uint32_t BOARD_DebugConsoleSrcFreq(void);
  113. //
  114. //void BOARD_InitDebugConsole(void);
  115. //void BOARD_ConfigMPU(void);
  116. //#if defined(SDK_I2C_BASED_COMPONENT_USED) && SDK_I2C_BASED_COMPONENT_USED
  117. //void BOARD_InitDebugConsole(void);
  118. //void BOARD_LPI2C_Init(LPI2C_Type *base, uint32_t clkSrc_Hz);
  119. //status_t BOARD_LPI2C_Send(LPI2C_Type *base,
  120. // uint8_t deviceAddress,
  121. // uint32_t subAddress,
  122. // uint8_t subaddressSize,
  123. // uint8_t *txBuff,
  124. // uint8_t txBuffSize);
  125. //status_t BOARD_LPI2C_Receive(LPI2C_Type *base,
  126. // uint8_t deviceAddress,
  127. // uint32_t subAddress,
  128. // uint8_t subaddressSize,
  129. // uint8_t *rxBuff,
  130. // uint8_t rxBuffSize);
  131. //void BOARD_Accel_I2C_Init(void);
  132. //status_t BOARD_Accel_I2C_Send(uint8_t deviceAddress, uint32_t subAddress, uint8_t subaddressSize, uint32_t txBuff);
  133. //status_t BOARD_Accel_I2C_Receive(
  134. // uint8_t deviceAddress, uint32_t subAddress, uint8_t subaddressSize, uint8_t *rxBuff, uint8_t rxBuffSize);
  135. //void BOARD_Codec_I2C_Init(void);
  136. //status_t BOARD_Codec_I2C_Send(
  137. // uint8_t deviceAddress, uint32_t subAddress, uint8_t subAddressSize, const uint8_t *txBuff, uint8_t txBuffSize);
  138. //status_t BOARD_Codec_I2C_Receive(
  139. // uint8_t deviceAddress, uint32_t subAddress, uint8_t subAddressSize, uint8_t *rxBuff, uint8_t rxBuffSize);
  140. //#endif /* SDK_I2C_BASED_COMPONENT_USED */
  141. //#if defined(__cplusplus)
  142. //}
  143. //#endif /* __cplusplus */
  144. #endif /* _BOARD_H_ */