summaryrefslogtreecommitdiffstatshomepage
path: root/cc3200/serverstask.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-05-31 17:27:21 +0100
committerDamien George <damien.p.george@gmail.com>2016-06-28 11:28:52 +0100
commit0455755296b27440e68cad1ca43c342d9a452f88 (patch)
treeaa8451960fc94ac3b3bf07ad636b00d97c3ca15a /cc3200/serverstask.h
parent77e37ff98bec1ccf6af6edf3efcad26b54da0c47 (diff)
downloadmicropython-0455755296b27440e68cad1ca43c342d9a452f88.tar.gz
micropython-0455755296b27440e68cad1ca43c342d9a452f88.zip
cc3200: Use xTaskCreateStatic instead of osi_TaskCreate.
This allows to statically allocate the TCB (thread control block) and thread stack in the BSS segment, reducing the need for dynamic memory allocation.
Diffstat (limited to 'cc3200/serverstask.h')
-rw-r--r--cc3200/serverstask.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/cc3200/serverstask.h b/cc3200/serverstask.h
index 7689cf461b..2786ff6976 100644
--- a/cc3200/serverstask.h
+++ b/cc3200/serverstask.h
@@ -31,7 +31,8 @@
DEFINE CONSTANTS
******************************************************************************/
#define SERVERS_PRIORITY 2
-#define SERVERS_STACK_SIZE 1024
+#define SERVERS_STACK_SIZE 1024 // in bytes
+#define SERVERS_STACK_LEN (SERVERS_STACK_SIZE / sizeof(StackType_t))
#define SERVERS_SSID_LEN_MAX 16
#define SERVERS_KEY_LEN_MAX 16
@@ -52,6 +53,8 @@
/******************************************************************************
EXPORTED DATA
******************************************************************************/
+extern StaticTask_t svTaskTCB;
+extern StackType_t svTaskStack[];
extern char servers_user[];
extern char servers_pass[];