32 #include "hal_assert.h" 44 #define ICALL_SERVICE_CLASS_MASK 0xFFF8 52 #define ICALL_SERVICE_INSTANCE_MASK 0x0007 60 #define ICALL_SERVICE_CLASS_PRIMITIVE 0x0008 65 #define ICALL_SERVICE_CLASS_BLE 0x0010 68 #define ICALL_SERVICE_CLASS_TIMAC 0x0018 71 #define ICALL_SERVICE_CLASS_REMOTI_RTI 0x0020 74 #define ICALL_SERVICE_CLASS_REMOTI_RCN 0x0028 77 #define ICALL_SERVICE_CLASS_ZSTACK 0x0030 80 #define ICALL_SERVICE_CLASS_NPI 0x0038 83 #define ICALL_SERVICE_CLASS_BLE_MSG 0x0050 93 #define ICALL_SERVICE_CLASS_CRYPTO 0x0080 100 #define ICALL_SERVICE_CLASS_BLE_BOARD 0x0088 107 #define ICALL_SERVICE_CLASS_TIMAC_BOARD 0x0090 114 #define ICALL_SERVICE_CLASS_RADIO 0x0098 121 #define ICALL_SERVICE_CLASS_DUMMY 0x0100 129 #define ICALL_SERVICE_CLASS_DUMMY_BOARD 0x0200 134 #define ICALL_INVALID_ENTITY_ID 0xffu 139 #define ICALL_INVALID_TIMER_ID NULL 149 #define ICALL_UNDEF_DEST_ID 0xffu 153 #define ICALL_ERRNO_SUCCESS 0 156 #define ICALL_ERRNO_TIMEOUT 1 159 #define ICALL_ERRNO_NOMSG 2 166 #define ICALL_ERRNO_INVALID_SERVICE -1 172 #define ICALL_ERRNO_INVALID_FUNCTION -2 175 #define ICALL_ERRNO_INVALID_PARAMETER -3 178 #define ICALL_ERRNO_NO_RESOURCE -4 185 #define ICALL_ERRNO_UNKNOWN_THREAD -5 188 #define ICALL_ERRNO_CORRUPT_MSG -6 191 #define ICALL_ERRNO_OVERFLOW -7 194 #define ICALL_ERRNO_UNDERFLOW -8 197 #define ICALL_MSG_FORMAT_KEEP 0 203 #define ICALL_MSG_FORMAT_1ST_CHAR_TASK_ID 1 209 #define ICALL_MSG_FORMAT_3RD_CHAR_TASK_ID 2 215 #define ICALL_MSG_FORMAT_DIRECT_API_ID 3 220 #define ICALL_LITE_DIRECT_API_DONE_CMD_ID 0x42 227 #define ICALL_TIMEOUT_FOREVER 0xfffffffful 233 #ifndef ICALL_TIMEOUT_PREDEFINE 234 #define ICALL_TIMEOUT_PREDEFINE 5000 240 #define ICALL_SEMAPHORE_MODE_COUNTING 0 245 #define ICALL_SEMAPHORE_MODE_BINARY 1 251 #define ICALL_PRIMITIVE_FUNC_ENROLL 0 254 #define ICALL_PRIMITIVE_FUNC_REGISTER_APP 1 257 #define ICALL_PRIMITIVE_FUNC_MSG_ALLOC 2 260 #define ICALL_PRIMITIVE_FUNC_MSG_FREE 3 263 #define ICALL_PRIMITIVE_FUNC_MALLOC 4 266 #define ICALL_PRIMITIVE_FUNC_FREE 5 269 #define ICALL_PRIMITIVE_FUNC_SEND_MSG 6 272 #define ICALL_PRIMITIVE_FUNC_FETCH_MSG 7 275 #define ICALL_PRIMITIVE_FUNC_SEND_SERV_MSG 8 278 #define ICALL_PRIMITIVE_FUNC_FETCH_SERV_MSG 9 281 #define ICALL_PRIMITIVE_FUNC_WAIT 10 284 #define ICALL_PRIMITIVE_FUNC_SIGNAL 11 287 #define ICALL_PRIMITIVE_FUNC_ABORT 12 290 #define ICALL_PRIMITIVE_FUNC_ENABLE_INT 13 293 #define ICALL_PRIMITIVE_FUNC_DISABLE_INT 14 296 #define ICALL_PRIMITIVE_FUNC_ENABLE_MINT 15 299 #define ICALL_PRIMITIVE_FUNC_DISABLE_MINT 16 302 #define ICALL_PRIMITIVE_FUNC_REGISTER_ISR 17 305 #define ICALL_PRIMITIVE_FUNC_GET_TICKS 18 308 #define ICALL_PRIMITIVE_FUNC_SET_TIMER_MSECS 19 311 #define ICALL_PRIMITIVE_FUNC_GET_TICK_PERIOD 20 314 #define ICALL_PRIMITIVE_FUNC_GET_MAX_MILLISECONDS 21 317 #define ICALL_PRIMITIVE_FUNC_ENTITY2SERVICE 22 320 #define ICALL_PRIMITIVE_FUNC_PWR_UPD_ACTIVITY_COUNTER 23 323 #define ICALL_PRIMITIVE_FUNC_PWR_REGISTER_NOTIFY 24 326 #define ICALL_PRIMITIVE_FUNC_WAIT_MATCH 25 329 #define ICALL_PRIMITIVE_FUNC_GET_ENTITY_ID 26 332 #define ICALL_PRIMITIVE_FUNC_SET_TIMER 27 335 #define ICALL_PRIMITIVE_FUNC_STOP_TIMER 28 341 #define ICALL_PRIMITIVE_FUNC_PWR_CONFIG_AC_ACTION 29 344 #define ICALL_PRIMITIVE_FUNC_PWR_REQUIRE 30 347 #define ICALL_PRIMITIVE_FUNC_PWR_DISPENSE 31 350 #define ICALL_PRIMITIVE_FUNC_THREAD_SERVES 32 353 #define ICALL_PRIMITIVE_FUNC_PWR_IS_STABLE_XOSC_HF 33 356 #define ICALL_PRIMITIVE_FUNC_PWR_GET_TRANSITION_STATE 34 359 #define ICALL_PRIMITIVE_FUNC_CREATE_TASK 35 362 #define ICALL_PRIMITIVE_FUNC_CREATE_SEMAPHORE 36 365 #define ICALL_PRIMITIVE_FUNC_WAIT_SEMAPHORE 37 368 #define ICALL_PRIMITIVE_FUNC_SWITCH_XOSC_HF 38 371 #define ICALL_PRIMITIVE_FUNC_PWR_GET_XOSC_STARTUP_TIME 39 374 #define ICALL_PRIMITIVE_FUNC_REGISTER_ISR_EXT 40 378 #define ICALL_PRIMITIVE_FUNC_POST_SEMAPHORE 41 381 #define ICALL_PRIMITIVE_FUNC_CREATE_EVENT 42 384 #define ICALL_PRIMITIVE_FUNC_WAIT_EVENT 43 387 #define ICALL_PRIMITIVE_FUNC_POST_EVENT 44 395 #define ICALL_MSG_FUNC_GET_LOCAL_MSG_ENTITY_ID 0 402 #define ICALL_MSG_EVENT_ID Event_Id_31 559 void (*isrfunc)(void);
567 void (*isrfunc)(void);
646 void (*entryfn)(
size_t arg);
652 #ifdef ICALL_RTOS_SEMAPHORE_API 683 #ifdef ICALL_RTOS_EVENTS_API 685 typedef struct _icall_create_event_args_t
689 } ICall_CreateEventArgs;
692 typedef struct _icall_post_event_args_t
697 } ICall_PostEventArgs;
700 typedef struct _icall_wait_event_args_t
704 uint_least32_t milliseconds;
705 } ICall_WaitEventArgs;
715 typedef struct _icall_msg_hdr_t
913 PACKED_TYPEDEF_STRUCT
915 uint_least32_t *pointerStack;
916 icall_lite_id_t directAPI;
917 } icall_directAPIMsg_t;
919 PACKED_TYPEDEF_STRUCT
922 icall_directAPIMsg_t msg;
1010 ICall_Errno
ICall_registerApp(ICall_EntityID *entity, ICall_SyncHandle *msgSyncHdl);
1072 ICall_ServiceEnum dest,
1073 ICall_MSGFormat format,
void *msg);
1105 ICall_EntityID *dest,
1121 ICall_Errno
ICall_wait(uint_fast32_t milliseconds);
1147 ICall_EntityID *entity,
1148 ICall_SyncHandle *msgSyncHdl);
1178 ICall_EntityID dest,
1179 ICall_MSGFormat format,
1202 ICall_EntityID *dest,
1225 ICall_ServiceEnum *servId);
1505 uint_fast16_t stacksize,
size_t arg);
1507 #ifdef ICALL_RTOS_SEMAPHORE_API 1522 #ifdef ICALL_RTOS_SEMAPHORE_API 1534 #ifdef ICALL_RTOS_EVENTS_API 1542 ICall_createEvent(
void);
1551 ICall_postEvent(ICall_Event event, uint32_t events);
1566 ICall_waitEvent(ICall_Event event, uint_fast32_t milliseconds);
1569 #ifdef ICALL_RTOS_SEMAPHORE_API 1616 ICall_ServiceEnum *src,
1617 ICall_EntityID *dest,
1675 ICall_SyncHandle *msgSyncHdl)
1680 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_REGISTER_APP;
1700 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_MSG_ALLOC;
1719 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_MSG_FREE;
1766 ICall_ServiceEnum dest,
1767 ICall_MSGFormat format,
void *msg)
1771 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_SEND_SERV_MSG;
1809 ICall_EntityID *dest,
1815 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_FETCH_SERV_MSG;
1836 static ICall_Errno
ICall_wait(uint_fast32_t milliseconds)
1840 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_WAIT;
1850 static ICall_Errno
ICall_signal(ICall_SyncHandle msgSyncHdl)
1854 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_SIGNAL;
1878 ICall_EntityID *entity,
1879 ICall_SyncHandle *msgSyncHdl)
1884 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_ENROLL;
1906 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_MALLOC;
1925 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_FREE;
1944 static ICall_Errno
ICall_send(ICall_EntityID src,
1945 ICall_EntityID dest,
1946 ICall_MSGFormat format,
1951 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_SEND_MSG;
1979 ICall_EntityID *dest,
1985 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_FETCH_MSG;
2014 ICall_ServiceEnum *servId)
2019 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_ENTITY2SERVICE;
2037 HAL_ASSERT( HAL_ASSERT_CAUSE_ICALL_ABORT );
2041 args.
func = ICALL_PRIMITIVE_FUNC_ABORT;
2055 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_ENABLE_INT;
2070 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_DISABLE_INT;
2084 args.
func = ICALL_PRIMITIVE_FUNC_ENABLE_MINT;
2097 args.
func = ICALL_PRIMITIVE_FUNC_DISABLE_MINT;
2114 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_REGISTER_ISR;
2125 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_REGISTER_ISR_EXT;
2136 static uint_fast32_t
2141 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_GET_TICKS;
2150 static uint_fast32_t
2155 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_GET_TICK_PERIOD;
2166 static uint_fast32_t
2171 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_GET_MAX_MILLISECONDS;
2209 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_SET_TIMER_MSECS;
2252 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_SET_TIMER;
2273 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_STOP_TIMER;
2299 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_UPD_ACTIVITY_COUNTER;
2327 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_CONFIG_AC_ACTION;
2348 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_REQUIRE;
2369 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_DISPENSE;
2387 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_IS_STABLE_XOSC_HF;
2403 args.
func = ICALL_PRIMITIVE_FUNC_SWITCH_XOSC_HF;
2417 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_GET_XOSC_STARTUP_TIME;
2442 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_REGISTER_NOTIFY;
2461 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_GET_TRANSITION_STATE;
2484 uint_fast16_t stacksize,
size_t arg)
2489 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_CREATE_TASK;
2497 #ifdef ICALL_RTOS_SEMAPHORE_API 2508 static ICall_Semaphore
2515 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_CREATE_SEMAPHORE;
2527 #ifdef ICALL_RTOS_SEMAPHORE_API 2541 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_POST_SEMAPHORE;
2547 #ifdef ICALL_RTOS_EVENTS_API 2555 ICall_createEvent(
void)
2557 ICall_CreateEventArgs args;
2561 args.hdr.func = ICALL_PRIMITIVE_FUNC_CREATE_EVENT;
2578 ICall_postEvent(ICall_Event event, uint32_t events)
2580 ICall_PostEventArgs args;
2583 args.hdr.func = ICALL_PRIMITIVE_FUNC_POST_EVENT;
2585 args.events = events;
2602 ICall_waitEvent(ICall_Event event, uint_fast32_t milliseconds)
2604 ICall_WaitEventArgs args;
2607 args.hdr.func = ICALL_PRIMITIVE_FUNC_WAIT_EVENT;
2609 args.milliseconds = milliseconds;
2614 #ifdef ICALL_RTOS_SEMAPHORE_API 2634 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_WAIT_SEMAPHORE;
2670 ICall_ServiceEnum *src,
2671 ICall_EntityID *dest,
2677 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_WAIT_MATCH;
2703 static ICall_EntityID
2709 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_GET_ENTITY_ID;
2733 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_THREAD_SERVES;
uint_fast8_t ICall_threadServes(ICall_ServiceEnum service)
Checks whether the calling thread provides the designated service.
ICall_FuncArgsHdr hdr
common arguments field to store source of the message
Definition: icall.h:504
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.
ICall_RemotiCmdEvent_t
RemoTI RNP and Remote Icall Messaging Interface Enumeration.
Definition: icall.h:894
ICall_Semaphore sem
semaphore
Definition: icall.h:671
void * ICall_Event
Event data type.
Definition: icall.h:431
uint32_t ICall_pwrGetXOSCStartupTime(uint_fast32_t timeUntilWakeupInMs)
uint_least32_t timeUntilWakeupInMs
field matching timeUntilWakeupInMs argument
Definition: icall.h:630
void * ICall_TimerID
Timer id data type.
Definition: icall.h:438
ICall_Errno ICall_enrollService(ICall_ServiceEnum service, ICall_ServiceFunc fn, ICall_EntityID *entity, ICall_SyncHandle *msgSyncHdl)
Registers a service entity.
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:786
void * ICall_SyncHandle
Synchronization object data type.
Definition: icall.h:424
uint_fast8_t ICall_PwrTransition
Power state transition type of the following values:
Definition: icall.h:735
ICall_Errno ICall_pwrDispense(ICall_PwrBitmap_t bitmap)
Releases power constraints and dependencies.
ICall_enrollService arguments
Definition: icall.h:858
bool incFlag
a boolean flag to indicate either increment or decrement
Definition: icall.h:596
ICall_MSGFormat format
Message format.
Definition: icall.h:497
uint_least8_t mode
semaphore mode. Either ICALL_SEMAPHORE_MODE_BINARY or ICALL_SEMAPHORE_MODE_COUNTING ...
Definition: icall.h:662
struct _icall_thread_serves_args_t ICall_ThreadServesArgs
ICall_threadServes argument
uint_least8_t localId
local entity ID
Definition: icall.h:890
struct _icall_send_args_t ICall_SendArgs
ICall_sendServiceMsg and ICall_send arguments
ICall_LeaveCS leavecs
leave CS
Definition: icall.h:833
ICall_CSState(* ICall_EnterCS)(void)
Critical section entry function pointer type.
Definition: icall.h:808
int intPriority
interrupt priority
Definition: icall.h:568
void(* ICall_TimerCback)(void *arg)
Prototype of a callback function for timer.
Definition: icall.h:455
int_fast16_t ICall_Errno
Error code data type.
Definition: icall.h:412
ICall_Errno ICall_wait(uint_fast32_t milliseconds)
Waits for a signal to the semaphore associated with the calling thread.
ICall_sendServiceMsg and ICall_send arguments
Definition: icall.h:488
void(* ICall_LeaveCS)(ICall_CSState key)
Critical section exit function pointer type.
Definition: icall.h:816
ICall_pwrRegisterNotify arguments
Definition: icall.h:765
ICall_Errno ICall_pwrRequire(ICall_PwrBitmap_t bitmap)
Sets power constraints and dependencies.
struct _icall_post_semaphore_args_t ICall_PostSemaphoreArgs
ICall_postSemaphore argument
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:629
uint_fast32_t ICall_getTickPeriod(void)
Gets the tick period.
uint_least16_t stacksize
task priority as understood by underlying RTOS implementation
Definition: icall.h:648
uint_least8_t priority
task priority as understood by underlying RTOS implementation
Definition: icall.h:647
ICall_Errno ICall_enableInt(int intnum)
Enables interrupt.
ICall_signal arguments
Definition: icall.h:529
uint_least32_t ICall_CSState
Critical section state data type.
Definition: icall.h:801
struct _icall_register_isr_args_t ICall_RegisterISRArgs
ICall_registerISR arguments
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:670
struct _icall_set_timer_args_t ICall_SetTimerArgs
ICall_setTimer arguments
bool(* ICall_MsgMatchFn)(ICall_ServiceEnum src, ICall_EntityID dest, const void *msg)
Prototype of a function used to compare a received message for a match.
Definition: icall.h:448
ICall_createTask argument
Definition: icall.h:643
ICall_ServiceEnum servId
service id
Definition: icall.h:778
Event for app RTI->stack RTI module.
Definition: icall.h:898
ICall_EntityID entityId
entity id
Definition: icall.h:508
ICall_signal arguments
Definition: icall.h:522
ICall Lite Command Status.
Definition: icall.h:908
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:611
ICall_stopTimer arguments
Definition: icall.h:878
struct _icall_getuint32_args_t ICall_GetUint32Args
ICall_getTicks , ICall_getTickPeriod and ICall_getMaxMSecs arguments
ICall_ServiceEnum servId
Service ID of destination.
Definition: icall.h:495
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:677
uint_fast32_t ICall_getMaxMSecs(void)
Gets the maximum timeout period supported by ICall_setTimerMSecs function.
struct _icall_wait_semaphore_args_t ICall_WaitSemaphoreArgs
ICall_waitSemaphore argument
uint_least32_t value
field to store the retrieved value
Definition: icall.h:578
ICall_ServiceFunc fn
handler function which handles function calls to the service
Definition: icall.h:862
uint_fast8_t ICall_pwrGetTransitionState(void)
Retrieves power transition state.
ICall_EntityID entity
client entity id
Definition: icall.h:787
ICall_FuncID func
function id
Definition: icall.h:461
struct _ICall_LiteCmdStatus_ ICall_LiteCmdStatus
ICall Lite Command Status.
#define ICALL_ERRNO_SUCCESS
ICall function return value for successful operation.
Definition: icall.h:153
ICall_SyncHandle msgSyncHdl
field to store the synchronous object handle associated with the calling thread
Definition: icall.h:469
ICall_PwrNotifyData * obj
data object
Definition: icall.h:769
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:542
void * msg
field to store the starting address of the message body
Definition: icall.h:780
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:645
Power state transition notify function data object type.
Definition: icall.h:755
bool pwrRequired
the result of current activity counter
Definition: icall.h:597
uint_least8_t ICall_MSGFormat
Message conversion format data type.
Definition: icall.h:418
union _icall_send_args_t::@0 dest
union of entity and service ID's
ICall_Errno ICall_registerISR(int intnum, void(*isrfunc)(void))
Registers an interrupt service routine.
uint_least16_t ICall_FuncID
Function id data type.
Definition: icall.h:421
ICall_FuncArgsHdr hdr
Common arguments.
Definition: icall.h:887
struct _icall_pwr_get_transition_state_args_t ICall_PwrGetTransitionStateArgs
ICall_pwrGetTransitionState arguments
struct _icall_pwr_bitmap_args_t ICall_PwrBitmapArgs
ICall_pwrConfigActivityCounterAction , ICall_pwrRequire and ICall_pwrDispense arguments.
ICall_pwrGetTransitionState arguments
Definition: icall.h:618
struct _icall_intnum_args_t ICall_IntNumArgs
ICall_enableInt and ICall_disableInt arguments
ICall_EnterCS entercs
enter CS
Definition: icall.h:832
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 usin...
ICall_pwrIsStableXOSCHF arguments
Definition: icall.h:584
ICall_freeMsg or ICall_free arguments
Definition: icall.h:481
ICall_postSemaphore argument
Definition: icall.h:668
ICall_Errno ICall_pwrConfigACAction(ICall_PwrBitmap_t bitmap)
Configures power constraint/dependency set/release actions upon activity counter change.
ICall_enableInt and ICall_disableInt arguments
Definition: icall.h:548
ICall_Semaphore ICall_createSemaphore(uint_fast8_t mode, int initcount)
Creates a semaphore.
void * ptr
pointer to the address of a memory block to free
Definition: icall.h:484
ICall_threadServes argument
Definition: icall.h:635
struct _icall_register_isr_args_ext_t ICall_RegisterISRArgs_Ext
ICall_registerISR_Ext arguments.
void ICall_freeMsg(void *msg)
Frees the memory block allocated for a message.
Common service function arguments.
Definition: icall.h:458
ICall_EntityID entityId
Entity ID of destination.
Definition: icall.h:494
ICall_Dispatcher dispatch
ICall dispatcher.
Definition: icall.h:831
ICall_fetchServiceMsg and ICall_fetchMsg arguments
Definition: icall.h:502
bool value
Definition: icall.h:589
ICall_EntityID entity
entity id
Definition: icall.h:889
struct _icall_register_app_args_t ICall_RegisterAppArgs
ICall_registerApp arguments
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:880
struct _icall_remote_task_arg_t ICall_RemoteTaskArg
Data type of the first argument passed to the entry point of an image which contains a remote task...
void ICall_free(void *msg)
Frees an allocated memory block.
size_t arg
argument passed to the task entry function
Definition: icall.h:649
ICall_registerISR_Ext arguments.
Definition: icall.h:563
struct _icall_wait_match_args_t ICall_WaitMatchArgs
ICall_waitMatch arguments
void * ICall_allocMsg(size_t size)
Allocates memory block for a message.
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:557
size_t size
size of the message body in bytes
Definition: icall.h:476
struct _icall_create_task_args_t ICall_CreateTaskArgs
ICall_createTask argument
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:483
ICall_SyncHandle msgSyncHdl
field to store the synchronous object handle associated with the calling thread
Definition: icall.h:864
ICall_Errno ICall_waitSemaphore(ICall_Semaphore sem, uint_fast32_t milliseconds)
Waits on a semaphore.
ICall_EntityID entity
field to store the entity id assigned to the application
Definition: icall.h:468
struct _icall_enroll_service_args_t ICall_EnrollServiceArgs
ICall_enrollService arguments
#define ICALL_MSG_FUNC_GET_LOCAL_MSG_ENTITY_ID
Messaging service function id for translating ICall_entityID to locally understandable id...
Definition: icall.h:395
ICall_Errno ICall_disableInt(int intnum)
Disables interrupt.
struct _icall_alloc_args_t ICall_AllocArgs
ICall_allocMsg or ICall_malloc arguments
Data type of the first argument passed to the entry point of an image which contains a remote task...
Definition: icall.h:829
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:620
ICall_Errno ICall_signal(ICall_SyncHandle msgSyncHdl)
Signals a semaphore.
void * msg
pointer to the message body to send
Definition: icall.h:498
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:595
ICall_ServiceEnum servId
Service ID of destination.
Definition: icall.h:638
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 wa...
struct _icall_get_local_msg_entity_id_args_t ICall_GetLocalMsgEntityIdArgs
ICall_getLocalMsgEntityId arguments
void * ICall_malloc(uint_least16_t size)
Allocates a memory block.
struct _icall_func_args_hdr_t ICall_FuncArgsHdr
Common service function arguments.
ICall_Errno ICall_disableMInt(void)
Disables master interrupt and context switching.
ICall_SyncHandle syncHandle
handle of a synchronous object to signal
Definition: icall.h:525
struct _icall_pwr_get_xosc_startup_time_args_t ICall_PwrGetXOSCStartupTimeArgs
ICall_pwrGetXOSCStartupTime arguments
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:775
void * ptr
pointer to store the start address of the newly allocated memory block
Definition: icall.h:477
ICall_LeaveCS ICall_leaveCriticalSection
Leave critical section function pointer of the current image.
ICall_Errno ICall_abort(void)
Aborts.
void(* ICall_PwrNotifyFn)(ICall_PwrTransition pwrTrans, struct _icall_pwr_notify_data_t *obj)
Definition: icall.h:749
#define ICALL_INVALID_ENTITY_ID
Entity ID used to indicate invalid entity.
Definition: icall.h:134
ICall_EntityID dest
field to store the entity id of the destination of the message
Definition: icall.h:510
ICall_getTicks , ICall_getTickPeriod and ICall_getMaxMSecs arguments
Definition: icall.h:575
ICall_Errno(* ICall_ServiceFunc)(ICall_FuncArgsHdr *args)
Call dispatcher service handler function pointer type.
Definition: icall.h:855
ICall_EntityID ICall_searchServiceEntity(ICall_ServiceEnum service)
Search for a service entity entry.
ICall_Errno ICall_sendServiceMsg(ICall_EntityID src, ICall_ServiceEnum dest, ICall_MSGFormat format, void *msg)
Sends a message to a registered server.
struct _icall_free_args_t ICall_FreeArgs
ICall_freeMsg or ICall_free arguments
ICall_SyncHandle syncHandle
handle of a synchronous object to signal
Definition: icall.h:532
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:475
struct _icall_entity2service_args_t ICall_EntityId2ServiceIdArgs
ICall_entityId2ServiceId arguments
ICall_pwrConfigActivityCounterAction , ICall_pwrRequire and ICall_pwrDispense arguments.
Definition: icall.h:609
uint_fast32_t ICall_PwrBitmap_t
Power control bitmap type.
Definition: icall.h:603
ICall_PwrNotifyFn _private
a field for private use. Do not access the field. User data should follow this field.
Definition: icall.h:761
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:577
uint32_t events
events
Definition: icall.h:533
ICall_ServiceEnum service
service id
Definition: icall.h:460
ICall_ServiceEnum servId
field to store the service id
Definition: icall.h:544
ICall_Errno ICall_send(ICall_EntityID src, ICall_EntityID dest, ICall_MSGFormat format, void *msg)
Sends a message to an entity.
ICall_entityId2ServiceId arguments
Definition: icall.h:540
#define ICALL_SERVICE_CLASS_PRIMITIVE
Service class enumerated value for primitive service.
Definition: icall.h:60
void * msg
field to store the starting address of the message body
Definition: icall.h:511
ICall_Errno ICall_postSemaphore(ICall_Semaphore sem)
Post on a semaphore.
uint_least32_t milliseconds
timeout period in milliseconds
Definition: icall.h:776
ICall_Errno(* ICall_Dispatcher)(ICall_FuncArgsHdr *args)
Call dispatcher function pointer type.
Definition: icall.h:796
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:467
struct _icall_get_entity_id_args_t ICall_GetEntityIdArgs
ICall_getEntityId arguments
Event for app RTI->stack RC App.
Definition: icall.h:896
void(* isrfunc)(void)
pointer to the interrupt service function
Definition: icall.h:559
uint_fast8_t state
power transition state
Definition: icall.h:621
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:637
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...
void ICall_stopTimer(ICall_TimerID id)
Stops a timer.
struct _icall_getbool_args_t ICall_GetBoolArgs
ICall_pwrIsStableXOSCHF arguments
int initcount
semaphore initial count value
Definition: icall.h:663
struct _icall_pwr_notify_data_t ICall_PwrNotifyData
Power state transition notify function data object type.
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:531
struct _icall_stop_timer_args_t ICall_StopTimerArgs
ICall_stopTimer arguments
ICall_getEntityId arguments
Definition: icall.h:784
ICall_allocMsg or ICall_malloc arguments
Definition: icall.h:473
ICall_Errno ICall_registerISR_Ext(int intnum, void(*isrfunc)(void), int intPriority)
ICall Register ISR.
ICall_Errno ICall_pwrSwitchXOSCHF(void)
Switch clock source to HF XOSC. This function must be called after HF XOSC is stable.
ICall_waitMatch arguments
Definition: icall.h:773
ICall_EnterCS ICall_enterCriticalSection
Enter critical section function pointer of the current image.
bool ICall_pwrIsStableXOSCHF(void)
Checks whether HF XOSC is stable. This function must be called after HF XOSC is turned on (through po...
ICall_EntityID dest
field to store the entity id of the destination of the message
Definition: icall.h:779
int_least32_t intnum
interrupt number
Definition: icall.h:566
struct _icall_signal_args_t ICall_SignalArgs
ICall_signal arguments
ICall_Errno ICall_pwrRegisterNotify(ICall_PwrNotifyFn fn, ICall_PwrNotifyData *obj)
Registers a power state transition notify function.
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 usin...
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:860
uint_least32_t value
field to store the retrieved value
Definition: icall.h:631
ICall_wait arguments
Definition: icall.h:515
void ICall_createRemoteTasks(void)
Create remote tasks.
struct _icall_wait_args_t ICall_WaitArgs
ICall_wait arguments
ICall_TimerID timerid
timer ID
Definition: icall.h:872
void * arg
pointer to an argument to be passed to the callback function
Definition: icall.h:874
SYNC message from RNP app -> stack.
Definition: icall.h:901
ICall_ServiceEnum service
service id
Definition: icall.h:888
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:490
ICall_waitSemaphore argument
Definition: icall.h:675
int_least32_t intnum
interrupt number
Definition: icall.h:551
struct _icall_pwr_upd_activity_counter_args_t ICall_PwrUpdActivityCounterArgs
ICall_pwrUpdActivityCounter arguments
uint_least32_t milliseconds
timeout in milliseconds
Definition: icall.h:679
Event for stack RTI->app RTI module.
Definition: icall.h:899
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:767
uint_least8_t cmdId
command id (applicable only to User Profile subgrp)
Definition: icall.h:910
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:656
ICall_registerISR arguments
Definition: icall.h:555
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:550
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:517
ICall_EntityID entityId
entity id
Definition: icall.h:543
void * ICall_Semaphore
Semaphore used for ICall.
Definition: icall.h:427
uint_least32_t icall_lite_id_t
ICall Lite ID.
Definition: icall.h:905
void(* entryfn)(size_t arg)
task entry function
Definition: icall.h:646
uint_least32_t milliseconds
timeout period in milliseconds
Definition: icall.h:518
ICall_EntityID entity
field to store the assigned entity id
Definition: icall.h:863
ICall_MsgMatchFn matchFn
match function
Definition: icall.h:777
ICall_TimerCback cback
callback function
Definition: icall.h:873
void(* isrfunc)(void)
pointer to ISR
Definition: icall.h:567
struct _icall_create_semaphore_args_t ICall_CreateSemaphoreArgs
ICall_createSemaphore argument
ICall_registerApp arguments
Definition: icall.h:465
Event for stack->app RC App.
Definition: icall.h:897
ICall_FuncArgsHdr hdr
Definition: icall.h:587
ICall_pwrUpdActivityCounter arguments
Definition: icall.h:593
ICall_Semaphore sem
semaphore
Definition: icall.h:678
uint_fast32_t ICall_getTicks(void)
Gets the current tick counter value.
void ICall_init(void)
Initializes the dispatcher implementation.
ICall_getLocalMsgEntityId arguments
Definition: icall.h:885
ICall_ServiceEnum servId
service id
Definition: icall.h:507
ICall_createSemaphore argument
Definition: icall.h:654
struct _icall_pwr_register_notify_args_t ICall_PwrRegisterNotifyArgs
ICall_pwrRegisterNotify arguments
uint_least8_t ICall_resetReason
Special global variable to set the reset reason by the boot code, before ICall is initialized...
ICall_pwrGetXOSCStartupTime arguments
Definition: icall.h:627
uint_least8_t ICall_EntityID
Entity id data type.
Definition: icall.h:435
int_least32_t intnum
interrupt number
Definition: icall.h:558
ASYNC message from RNP app->stack.
Definition: icall.h:900
ICall_Dispatcher ICall_dispatcher
Call dispatcher pointer of the current image.
ICall_EntityID src
Entity id of the sender of the message Destination id.
Definition: icall.h:491
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:565
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:524
struct _icall_fetch_msg_args_t ICall_FetchMsgArgs
ICall_fetchServiceMsg and ICall_fetchMsg arguments
ICall_PwrNotifyFn fn
notify function to handle notification
Definition: icall.h:768
ICall_Errno ICall_fetchMsg(ICall_EntityID *src, ICall_EntityID *dest, void **msg)
Retrieves a message, queued to receive queue of the calling thread.
ICall_setTimer arguments
Definition: icall.h:868
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.
uint_least32_t timeout
timeout period
Definition: icall.h:871
ICall_ServiceEnum service
service id of the enrolling service
Definition: icall.h:861
ICall_Errno ICall_enableMInt(void)
Enables master interrupt and context switching.
void(* ICall_RemoteTaskEntry)(const ICall_RemoteTaskArg *arg0, void *arg1)
Service entry function prototype.
Definition: icall.h:846
uint_fast8_t result
Result (true or false)
Definition: icall.h:639
ICall_TimerID timerid
timer ID
Definition: icall.h:881
uint_least16_t ICall_ServiceEnum
Service enumeration data type.
Definition: icall.h:415
ICall_Semaphore sem
created semaphore
Definition: icall.h:664
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...
struct _icall_signal_events_args_t ICall_SignalEventsArgs
ICall_signal arguments
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,
union _icall_fetch_msg_args_t::@1 src
union of service and entity id's
ICall_EntityID ICall_getEntityId(void)
Retrieves an entity ID of (arbitrary) one of the entities registered from the calling thread...
ICall_FuncArgsHdr hdr
common arguments
Definition: icall.h:870
bool ICall_pwrUpdActivityCounter(bool incFlag)
Increments or decrements power activity counter.
ICall_Errno ICall_registerApp(ICall_EntityID *entity, ICall_SyncHandle *msgSyncHdl)
Registers an application.
ICall_PwrBitmap_t bitmap
power configuration bitmap
Definition: icall.h:612