移植到stm32f1,实现手动线赋码控制器功能
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
#include "stm32f4xx.h"
|
||||
#include "stm32f10x.h"
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
#include "board.h"
|
||||
@@ -36,14 +36,15 @@ static uint32_t _SysTick_Config(rt_uint32_t ticks)
|
||||
}
|
||||
|
||||
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
|
||||
static uint32_t g_heap[20*1024/4];
|
||||
RT_WEAK void *rt_heap_begin_get(void)
|
||||
{
|
||||
return (void *)0x10000000;
|
||||
return (void *)g_heap;
|
||||
}
|
||||
|
||||
RT_WEAK void *rt_heap_end_get(void)
|
||||
{
|
||||
return (void *)(0x10000000+0x10000);
|
||||
return (void *)((int)g_heap+sizeof(g_heap));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -54,9 +55,9 @@ RT_WEAK void *rt_heap_end_get(void)
|
||||
|
||||
void rt_hw_board_init()
|
||||
{
|
||||
NVIC_SetVectorTable(NVIC_VectTab_FLASH,0x20000);
|
||||
NVIC_SetVectorTable(NVIC_VectTab_FLASH,0x4000);
|
||||
// 1ms一个tick
|
||||
_SysTick_Config (168000000/1000);
|
||||
_SysTick_Config (72000000/1000);
|
||||
rt_system_heap_init(rt_heap_begin_get(),rt_heap_end_get());
|
||||
mem_init();
|
||||
tempptr_init();
|
||||
|
Reference in New Issue
Block a user