board.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. * Copyright (c) 2006-2022, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2022-07-15 Emuzit first version
  9. */
  10. #ifndef __BOARD_H__
  11. #define __BOARD_H__
  12. #include <stdint.h>
  13. #include "ch56x_sys.h"
  14. #include "ch56x_gpio.h"
  15. #include "ch56x_spi.h"
  16. #include "ch56x_pwm.h"
  17. #define LED0_PIN GET_PIN(B, 24)
  18. #define LED1_PIN GET_PIN(B, 22)
  19. #define LED2_PIN GET_PIN(B, 23)
  20. #define W25Q32_CS_PIN GET_PIN(A, 12)
  21. #define W25Q32_SPI_NAME "spi00"
  22. #define SYS_HCLK_FREQ 80000000 // 80 MHz
  23. #define RAMX_SIZE 32 // USER_MEM 00/01/1x : 32/64/96 KB
  24. #define RAMX_END (RAMX_BASE_ADDRESS + RAMX_SIZE * 1024)
  25. extern uint32_t _ebss, _heap_end;
  26. extern uint32_t _susrstack, _eusrstack;
  27. #define HEAP_BEGIN ((void *)&_ebss)
  28. #define HEAP_END ((void *)&_heap_end)
  29. #define SUSRSTACK ((void *)&_susrstack)
  30. #define EUSRSTACK ((void *)&_eusrstack)
  31. void rt_hw_board_init(void);
  32. #endif /* __BOARD_H__ */