![]() |
![]() |
|
TI-OpenThread
1.08.07.01
|
#include <openthread/config.h>#include <openthread-core-config.h>#include <assert.h>#include <stddef.h>#include <string.h>#include <stdio.h>#include <sched.h>#include <pthread.h>#include <unistd.h>#include <mqueue.h>#include <ti/drivers/GPIO.h>#include <openthread/dataset.h>#include <openthread/platform/logging.h>#include <openthread/platform/uart.h>#include <openthread/tasklet.h>#include <openthread/thread.h>#include "otsupport/otrtosapi.h"#include "otsupport/otinstance.h"#include "ti_drivers_config.h"#include "empty.h"#include "tiop_ui.h"#include "disp_utils.h"#include "otstack.h"#include "task_config.h"#include "tiop_config.h"
Include dependency graph for CC1352P_4_LAUNCHXL/thread/empty_ftd/empty.c:Macros | |
| #define | EMPTY_PROC_QUEUE_MAX_MSG (6) |
Size of the message queue for Empty_procQueue More... | |
Functions | |
| void | Empty_postEvt (Empty_evt event) |
| Posts an event to the Empty task. More... | |
| void * | empty_task (void *arg0) |
| void | empty_taskCreate (void) |
| void | otPlatLog (otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat,...) |
| void | otPlatUartReceived (const uint8_t *aBuf, uint16_t aBufLength) |
| void | otPlatUartSendDone (void) |
| static void | processEvent (Empty_evt event) |
| Processes the events. More... | |
| void | processKeyChangeCB (Button_Handle _buttonHandle, Button_EventMask _buttonEvents) |
| Handles the key press events. More... | |
| static void | processOtStackEvents (uint8_t event, void *aContext) |
| Processes the OT stack events. More... | |
Variables | |
| static mqd_t | Empty_procQueueDesc |
| const char | Empty_procQueueName [] = "/em_process" |
| static Button_Handle | rightButtonHandle |
| static char | stack [TASK_CONFIG_EMPTY_TASK_STACK_SIZE] |
| static char | statusBuf [MAX_STATUS_LINE_VALUE_LEN] |
| #define EMPTY_PROC_QUEUE_MAX_MSG (6) |
Size of the message queue for Empty_procQueue
There are 5/8 events that can be raised, it is unlikely that they will all be raised at the same time. Add one buffer queue element.
Referenced by empty_task().
| void* empty_task | ( | void * | arg0 | ) |
Main thread starting the Empty example within OpenThread.
References CUI_COLOR_CYAN, CUI_COLOR_RESET, DispUtils_open(), DISPUTILS_SERIALPRINTF, EMPTY_PROC_QUEUE_MAX_MSG, Empty_procQueueDesc, Empty_procQueueName, extAddress, OtInstance_get(), OtRtosApi_lock(), OtRtosApi_unlock(), OtStack_registerCallback(), OtStack_setupInterfaceAndNetwork(), OtStack_taskCreate(), processEvent(), processOtStackEvents(), rightButtonHandle, statusBuf, and tiopCUIInit().
Referenced by empty_taskCreate().
|
static |
Processes the OT stack events.
| event | event identifier |
| aContext | context pointer for the event |
References Empty_evtDevRoleChanged, Empty_evtNwkJoined, Empty_evtNwkJoinFailure, Empty_evtNwkSetup, Empty_postEvt(), OT_STACK_EVENT_DEV_ROLE_CHANGED, OT_STACK_EVENT_NWK_DATA_CHANGED, OT_STACK_EVENT_NWK_JOINED, and OT_STACK_EVENT_NWK_JOINED_FAILURE.
Referenced by empty_task().
| void processKeyChangeCB | ( | Button_Handle | _buttonHandle, |
| Button_EventMask | _buttonEvents | ||
| ) |
Handles the key press events.
Handles the key pressed events for examples.
| _buttonHandle | identifies which keys were pressed |
| _buttonEvents | identifies the event that occurred on the key |
References Empty_evtKeyRight, Empty_postEvt(), and rightButtonHandle.
|
static |
Processes the events.
References CUI_conn_join_fail, CUI_conn_joined, CUI_conn_joining, CUI_processMenuUpdate(), DISPUTILS_LCDPRINTF, DISPUTILS_SERIALPRINTF, Empty_evtDevRoleChanged, Empty_evtKeyRight, Empty_evtNwkJoined, Empty_evtNwkJoinFailure, Empty_evtNwkSetup, OT_STACK_EVENT_NWK_JOIN_IN_PROGRESS, OtInstance_get(), OtRtosApi_lock(), OtRtosApi_unlock(), OtStack_joinConfiguredNetwork(), OtStack_joinState(), OtStack_setupInterfaceAndNetwork(), OtStack_setupNetwork(), tiopCUIUpdateChannel(), tiopCUIUpdateConnStatus(), tiopCUIUpdateExtPANID(), tiopCUIUpdateMasterkey(), tiopCUIUpdateNwkName(), tiopCUIUpdatePANID(), tiopCUIUpdateRole(), and tiopCUIUpdateShortAddr().
Referenced by empty_task().
| void otPlatLog | ( | otLogLevel | aLogLevel, |
| otLogRegion | aLogRegion, | ||
| const char * | aFormat, | ||
| ... | |||
| ) |
Documented in openthread/platform/logging.h.
| void otPlatUartReceived | ( | const uint8_t * | aBuf, |
| uint16_t | aBufLength | ||
| ) |
Documented in openthread/platform/uart.h.
| void otPlatUartSendDone | ( | void | ) |
Documented in openthread/platform/uart.h.
| void Empty_postEvt | ( | Empty_evt | event | ) |
Posts an event to the Empty task.
| event | event to post. |
References CUI_ITEM_INTERCEPT_START, Empty_procQueueDesc, MAX_MENU_LINE_LEN, OtInstance_get(), OtRtosApi_lock(), OtRtosApi_unlock(), processMenuUpdateFn(), tiopCUINwkReset(), tiopCUIReset(), uiActionAttach(), and uiActionJoin().
Referenced by processKeyChangeCB(), and processOtStackEvents().
| void empty_taskCreate | ( | void | ) |
Documented in task_config.h.
References empty_task(), stack, TASK_CONFIG_EMPTY_TASK_PRIORITY, and TASK_CONFIG_EMPTY_TASK_STACK_SIZE.
| const char Empty_procQueueName[] = "/em_process" |
Referenced by empty_task().
|
static |
Referenced by Empty_postEvt(), and empty_task().
|
static |
Referenced by empty_taskCreate().
|
static |
Referenced by empty_task().
|
static |
Referenced by empty_task(), and processKeyChangeCB().