2022-07-30 14:10:51 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2022-07-15 Emuzit first version
|
|
|
|
*/
|
|
|
|
#ifndef __BOARD_H__
|
|
|
|
#define __BOARD_H__
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "ch56x_sys.h"
|
|
|
|
#include "ch56x_gpio.h"
|
2022-08-02 10:36:49 +08:00
|
|
|
#include "ch56x_spi.h"
|
2022-08-10 00:18:20 +08:00
|
|
|
#include "ch56x_pwm.h"
|
2022-07-30 14:10:51 +08:00
|
|
|
|
|
|
|
#define LED0_PIN GET_PIN(B, 24)
|
|
|
|
#define LED1_PIN GET_PIN(B, 22)
|
|
|
|
#define LED2_PIN GET_PIN(B, 23)
|
|
|
|
|
2022-08-02 10:36:49 +08:00
|
|
|
#define W25Q32_CS_PIN GET_PIN(A, 12)
|
|
|
|
#define W25Q32_SPI_NAME "spi00"
|
|
|
|
|
2022-07-30 14:10:51 +08:00
|
|
|
#define SYS_HCLK_FREQ 80000000 // 80 MHz
|
|
|
|
|
|
|
|
#define RAMX_SIZE 32 // USER_MEM 00/01/1x : 32/64/96 KB
|
|
|
|
#define RAMX_END (RAMX_BASE_ADDRESS + RAMX_SIZE * 1024)
|
|
|
|
|
|
|
|
extern uint32_t _ebss, _heap_end;
|
|
|
|
extern uint32_t _susrstack, _eusrstack;
|
|
|
|
|
|
|
|
#define HEAP_BEGIN ((void *)&_ebss)
|
|
|
|
#define HEAP_END ((void *)&_heap_end)
|
|
|
|
#define SUSRSTACK ((void *)&_susrstack)
|
|
|
|
#define EUSRSTACK ((void *)&_eusrstack)
|
|
|
|
|
|
|
|
void rt_hw_board_init(void);
|
|
|
|
|
|
|
|
#endif /* __BOARD_H__ */
|