1 /* 2 * Copyright (c) 2021 hpmicro 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 * 6 */ 7 8 #ifndef _RTT_BOARD_H 9 #define _RTT_BOARD_H 10 #include "hpm_common.h" 11 #include "hpm_soc.h" 12 #include <drv_gpio.h> 13 14 /* gpio section */ 15 #define APP_LED0_PIN_NUM GET_PIN(A, 10) 16 #define APP_LED_ON (1) 17 #define APP_LED_OFF (0) 18 19 20 21 /* mchtimer section */ 22 #define BOARD_MCHTMR_FREQ_IN_HZ (24000000UL) 23 24 /* CAN section */ 25 #define BOARD_CAN_NAME "can0" 26 #define BOARD_CAN_HWFILTER_INDEX (0U) 27 28 /* UART section */ 29 #define BOARD_UART_NAME "uart2" 30 #define BOARD_UART_RX_BUFFER_SIZE BSP_UART2_RX_BUFSIZE 31 32 #define IRQn_PendSV IRQn_DEBUG0 33 34 /*************************************************************** 35 * 36 * RT-Thread related definitions 37 * 38 **************************************************************/ 39 extern unsigned int __heap_start__; 40 extern unsigned int __heap_end__; 41 42 #define RT_HW_HEAP_BEGIN ((void*)&__heap_start__) 43 #define RT_HW_HEAP_END ((void*)&__heap_end__) 44 45 46 typedef struct { 47 uint16_t vdd; 48 uint8_t bus_width; 49 uint8_t drive_strength; 50 }sdxc_io_cfg_t; 51 52 void app_init_led_pins(void); 53 void app_led_write(uint32_t index, bool state); 54 void app_init_usb_pins(void); 55 56 #if defined(__cplusplus) 57 extern "C" { 58 #endif /* __cplusplus */ 59 60 61 62 63 #if defined(__cplusplus) 64 } 65 #endif /* __cplusplus */ 66 #endif /* _RTT_BOARD_H */ 67