kestrel.h 897 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
// © 2021 Raptor Engineering, LLC
//
// Released under the terms of the GPL v3
// See the LICENSE file for full details

#if (WITH_ZEPHYR)
#include <shell/shell.h>
#endif

#if (WITH_ZEPHYR)
#define KESTREL_SERVICE_THREAD_PRIORITY		K_PRIO_COOP(1)
#endif

extern uint8_t kestrel_basic_init_complete;
extern uint8_t host_background_service_task_active;
extern uint8_t host_console_service_task_requested;

#if (WITH_ZEPHYR)
extern k_tid_t kestrel_service_thread_id;
extern k_tid_t kestrel_console_thread_id;
extern const struct shell *host_console_service_task_shell;
#endif

int kestrel_init(void);
int power_on_host(void);
void power_off_chassis(void);
void print_chassis_status(void);

int primary_service_event_loop(void);

#if (WITH_ZEPHYR)
int attach_to_host_console(const struct shell *shell);
int host_console_event_loop(const struct shell *shell);
#else
int attach_to_host_console();
#endif