Skip to content

Instantly share code, notes, and snippets.

/app_task.h Secret

Created September 14, 2016 08:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/30dd74b6d0df1a6373287adaad361754 to your computer and use it in GitHub Desktop.
Save anonymous/30dd74b6d0df1a6373287adaad361754 to your computer and use it in GitHub Desktop.
#ifndef _APP_TASK_H
#define _APP_TASK_H
#include <stdlib.h>
#include <stdint.h>
#define APP_TASK_QUEUE_LEN 20
#define APP_TASK_STACK_SIZE 4096
#define APP_TASK_PRIORITY 3
enum app_cmd {
APPCMD_DO_SOMETHING,
};
typedef struct app_task_msg {
enum app_cmd cmd;
uint16_t data;
void (*cb)(struct app_task_msg*);
} app_task_msg_t;
OsiMsgQ_t *apptask_start();
void apptask_msg();
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment