mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08: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
|
__BEGIN_DECLS
|
||||||
|
|
||||||
int px4_platform_init(void);
|
int px4_platform_init(void);
|
||||||
|
int px4_platform_console_init(void);
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
int px4_platform_init(void)
|
int px4_platform_console_init(void)
|
||||||
{
|
{
|
||||||
#if !defined(CONFIG_DEV_CONSOLE) && defined(CONFIG_DEV_NULL)
|
#if !defined(CONFIG_DEV_CONSOLE) && defined(CONFIG_DEV_NULL)
|
||||||
|
|
||||||
@@ -75,11 +75,23 @@ int px4_platform_init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return -ENFILE;
|
return -ENFILE;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#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) {
|
if (ret < 0) {
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user