Files
RS485_T1_Transition/Source/arch/mem_init.c
yeyangwen 5a726f7378 feat:修改设备类型
feat:修改为红外转发设备,将中弘网关协议转换为主机红外协议
2026-02-09 17:48:39 +08:00

45 lines
796 B
C

/*
* Filename : mem_init.c
*
* Memory Initialization
*
* Copyrights 2015 @ APTCHIP
*
*
*/
#include "string.h"
extern char _end_rodata[];
extern char _start_data[];
extern char _end_data[];
extern char _bss_start[];
extern char _ebss[];
void __main( void )
{
char *dst = _start_data;
char *src = _end_rodata;
/* if the start of data (dst)
is not equal to end of text (src) then
copy it, else it's already in the right place
*/
if( _start_data != _end_rodata ) {
// __memcpy_fast( dst, src, (_end_data - _start_data));
memcpy( dst, src, (_end_data - _start_data));
}
/* zero the bss
*/
if( _ebss - _bss_start ) {
// __memset_fast( _bss_start, 0x00, ( _ebss - _bss_start ));
memset( _bss_start, 0x00, ( _ebss - _bss_start ));
}
}