mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
px4_init:Split out console init to create null device to be used in non PX4 platform bsp (bootloadres)
This commit is contained in:
committed by
Daniel Agar
parent
021bc284c1
commit
8797823333
@@ -34,6 +34,7 @@
|
||||
__BEGIN_DECLS
|
||||
|
||||
int px4_platform_init(void);
|
||||
int px4_platform_console_init(void);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
int px4_platform_init(void)
|
||||
int px4_platform_console_init(void)
|
||||
{
|
||||
#if !defined(CONFIG_DEV_CONSOLE) && defined(CONFIG_DEV_NULL)
|
||||
|
||||
@@ -75,11 +75,23 @@ int px4_platform_init(void)
|
||||
}
|
||||
|
||||
return -ENFILE;
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
|
||||
int ret = px4_console_buffer_init();
|
||||
int px4_platform_init(void)
|
||||
{
|
||||
|
||||
int ret = px4_platform_console_init();
|
||||
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = px4_console_buffer_init();
|
||||
|
||||
if (ret < 0) {
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user