BLE-Stack APIs
3.00.00
|
ICall layer interface.
Go to the source code of this file.
Macros | |
#define | ICALL_ERRNO_CORRUPT_MSG -6 |
ICall function return value for corrupt message error. | |
#define | ICALL_ERRNO_INVALID_FUNCTION -2 |
ICall function return value in case the function id is unknown to the registered handler of the service. | |
#define | ICALL_ERRNO_INVALID_PARAMETER -3 |
ICall function return value for invalid parameter value. | |
#define | ICALL_ERRNO_INVALID_SERVICE -1 |
ICall function return value in case the service corresponding to a passed service id is not registered and hence is unknown. | |
#define | ICALL_ERRNO_NO_RESOURCE -4 |
ICall function return value for no resource error. | |
#define | ICALL_ERRNO_NOMSG 2 |
ICall function return value for no message error. | |
#define | ICALL_ERRNO_OVERFLOW -7 |
ICall function return value for counter overflow. | |
#define | ICALL_ERRNO_SUCCESS 0 |
ICall function return value for successful operation. | |
#define | ICALL_ERRNO_TIMEOUT 1 |
ICall function return value for timeout error. | |
#define | ICALL_ERRNO_UNDERFLOW -8 |
ICall function return value for counter underflow. | |
#define | ICALL_ERRNO_UNKNOWN_THREAD -5 |
ICall function return value in case the calling thread context is not a registered thread, or the entity id passed is not a registered entity. | |
#define | ICALL_INVALID_ENTITY_ID 0xffu |
Entity ID used to indicate invalid entity. | |
#define | ICALL_INVALID_TIMER_ID NULL |
Timer ID used to indicate invalid ID. | |
#define | ICALL_LITE_DIRECT_API_DONE_CMD_ID 0x42 |
Message CMD ID to signal DIRECT_API CMD is done. | |
#define | ICALL_MSG_EVENT_ID Event_Id_31 |
Event reserved to signal for icall message inbetween application and services. Used when ICALL_EVENTS compile option is enabled only. | |
#define | ICALL_MSG_FORMAT_1ST_CHAR_TASK_ID 1 |
Message format that requires the first byte to be replaced with the src task ID. | |
#define | ICALL_MSG_FORMAT_3RD_CHAR_TASK_ID 2 |
Message format that requires the third byte to be replaced with the src task ID. | |
#define | ICALL_MSG_FORMAT_DIRECT_API_ID 3 |
Message format indicated a direct API call. | |
#define | ICALL_MSG_FORMAT_KEEP 0 |
#define | ICALL_MSG_FUNC_GET_LOCAL_MSG_ENTITY_ID 0 |
Messaging service function id for translating ICall_entityID to locally understandable id. | |
#define | ICALL_SEMAPHORE_MODE_BINARY 1 |
Binary semaphore mode. | |
#define | ICALL_SEMAPHORE_MODE_COUNTING 0 |
Counting semaphore mode. | |
#define | ICALL_SERVICE_CLASS_BLE 0x0010 |
BLE service class enumerated value. | |
#define | ICALL_SERVICE_CLASS_BLE_BOARD 0x0088 |
BLE Board dependent service class. More... | |
#define | ICALL_SERVICE_CLASS_BLE_MSG 0x0050 |
BLE stack message delivery service. | |
#define | ICALL_SERVICE_CLASS_CRYPTO 0x0080 |
Crypto service class. More... | |
#define | ICALL_SERVICE_CLASS_DUMMY 0x0100 |
#define | ICALL_SERVICE_CLASS_DUMMY_BOARD 0x0200 |
Dummy stack board service class enumeration. More... | |
#define | ICALL_SERVICE_CLASS_MASK 0xFFF8 |
Bit mask for recommended service id enumeration. More... | |
#define | ICALL_SERVICE_CLASS_NPI 0x0038 |
NPI service class enumerated value. | |
#define | ICALL_SERVICE_CLASS_PRIMITIVE 0x0008 |
Service class enumerated value for primitive service. More... | |
#define | ICALL_SERVICE_CLASS_RADIO 0x0098 |
Radio service class. More... | |
#define | ICALL_SERVICE_CLASS_REMOTI_RCN 0x0028 |
RemoTI network layer service class enumerated value. | |
#define | ICALL_SERVICE_CLASS_REMOTI_RTI 0x0020 |
RemoTI RTI interface service class enumerated value. | |
#define | ICALL_SERVICE_CLASS_TIMAC 0x0018 |
TIMAC service class enumerated value. | |
#define | ICALL_SERVICE_CLASS_TIMAC_BOARD 0x0090 |
TIMAC Board dependent service class. More... | |
#define | ICALL_SERVICE_CLASS_ZSTACK 0x0030 |
ZStack service class enumerated value. | |
#define | ICALL_SERVICE_INSTANCE_MASK 0x0007 |
Bit mask for recommended service id enumeration. More... | |
#define | ICALL_TIMEOUT_FOREVER 0xfffffffful |
Time period that indicates infinite time. | |
#define | ICALL_TIMEOUT_PREDEFINE 5000 |
Time period that indicates timeout define at build time default is 5s. | |
Enumerations | |
enum | ICall_RemotiCmdEvent_t { ICALL_RTI_APP_CMD_EVENT = 0xE0, ICALL_RTI_STACK_CMD_EVENT = 0xE1, ICALL_RTI_APP_ASYNC_CMD_EVENT = 0xE2, ICALL_RTI_APP_SYNC_CMD_EVENT = 0xE3, ICALL_RCN_APP_ASYNC_CMD_EVENT = 0xE4, ICALL_RCN_APP_SYNC_CMD_EVENT = 0xE5 } |
Functions | |
ICall_Errno | ICall_abort (void) |
Aborts. More... | |
void * | ICall_allocMsg (size_t size) |
Allocates memory block for a message. More... | |
void | ICall_createRemoteTasks (void) |
Create remote tasks. More... | |
ICall_Semaphore | ICall_createSemaphore (uint_fast8_t mode, int initcount) |
Creates a semaphore. More... | |
ICall_Errno | ICall_createTask (void(*entryfn)(size_t arg), uint_fast8_t priority, uint_fast16_t stacksize, size_t arg) |
Creates a new RTOS task. More... | |
uint32_t | icall_directAPI (uint8_t service, icall_lite_id_t id,...) |
generic variadic function to translate API id to a functional call in the stack context, More... | |
ICall_Errno | ICall_disableInt (int intnum) |
Disables interrupt. More... | |
ICall_Errno | ICall_disableMInt (void) |
Disables master interrupt and context switching. More... | |
ICall_Errno | ICall_enableInt (int intnum) |
Enables interrupt. More... | |
ICall_Errno | ICall_enableMInt (void) |
Enables master interrupt and context switching. More... | |
ICall_Errno | ICall_enrollService (ICall_ServiceEnum service, ICall_ServiceFunc fn, ICall_EntityID *entity, ICall_SyncHandle *msgSyncHdl) |
Registers a service entity. More... | |
ICall_Errno | ICall_entityId2ServiceId (ICall_EntityID entityId, ICall_ServiceEnum *servId) |
Transforms and entityId into a serviceId. Note that this function is useful in case an application waits for messages from both a server and another application, in which case, the application can only use ICall_fetchMsg , not ICall_fetchServiceMsg because the latter will return ICALL_ERRNO_CORRUPT_MSG when a message sent by the other application is about to be fetched. This function, then, is useful to retrieve service id matching the source entity id in case the source entity id is not that of the other application. More... | |
ICall_Errno | ICall_fetchMsg (ICall_EntityID *src, ICall_EntityID *dest, void **msg) |
Retrieves a message, queued to receive queue of the calling thread. More... | |
ICall_Errno | ICall_fetchServiceMsg (ICall_ServiceEnum *src, ICall_EntityID *dest, void **msg) |
Retrieves a message received at the message queue associated with the calling thread. More... | |
void | ICall_free (void *msg) |
Frees an allocated memory block. More... | |
void | ICall_freeMsg (void *msg) |
Frees the memory block allocated for a message. More... | |
ICall_EntityID | ICall_getEntityId (void) |
Retrieves an entity ID of (arbitrary) one of the entities registered from the calling thread. More... | |
uint_fast8_t | ICall_getLocalMsgEntityId (ICall_ServiceEnum service, ICall_EntityID entity) |
Retrieves an internal ID understood only by a service entity, corresponding to an ICall entity ID. More... | |
uint_fast32_t | ICall_getMaxMSecs (void) |
Gets the maximum timeout period supported by ICall_setTimerMSecs function. More... | |
uint_fast32_t | ICall_getTickPeriod (void) |
Gets the tick period. More... | |
uint_fast32_t | ICall_getTicks (void) |
Gets the current tick counter value. More... | |
void | ICall_init (void) |
Initializes the dispatcher implementation. More... | |
void * | ICall_malloc (uint_least16_t size) |
Allocates a memory block. More... | |
ICall_Errno | ICall_postSemaphore (ICall_Semaphore sem) |
Post on a semaphore. More... | |
ICall_Errno | ICall_pwrConfigACAction (ICall_PwrBitmap_t bitmap) |
Configures power constraint/dependency set/release actions upon activity counter change. More... | |
ICall_Errno | ICall_pwrDispense (ICall_PwrBitmap_t bitmap) |
Releases power constraints and dependencies. More... | |
uint_fast8_t | ICall_pwrGetTransitionState (void) |
Retrieves power transition state. More... | |
uint32_t | ICall_pwrGetXOSCStartupTime (uint_fast32_t timeUntilWakeupInMs) |
bool | ICall_pwrIsStableXOSCHF (void) |
Checks whether HF XOSC is stable. This function must be called after HF XOSC is turned on (through power dependency). More... | |
ICall_Errno | ICall_pwrRegisterNotify (ICall_PwrNotifyFn fn, ICall_PwrNotifyData *obj) |
Registers a power state transition notify function. More... | |
ICall_Errno | ICall_pwrRequire (ICall_PwrBitmap_t bitmap) |
Sets power constraints and dependencies. More... | |
ICall_Errno | ICall_pwrSwitchXOSCHF (void) |
Switch clock source to HF XOSC. This function must be called after HF XOSC is stable. More... | |
bool | ICall_pwrUpdActivityCounter (bool incFlag) |
Increments or decrements power activity counter. More... | |
ICall_Errno | ICall_registerApp (ICall_EntityID *entity, ICall_SyncHandle *msgSyncHdl) |
Registers an application. More... | |
ICall_Errno | ICall_registerISR (int intnum, void(*isrfunc)(void)) |
Registers an interrupt service routine. More... | |
ICall_Errno | ICall_registerISR_Ext (int intnum, void(*isrfunc)(void), int intPriority) |
ICall Register ISR. | |
ICall_EntityID | ICall_searchServiceEntity (ICall_ServiceEnum service) |
Search for a service entity entry. More... | |
ICall_Errno | ICall_send (ICall_EntityID src, ICall_EntityID dest, ICall_MSGFormat format, void *msg) |
Sends a message to an entity. More... | |
ICall_Errno | ICall_sendServiceMsg (ICall_EntityID src, ICall_ServiceEnum dest, ICall_MSGFormat format, void *msg) |
Sends a message to a registered server. More... | |
ICall_Errno | ICall_setTimer (uint_fast32_t ticks, ICall_TimerCback cback, void *arg, ICall_TimerID *id) |
Set up or restart a timer. Note that the timer setup initially by this function may be restarted using ICall_setTimerMSecs function as well. More... | |
ICall_Errno | ICall_setTimerMSecs (uint_fast32_t msecs, ICall_TimerCback cback, void *arg, ICall_TimerID *id) |
Set up or restart a timer. Note that the timer setup initially by this function may be restarted using ICall_setTimer function as well. More... | |
ICall_Errno | ICall_signal (ICall_SyncHandle msgSyncHdl) |
Signals a semaphore. More... | |
void | ICall_stopTimer (ICall_TimerID id) |
Stops a timer. More... | |
uint_fast8_t | ICall_threadServes (ICall_ServiceEnum service) |
Checks whether the calling thread provides the designated service. More... | |
ICall_Errno | ICall_wait (uint_fast32_t milliseconds) |
Waits for a signal to the semaphore associated with the calling thread. More... | |
ICall_Errno | ICall_waitMatch (uint_least32_t milliseconds, ICall_MsgMatchFn matchFn, ICall_ServiceEnum *src, ICall_EntityID *dest, void **msg) |
Waits for and retrieves a message received at the message queue associated with the calling thread, which matches a certain condition. More... | |
ICall_Errno | ICall_waitSemaphore (ICall_Semaphore sem, uint_fast32_t milliseconds) |
Waits on a semaphore. More... | |
Variables | |
icall_lite_id_t | directAPI |
icall_directAPIMsg_t | |
ICall_Dispatcher | ICall_dispatcher |
Call dispatcher pointer of the current image. | |
ICall_EnterCS | ICall_enterCriticalSection |
Enter critical section function pointer of the current image. | |
ICall_LeaveCS | ICall_leaveCriticalSection |
Leave critical section function pointer of the current image. | |
uint_least8_t | ICall_resetReason |
Special global variable to set the reset reason by the boot code, before ICall is initialized, so that ICall can serve "get reset reason" function. | |
icallLiteMsg_t | |
icall_directAPIMsg_t | msg |
PACKED_TYPEDEF_STRUCT | |