1 Star 1 Fork 0

ft.ink/ft_os

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ft_os.c 1.15 KB
一键复制 编辑 原始数据 按行查看 历史
alm 提交于 2024-09-06 18:25 . add: call
#include "ft_os.h" //part of ft_os.h
FT_Public I32 ft_os_init()
{
/*Test if the IDE has UTF-8 encoding*/
Str txt = "Á";
U8 * txt_u8 = (U8 *)txt;
if(txt_u8[0] != 0xc3 || txt_u8[1] != 0x81 || txt_u8[2] != 0x00) {
ft_logW("The strings have no UTF-8 encoding. Non-ASCII characters won't be displayed.");
}
U32 endianess_test = 0x11223344;
U8 * endianess_test_p = (U8 *) &endianess_test;
Bool big_endian = endianess_test_p[0] == 0x11 ? true : false;
if(big_endian) {
FT_ASSERT_MSG(FT_BIG_ENDIAN_SYSTEM == 1,
"It's a big endian system but FT_BIG_ENDIAN_SYSTEM is not enabled in ft_conf.h");
}
else {
FT_ASSERT_MSG(FT_BIG_ENDIAN_SYSTEM == 0,
"It's a little endian system but FT_BIG_ENDIAN_SYSTEM is enabled in ft_conf.h");
}
_ft_fs_init();
#if FT_USE_FS_FATFS != '\0'
ft_fs_fatfs_init();
#endif
#if FT_USE_FS_STDIO != '\0'
ft_fs_stdio_init();
#endif
#if FT_USE_FS_POSIX != '\0'
ft_fs_posix_init();
#endif
#if FT_USE_FS_WIN32 != '\0'
ft_fs_win32_init();
#endif
_ft_timer_core_init();
}
FT_Public I32 ft_os_deinit()
{
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/ft-ink/ft_os.git
[email protected]:ft-ink/ft_os.git
ft-ink
ft_os
ft_os
main

搜索帮助