Skip to content
Permalink
Browse files

samples: intel_s1000: add background thread

Add background thread in audio sample app for
Intel® Sue Creek S1000 board

Signed-off-by: Sathish Kuttan <sathish.k.kuttan@intel.com>
  • Loading branch information...
sathishkuttan authored and nashif committed Jun 28, 2019
1 parent a2f1ad4 commit 75ff541a016f62aaa4bed92daeffb0459de659b8
Showing with 30 additions and 0 deletions.
  1. +30 −0 samples/boards/intel_s1000_crb/audio/src/framework.c
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2019 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

#define LOG_LEVEL LOG_LEVEL_INF
#include <logging/log.h>
LOG_MODULE_REGISTER(framework);

#include <zephyr.h>

#include "audio_core.h"

extern int tun_drv_packet_handler(void);
static int framework_background_thread(void);

K_THREAD_DEFINE(framework_bg_thread_id, FRAMEWORK_BG_THREAD_STACK_SIZE,
framework_background_thread, NULL, NULL, NULL,
FRAMEWORK_BG_THREAD_PRIORITY, 0, K_NO_WAIT);

static int framework_background_thread(void)
{
LOG_INF("Starting framework background thread ...");

while (true) {
tun_drv_packet_handler();
audio_core_process_background_tasks();
}
}

0 comments on commit 75ff541

Please sign in to comment.
You can’t perform that action at this time.