monoZ docs
|
This is an example of how to use a timer and print in CLI using Application thread. More...
#include "MZ_sys_cmsis_os2.h"
#include "MZ_timer_example.h"
#include "MZ_timer.h"
#include "MZ_print.h"
#include "MZ_error_handler.h"
Go to the source code of this file.
Macros | |
#define | START_AT_INIT (0) |
Defines the AT Initialization. More... | |
#define | START_AT_THREAD (1) |
Defines the start AT thread. More... | |
#define | TIMER_EXAMPLE START_AT_THREAD |
#define | TIMER_APP_STACK_SIZE (128) |
Defines the App stack size. More... | |
Functions | |
static void | timer_cb (TimerHandle_t xTimer) |
timer callback function Unlock the lock when timer expires More... | |
static void | timer_app (void *arg) |
create the timer and start when the starts if main RTOS scheduler started More... | |
mz_error_t | timer_app_init (void) |
Initiate the Timer App and creates the thread for timer application. More... | |
Variables | |
static mz_thread_t | timer_thread_id = NULL |
static StaticTask_t | timer_cb_mem |
static StackType_t | timer_stack [TIMER_APP_STACK_SIZE] |
static mz_semaphore_t | timer_sema_id = NULL |
This is an example of how to use a timer and print in CLI using Application thread.
Definition in file MZ_timer_example.c.
#define START_AT_INIT (0) |
Defines the AT Initialization.
Definition at line 14 of file MZ_timer_example.c.
#define START_AT_THREAD (1) |
Defines the start AT thread.
Definition at line 15 of file MZ_timer_example.c.
#define TIMER_EXAMPLE START_AT_THREAD |
Definition at line 17 of file MZ_timer_example.c.
#define TIMER_APP_STACK_SIZE (128) |
Defines the App stack size.
Definition at line 19 of file MZ_timer_example.c.
|
static |
timer callback function Unlock the lock when timer expires
xTimer | TimerHandle_t |
Definition at line 31 of file MZ_timer_example.c.
|
static |
create the timer and start when the starts if main RTOS scheduler started
arg | void |
Definition at line 43 of file MZ_timer_example.c.
mz_error_t timer_app_init | ( | void | ) |
Initiate the Timer App and creates the thread for timer application.
Definition at line 79 of file MZ_timer_example.c.
|
static |
Holds the thread id
Definition at line 21 of file MZ_timer_example.c.
|
static |
Holds the callback memory
Definition at line 22 of file MZ_timer_example.c.
|
static |
Definition at line 23 of file MZ_timer_example.c.
|
static |
Holds the semaphore id
Definition at line 24 of file MZ_timer_example.c.