[beken-72xx] Remove unused components

This commit is contained in:
Kuba Szczodrzyński
2022-06-14 17:28:00 +02:00
parent f2abb564c7
commit 56dd57f4a0
4 changed files with 19 additions and 87 deletions

View File

@@ -10,15 +10,11 @@
****************************************************************************************
*/
#include "app.h"
#include "ate_app.h"
#include "driver_pub.h"
#include "func_pub.h"
#include "include.h"
#include "start_type_pub.h"
beken_semaphore_t extended_app_sema = NULL;
uint32_t extended_app_stack_size = 2048;
extern void user_main_entry(void);
#if CFG_SUPPORT_BOOTLOADER
@@ -27,58 +23,9 @@ void entry_set_world_flag(void) {
}
#endif // CFG_SUPPORT_BOOTLOADER
void extended_app_launch_over(void) {
OSStatus ret;
ret = rtos_set_semaphore(&extended_app_sema);
(void)ret;
}
void extended_app_waiting_for_launch(void) {
OSStatus ret;
ret = rtos_get_semaphore(&extended_app_sema, BEKEN_WAIT_FOREVER);
ASSERT(kNoErr == ret);
(void)ret;
}
static void extended_app_task_handler(void *arg) {
func_init_extended();
if (get_ate_mode_state()) {
ate_start();
} else {
app_start();
}
extended_app_launch_over();
rtos_delete_thread(NULL);
}
void extended_app_init(void) {
OSStatus ret;
ret = rtos_init_semaphore(&extended_app_sema, 1);
ASSERT(kNoErr == ret);
}
void extended_app_uninit(void) {
OSStatus ret;
ret = rtos_deinit_semaphore(&extended_app_sema);
ASSERT(kNoErr == ret);
}
void extended_app_launch(void) {
OSStatus ret;
ret = rtos_create_thread(
NULL,
THD_EXTENDED_APP_PRIORITY,
"extended_app",
(beken_thread_function_t)extended_app_task_handler,
extended_app_stack_size,
(beken_thread_arg_t)0
);
ASSERT(kNoErr == ret);
}
extern void main(void);
void entry_main(void) {
// check GPIO0 and start ATE app
ate_app_init();
// compatibility with BK7231S_1.0.5
#if CFG_SUPPORT_BOOTLOADER
entry_set_world_flag();
@@ -89,16 +36,11 @@ void entry_main(void) {
driver_init();
// reboot the board if start_type == RESET_SOURCE_CRASH_PER_XAT0
bk_misc_check_start_type();
// init flash and intc
// init drivers
func_init_basic();
// init semaphore for extended_app_launch
extended_app_init();
// run task with init_app_thread
user_main_entry();
// run task with extended_app_task_handler
extended_app_launch();
// start FreeRTOS
#if (CFG_OS_FREERTOS)
vTaskStartScheduler();
#endif
func_init_extended();
// run core initialization tasks
app_pre_start();
// run the app
main();
}

View File

@@ -0,0 +1,7 @@
/* Copyright (c) Kuba Szczodrzyński 2022-06-14. */
#include "include.h"
uint32_t get_ate_mode_state(void) {
return 0;
}