rtt_board.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * Copyright (c) 2021 hpmicro
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. *
  6. */
  7. #ifndef _RTT_BOARD_H
  8. #define _RTT_BOARD_H
  9. #include "hpm_common.h"
  10. #include "hpm_soc.h"
  11. #include <drv_gpio.h>
  12. /* gpio section */
  13. #define APP_LED0_PIN_NUM GET_PIN(A, 7)
  14. #define APP_LED_ON (0)
  15. #define APP_LED_OFF (1)
  16. /* mchtimer section */
  17. #define BOARD_MCHTMR_FREQ_IN_HZ (24000000UL)
  18. /* CAN section */
  19. #define BOARD_CAN_NAME "can0"
  20. /***************************************************************
  21. *
  22. * RT-Thread related definitions
  23. *
  24. **************************************************************/
  25. extern unsigned int __heap_start__;
  26. extern unsigned int __heap_end__;
  27. #define RT_HW_HEAP_BEGIN ((void*)&__heap_start__)
  28. #define RT_HW_HEAP_END ((void*)&__heap_end__)
  29. typedef struct {
  30. uint16_t vdd;
  31. uint8_t bus_width;
  32. uint8_t drive_strength;
  33. }sdxc_io_cfg_t;
  34. void app_init_led_pins(void);
  35. void app_led_write(uint32_t index, bool state);
  36. #if defined(__cplusplus)
  37. extern "C" {
  38. #endif /* __cplusplus */
  39. #if defined(__cplusplus)
  40. }
  41. #endif /* __cplusplus */
  42. #endif /* _RTT_BOARD_H */