27 #include "hal_assert.h" 33 #define ICALL_SERVICE_CLASS_MASK 0xFFF8 40 #define ICALL_SERVICE_INSTANCE_MASK 0x0007 47 #define ICALL_SERVICE_CLASS_PRIMITIVE 0x0008 52 #define ICALL_SERVICE_CLASS_BLE 0x0010 55 #define ICALL_SERVICE_CLASS_TIMAC 0x0018 58 #define ICALL_SERVICE_CLASS_REMOTI_RTI 0x0020 61 #define ICALL_SERVICE_CLASS_REMOTI_RCN 0x0028 64 #define ICALL_SERVICE_CLASS_ZSTACK 0x0030 67 #define ICALL_SERVICE_CLASS_NPI 0x0038 70 #define ICALL_SERVICE_CLASS_BLE_MSG 0x0050 79 #define ICALL_SERVICE_CLASS_CRYPTO 0x0080 85 #define ICALL_SERVICE_CLASS_BLE_BOARD 0x0088 91 #define ICALL_SERVICE_CLASS_TIMAC_BOARD 0x0090 97 #define ICALL_SERVICE_CLASS_RADIO 0x0098 104 #define ICALL_SERVICE_CLASS_DUMMY 0x0100 111 #define ICALL_SERVICE_CLASS_DUMMY_BOARD 0x0200 116 #define ICALL_INVALID_ENTITY_ID 0xffu 121 #define ICALL_INVALID_TIMER_ID NULL 130 #define ICALL_UNDEF_DEST_ID 0xffu 133 #define ICALL_ERRNO_SUCCESS 0 136 #define ICALL_ERRNO_TIMEOUT 1 139 #define ICALL_ERRNO_NOMSG 2 146 #define ICALL_ERRNO_INVALID_SERVICE -1 152 #define ICALL_ERRNO_INVALID_FUNCTION -2 155 #define ICALL_ERRNO_INVALID_PARAMETER -3 158 #define ICALL_ERRNO_NO_RESOURCE -4 165 #define ICALL_ERRNO_UNKNOWN_THREAD -5 168 #define ICALL_ERRNO_CORRUPT_MSG -6 171 #define ICALL_ERRNO_OVERFLOW -7 174 #define ICALL_ERRNO_UNDERFLOW -8 177 #define ICALL_MSG_FORMAT_KEEP 0 183 #define ICALL_MSG_FORMAT_1ST_CHAR_TASK_ID 1 189 #define ICALL_MSG_FORMAT_3RD_CHAR_TASK_ID 2 195 #define ICALL_MSG_FORMAT_DIRECT_API_ID 3 200 #define ICALL_SLIM_DIRECT_API_DONE_CMD_ID 0x42 207 #define ICALL_TIMEOUT_FOREVER 0xfffffffful 213 #ifndef ICALL_TIMEOUT_PREDEFINE 214 #define ICALL_TIMEOUT_PREDEFINE 5000 220 #define ICALL_SEMAPHORE_MODE_COUNTING 0 225 #define ICALL_SEMAPHORE_MODE_BINARY 1 230 #define ICALL_PRIMITIVE_FUNC_ENROLL 0 233 #define ICALL_PRIMITIVE_FUNC_REGISTER_APP 1 236 #define ICALL_PRIMITIVE_FUNC_MSG_ALLOC 2 239 #define ICALL_PRIMITIVE_FUNC_MSG_FREE 3 242 #define ICALL_PRIMITIVE_FUNC_MALLOC 4 245 #define ICALL_PRIMITIVE_FUNC_FREE 5 248 #define ICALL_PRIMITIVE_FUNC_SEND_MSG 6 251 #define ICALL_PRIMITIVE_FUNC_FETCH_MSG 7 254 #define ICALL_PRIMITIVE_FUNC_SEND_SERV_MSG 8 257 #define ICALL_PRIMITIVE_FUNC_FETCH_SERV_MSG 9 260 #define ICALL_PRIMITIVE_FUNC_WAIT 10 263 #define ICALL_PRIMITIVE_FUNC_SIGNAL 11 266 #define ICALL_PRIMITIVE_FUNC_ABORT 12 269 #define ICALL_PRIMITIVE_FUNC_ENABLE_INT 13 272 #define ICALL_PRIMITIVE_FUNC_DISABLE_INT 14 275 #define ICALL_PRIMITIVE_FUNC_ENABLE_MINT 15 278 #define ICALL_PRIMITIVE_FUNC_DISABLE_MINT 16 281 #define ICALL_PRIMITIVE_FUNC_REGISTER_ISR 17 284 #define ICALL_PRIMITIVE_FUNC_GET_TICKS 18 287 #define ICALL_PRIMITIVE_FUNC_SET_TIMER_MSECS 19 290 #define ICALL_PRIMITIVE_FUNC_GET_TICK_PERIOD 20 293 #define ICALL_PRIMITIVE_FUNC_GET_MAX_MILLISECONDS 21 296 #define ICALL_PRIMITIVE_FUNC_ENTITY2SERVICE 22 299 #define ICALL_PRIMITIVE_FUNC_PWR_UPD_ACTIVITY_COUNTER 23 302 #define ICALL_PRIMITIVE_FUNC_PWR_REGISTER_NOTIFY 24 305 #define ICALL_PRIMITIVE_FUNC_WAIT_MATCH 25 308 #define ICALL_PRIMITIVE_FUNC_GET_ENTITY_ID 26 311 #define ICALL_PRIMITIVE_FUNC_SET_TIMER 27 314 #define ICALL_PRIMITIVE_FUNC_STOP_TIMER 28 320 #define ICALL_PRIMITIVE_FUNC_PWR_CONFIG_AC_ACTION 29 323 #define ICALL_PRIMITIVE_FUNC_PWR_REQUIRE 30 326 #define ICALL_PRIMITIVE_FUNC_PWR_DISPENSE 31 329 #define ICALL_PRIMITIVE_FUNC_THREAD_SERVES 32 332 #define ICALL_PRIMITIVE_FUNC_PWR_IS_STABLE_XOSC_HF 33 335 #define ICALL_PRIMITIVE_FUNC_PWR_GET_TRANSITION_STATE 34 338 #define ICALL_PRIMITIVE_FUNC_CREATE_TASK 35 341 #define ICALL_PRIMITIVE_FUNC_CREATE_SEMAPHORE 36 344 #define ICALL_PRIMITIVE_FUNC_WAIT_SEMAPHORE 37 347 #define ICALL_PRIMITIVE_FUNC_SWITCH_XOSC_HF 38 350 #define ICALL_PRIMITIVE_FUNC_PWR_GET_XOSC_STARTUP_TIME 39 353 #define ICALL_PRIMITIVE_FUNC_REGISTER_ISR_EXT 40 357 #define ICALL_PRIMITIVE_FUNC_POST_SEMAPHORE 41 360 #define ICALL_PRIMITIVE_FUNC_CREATE_EVENT 42 363 #define ICALL_PRIMITIVE_FUNC_WAIT_EVENT 43 366 #define ICALL_PRIMITIVE_FUNC_POST_EVENT 44 373 #define ICALL_MSG_FUNC_GET_LOCAL_MSG_ENTITY_ID 0 380 #define ICALL_MSG_EVENT_ID Event_Id_31 384 typedef int_fast16_t ICall_Errno;
387 typedef uint_least16_t ICall_ServiceEnum;
390 typedef uint_least8_t ICall_MSGFormat;
393 typedef uint_least16_t ICall_FuncID;
396 typedef void *ICall_SyncHandle;
398 typedef void *ICall_Semaphore;
402 typedef void *ICall_Event;
406 typedef uint_least8_t ICall_EntityID;
409 typedef void *ICall_TimerID;
419 typedef bool (*ICall_MsgMatchFn)(ICall_ServiceEnum src, ICall_EntityID dest,
426 typedef void (*ICall_TimerCback)(
void *arg);
568 void (*isrfunc)(void);
575 int_least32_t intnum;
576 void (*isrfunc)(void);
617 typedef uint_fast32_t ICall_PwrBitmap_t;
672 void (*entryfn)(
size_t arg);
681 #ifdef ICALL_RTOS_SEMAPHORE_API 683 typedef struct _icall_create_semaphore_args_t
697 } ICall_CreateSemaphoreArgs;
700 typedef struct _icall_post_semaphore_args_t
706 } ICall_PostSemaphoreArgs;
709 typedef struct _icall_wait_semaphore_args_t
716 uint_least32_t milliseconds;
717 } ICall_WaitSemaphoreArgs;
720 #ifdef ICALL_RTOS_EVENTS_API 722 typedef struct _icall_create_event_args_t
728 } ICall_CreateEventArgs;
731 typedef struct _icall_post_event_args_t
739 } ICall_PostEventArgs;
742 typedef struct _icall_wait_event_args_t
749 uint_least32_t milliseconds;
750 } ICall_WaitEventArgs;
776 typedef uint_fast8_t ICall_PwrTransition;
789 typedef void (*ICall_PwrNotifyFn)(ICall_PwrTransition pwrTrans,
810 ICall_PwrNotifyFn
fn;
851 typedef uint_least32_t ICall_CSState;
857 typedef ICall_CSState (*ICall_EnterCS)(void);
864 typedef void (*ICall_LeaveCS)(ICall_CSState key);
867 extern ICall_Dispatcher ICall_dispatcher;
870 extern ICall_EnterCS ICall_enterCriticalSection;
873 extern ICall_LeaveCS ICall_leaveCriticalSection;
879 ICall_Dispatcher dispatch;
880 ICall_EnterCS entercs;
881 ICall_LeaveCS leavecs;
911 ICall_ServiceFunc
fn;
960 ICALL_RTI_APP_CMD_EVENT = 0xE0,
962 ICALL_RTI_STACK_CMD_EVENT = 0xE1,
964 ICALL_RTI_APP_ASYNC_CMD_EVENT = 0xE2,
966 ICALL_RTI_APP_SYNC_CMD_EVENT = 0xE3,
968 ICALL_RCN_APP_ASYNC_CMD_EVENT = 0xE4,
970 ICALL_RCN_APP_SYNC_CMD_EVENT = 0xE5
971 }ICall_RemotiCmdEvent_t;
974 typedef uint_least32_t icall_slim_id_t;
976 typedef struct _ICall_SlimCmdStatus_
979 } ICall_SlimCmdStatus;
981 PACKED_TYPEDEF_STRUCT
983 uint_least32_t * pointerStack;
984 icall_slim_id_t directAPI;
985 } icall_directAPIMsg_t;
987 PACKED_TYPEDEF_STRUCT
990 icall_directAPIMsg_t msg;
1000 extern uint_least8_t ICall_resetReason;
1007 extern void ICall_init(
void);
1030 extern void ICall_createRemoteTasks(
void);
1039 extern ICall_EntityID ICall_searchServiceEntity(ICall_ServiceEnum
service);
1061 uint32_t icall_directAPI( uint8_t service, icall_slim_id_t
id, ... );
1077 ICall_Errno ICall_registerApp(ICall_EntityID *entity, ICall_SyncHandle *msgSyncHdl);
1086 void *ICall_allocMsg(
size_t size);
1093 void ICall_freeMsg(
void *msg);
1135 ICall_sendServiceMsg(ICall_EntityID src,
1136 ICall_ServiceEnum dest,
1137 ICall_MSGFormat format,
void *msg);
1168 ICall_fetchServiceMsg(ICall_ServiceEnum *src,
1169 ICall_EntityID *dest,
1185 ICall_Errno ICall_wait(uint_fast32_t milliseconds);
1192 ICall_Errno ICall_signal(ICall_SyncHandle msgSyncHdl);
1209 ICall_enrollService(ICall_ServiceEnum service,
1210 ICall_ServiceFunc fn,
1211 ICall_EntityID *entity,
1212 ICall_SyncHandle *msgSyncHdl);
1220 void *ICall_malloc(uint_least16_t size);
1226 void ICall_free(
void *msg);
1241 ICall_Errno ICall_send(ICall_EntityID src,
1242 ICall_EntityID dest,
1243 ICall_MSGFormat format,
1265 ICall_Errno ICall_fetchMsg(ICall_EntityID *src,
1266 ICall_EntityID *dest,
1288 ICall_Errno ICall_entityId2ServiceId(ICall_EntityID entityId,
1289 ICall_ServiceEnum *servId);
1307 ICall_enableInt(
int intnum);
1314 ICall_disableInt(
int intnum);
1321 ICall_enableMInt(
void);
1328 ICall_disableMInt(
void);
1339 ICall_registerISR(
int intnum,
void (*isrfunc)(
void));
1342 ICall_registerISR_Ext(
int intnum,
void (*isrfunc)(
void),
int intPriority );
1349 ICall_getTicks(
void);
1356 ICall_getTickPeriod(
void);
1364 ICall_getMaxMSecs(
void);
1391 ICall_setTimerMSecs(uint_fast32_t msecs,
1392 ICall_TimerCback cback,
1419 ICall_setTimer(uint_fast32_t ticks,
1420 ICall_TimerCback cback,
1430 ICall_stopTimer(ICall_TimerID
id);
1448 ICall_pwrUpdActivityCounter(
bool incFlag);
1468 ICall_pwrConfigACAction(ICall_PwrBitmap_t bitmap);
1481 ICall_pwrRequire(ICall_PwrBitmap_t bitmap);
1495 ICall_pwrDispense(ICall_PwrBitmap_t bitmap);
1506 ICall_pwrIsStableXOSCHF(
void);
1515 ICall_pwrSwitchXOSCHF(
void);
1522 ICall_pwrGetXOSCStartupTime(uint_fast32_t timeUntilWakeupInMs);
1547 ICall_pwrGetTransitionState(
void);
1561 ICall_createTask(
void (*entryfn)(
size_t arg), uint_fast8_t priority,
1562 uint_fast16_t stacksize,
size_t arg);
1564 #ifdef ICALL_RTOS_SEMAPHORE_API 1576 ICall_createSemaphore(uint_fast8_t mode,
int initcount);
1579 #ifdef ICALL_RTOS_SEMAPHORE_API 1588 ICall_postSemaphore(ICall_Semaphore sem);
1591 #ifdef ICALL_RTOS_EVENTS_API 1599 ICall_createEvent(
void);
1608 ICall_postEvent(ICall_Event event, uint32_t events);
1623 ICall_waitEvent(ICall_Event event, uint_fast32_t milliseconds);
1626 #ifdef ICALL_RTOS_SEMAPHORE_API 1641 ICall_waitSemaphore(ICall_Semaphore sem, uint_fast32_t milliseconds);
1671 ICall_waitMatch(uint_least32_t milliseconds,
1672 ICall_MsgMatchFn matchFn,
1673 ICall_ServiceEnum *src,
1674 ICall_EntityID *dest,
1688 ICall_getEntityId(
void);
1698 ICall_threadServes(ICall_ServiceEnum service);
1715 ICall_getLocalMsgEntityId(ICall_ServiceEnum service, ICall_EntityID entity);
1731 static ICall_Errno ICall_registerApp(ICall_EntityID *entity,
1732 ICall_SyncHandle *msgSyncHdl)
1736 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
1737 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_REGISTER_APP;
1738 errno = ICall_dispatcher(&args.
hdr);
1751 static void *ICall_allocMsg(
size_t size)
1756 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
1757 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_MSG_ALLOC;
1759 errno = ICall_dispatcher(&args.
hdr);
1760 if (errno != ICALL_ERRNO_SUCCESS)
1772 static void ICall_freeMsg(
void *msg)
1775 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
1776 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_MSG_FREE;
1778 (void) ICall_dispatcher(&args.
hdr);
1821 ICall_sendServiceMsg(ICall_EntityID src,
1822 ICall_ServiceEnum dest,
1823 ICall_MSGFormat format,
void *msg)
1826 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
1827 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_SEND_SERV_MSG;
1832 return ICall_dispatcher(&args.
hdr);
1864 ICall_fetchServiceMsg(ICall_ServiceEnum *src,
1865 ICall_EntityID *dest,
1870 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
1871 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_FETCH_SERV_MSG;
1872 errno = ICall_dispatcher(&args.
hdr);
1892 static ICall_Errno ICall_wait(uint_fast32_t milliseconds)
1895 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
1896 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_WAIT;
1898 return ICall_dispatcher(&args.
hdr);
1906 static ICall_Errno ICall_signal(ICall_SyncHandle msgSyncHdl)
1909 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
1910 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_SIGNAL;
1913 return ICall_dispatcher(&args.
hdr);
1931 ICall_enrollService(ICall_ServiceEnum service,
1932 ICall_ServiceFunc fn,
1933 ICall_EntityID *entity,
1934 ICall_SyncHandle *msgSyncHdl)
1938 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
1939 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_ENROLL;
1942 errno = ICall_dispatcher(&args.
hdr);
1954 static void *ICall_malloc(uint_least16_t size)
1959 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
1960 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_MALLOC;
1962 errno = ICall_dispatcher(&args.
hdr);
1963 if (errno != ICALL_ERRNO_SUCCESS)
1974 static void ICall_free(
void *msg)
1977 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
1978 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_FREE;
1980 (void) ICall_dispatcher(&args.
hdr);
1996 static ICall_Errno ICall_send(ICall_EntityID src,
1997 ICall_EntityID dest,
1998 ICall_MSGFormat format,
2002 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2003 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_SEND_MSG;
2008 return ICall_dispatcher(&args.
hdr);
2030 static ICall_Errno ICall_fetchMsg(ICall_EntityID *src,
2031 ICall_EntityID *dest,
2036 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2037 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_FETCH_MSG;
2038 errno = ICall_dispatcher(&args.
hdr);
2064 static ICall_Errno ICall_entityId2ServiceId(ICall_EntityID entityId,
2065 ICall_ServiceEnum *servId)
2069 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2070 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_ENTITY2SERVICE;
2072 errno = ICall_dispatcher(&args.
hdr);
2088 HAL_ASSERT( HAL_ASSERT_CAUSE_ICALL_ABORT );
2091 args.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2092 args.
func = ICALL_PRIMITIVE_FUNC_ABORT;
2093 return ICall_dispatcher(&args);
2102 ICall_enableInt(
int intnum)
2105 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2106 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_ENABLE_INT;
2108 return ICall_dispatcher(&args.
hdr);
2117 ICall_disableInt(
int intnum)
2120 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2121 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_DISABLE_INT;
2123 return ICall_dispatcher(&args.
hdr);
2131 ICall_enableMInt(
void)
2134 args.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2135 args.
func = ICALL_PRIMITIVE_FUNC_ENABLE_MINT;
2136 return ICall_dispatcher(&args);
2144 ICall_disableMInt(
void)
2147 args.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2148 args.
func = ICALL_PRIMITIVE_FUNC_DISABLE_MINT;
2149 return ICall_dispatcher(&args);
2161 ICall_registerISR(
int intnum,
void (*isrfunc)(
void))
2164 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2165 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_REGISTER_ISR;
2168 return ICall_dispatcher(&args.
hdr);
2172 ICall_registerISR_Ext(
int intnum,
void (*isrfunc)(
void),
int intPriority )
2175 args.hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2176 args.hdr.
func = ICALL_PRIMITIVE_FUNC_REGISTER_ISR_EXT;
2177 args.intnum = intnum;
2178 args.isrfunc = isrfunc;
2179 args.intPriority = intPriority;
2180 return ICall_dispatcher(&args.hdr);
2187 static uint_fast32_t
2188 ICall_getTicks(
void)
2191 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2192 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_GET_TICKS;
2193 (void) ICall_dispatcher(&args.
hdr);
2201 static uint_fast32_t
2202 ICall_getTickPeriod(
void)
2205 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2206 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_GET_TICK_PERIOD;
2207 (void) ICall_dispatcher(&args.
hdr);
2217 static uint_fast32_t
2218 ICall_getMaxMSecs(
void)
2221 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2222 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_GET_MAX_MILLISECONDS;
2223 (void) ICall_dispatcher(&args.
hdr);
2252 ICall_setTimerMSecs(uint_fast32_t msecs,
2253 ICall_TimerCback cback,
2259 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2260 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_SET_TIMER_MSECS;
2265 errno = ICall_dispatcher(&args.
hdr);
2294 ICall_setTimer(uint_fast32_t ticks,
2295 ICall_TimerCback cback,
2301 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2302 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_SET_TIMER;
2307 errno = ICall_dispatcher(&args.
hdr);
2319 ICall_stopTimer(ICall_TimerID
id)
2322 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2323 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_STOP_TIMER;
2325 (void) ICall_dispatcher(&args.
hdr);
2345 ICall_pwrUpdActivityCounter(
bool incFlag)
2348 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2349 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_UPD_ACTIVITY_COUNTER;
2351 (void)ICall_dispatcher(&args.
hdr);
2373 ICall_pwrConfigACAction(ICall_PwrBitmap_t bitmap)
2376 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2377 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_CONFIG_AC_ACTION;
2379 return ICall_dispatcher(&args.
hdr);
2394 ICall_pwrRequire(ICall_PwrBitmap_t bitmap)
2397 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2398 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_REQUIRE;
2400 return ICall_dispatcher(&args.
hdr);
2415 ICall_pwrDispense(ICall_PwrBitmap_t bitmap)
2418 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2419 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_DISPENSE;
2421 return ICall_dispatcher(&args.
hdr);
2433 ICall_pwrIsStableXOSCHF(
void)
2436 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2437 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_IS_STABLE_XOSC_HF;
2438 (void) ICall_dispatcher(&args.
hdr);
2449 ICall_pwrSwitchXOSCHF(
void)
2452 args.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2453 args.
func = ICALL_PRIMITIVE_FUNC_SWITCH_XOSC_HF;
2454 return ICall_dispatcher(&args);
2463 ICall_pwrGetXOSCStartupTime(uint_fast32_t timeUntilWakeupInMs)
2466 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2467 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_GET_XOSC_STARTUP_TIME;
2469 (void) ICall_dispatcher(&args.
hdr);
2491 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2492 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_REGISTER_NOTIFY;
2495 return ICall_dispatcher(&args.
hdr);
2505 ICall_pwrGetTransitionState(
void)
2510 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2511 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_PWR_GET_TRANSITION_STATE;
2512 errno = ICall_dispatcher(&args.
hdr);
2514 if (errno == ICALL_ERRNO_SUCCESS)
2533 ICall_createTask(
void (*entryfn)(
size_t arg), uint_fast8_t priority,
2534 uint_fast16_t stacksize,
size_t arg)
2538 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2539 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_CREATE_TASK;
2544 return ICall_dispatcher(&args.
hdr);
2547 #ifdef ICALL_RTOS_SEMAPHORE_API 2558 static ICall_Semaphore
2559 ICall_createSemaphore(uint_fast8_t mode,
int initcount)
2561 ICall_CreateSemaphoreArgs args;
2564 args.hdr.service = ICALL_SERVICE_CLASS_PRIMITIVE;
2565 args.hdr.func = ICALL_PRIMITIVE_FUNC_CREATE_SEMAPHORE;
2567 args.initcount = initcount;
2568 errno = ICall_dispatcher(&args.hdr);
2569 if (errno == ICALL_ERRNO_SUCCESS)
2577 #ifdef ICALL_RTOS_SEMAPHORE_API 2586 ICall_postSemaphore(ICall_Semaphore sem)
2588 ICall_PostSemaphoreArgs args;
2590 args.hdr.service = ICALL_SERVICE_CLASS_PRIMITIVE;
2591 args.hdr.func = ICALL_PRIMITIVE_FUNC_POST_SEMAPHORE;
2593 return ICall_dispatcher(&args.hdr);
2597 #ifdef ICALL_RTOS_EVENTS_API 2605 ICall_createEvent(
void)
2607 ICall_CreateEventArgs args;
2610 args.hdr.service = ICALL_SERVICE_CLASS_PRIMITIVE;
2611 args.hdr.func = ICALL_PRIMITIVE_FUNC_CREATE_EVENT;
2612 errno = ICall_dispatcher(&args.hdr);
2613 if (errno == ICALL_ERRNO_SUCCESS)
2628 ICall_postEvent(ICall_Event event, uint32_t events)
2630 ICall_PostEventArgs args;
2632 args.hdr.service = ICALL_SERVICE_CLASS_PRIMITIVE;
2633 args.hdr.func = ICALL_PRIMITIVE_FUNC_POST_EVENT;
2635 args.events = events;
2636 return ICall_dispatcher(&args.hdr);
2652 ICall_waitEvent(ICall_Event event, uint_fast32_t milliseconds)
2654 ICall_WaitEventArgs args;
2656 args.hdr.service = ICALL_SERVICE_CLASS_PRIMITIVE;
2657 args.hdr.func = ICALL_PRIMITIVE_FUNC_WAIT_EVENT;
2659 args.milliseconds = milliseconds;
2660 return ICall_dispatcher(&args.hdr);
2664 #ifdef ICALL_RTOS_SEMAPHORE_API 2679 ICall_waitSemaphore(ICall_Semaphore sem, uint_fast32_t milliseconds)
2681 ICall_WaitSemaphoreArgs args;
2683 args.hdr.service = ICALL_SERVICE_CLASS_PRIMITIVE;
2684 args.hdr.func = ICALL_PRIMITIVE_FUNC_WAIT_SEMAPHORE;
2686 args.milliseconds = milliseconds;
2687 return ICall_dispatcher(&args.hdr);
2718 ICall_waitMatch(uint_least32_t milliseconds,
2719 ICall_MsgMatchFn matchFn,
2720 ICall_ServiceEnum *src,
2721 ICall_EntityID *dest,
2726 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2727 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_WAIT_MATCH;
2730 errno = ICall_dispatcher(&args.
hdr);
2753 static ICall_EntityID
2754 ICall_getEntityId(
void)
2758 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2759 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_GET_ENTITY_ID;
2760 errno = ICall_dispatcher(&args.
hdr);
2761 if (errno == ICALL_ERRNO_SUCCESS)
2765 return ICALL_INVALID_ENTITY_ID;
2777 ICall_threadServes(ICall_ServiceEnum service)
2782 args.
hdr.
service = ICALL_SERVICE_CLASS_PRIMITIVE;
2783 args.
hdr.
func = ICALL_PRIMITIVE_FUNC_THREAD_SERVES;
2785 errno = ICall_dispatcher(&args.
hdr);
2786 if (errno == ICALL_ERRNO_SUCCESS)
2808 ICall_getLocalMsgEntityId(ICall_ServiceEnum service, ICall_EntityID entity)
2813 args.
hdr.
func = ICALL_MSG_FUNC_GET_LOCAL_MSG_ENTITY_ID;
2815 errno = ICall_dispatcher(&args.
hdr);
2816 if (errno == ICALL_ERRNO_SUCCESS)
ICall_FuncArgsHdr hdr
Definition: icall.h:598
ICall_FuncArgsHdr hdr
Definition: icall.h:531
ICall_PwrNotifyData * obj
Definition: icall.h:812
ICall_TimerCback cback
Definition: icall.h:929
ICall_EntityID entityId
Definition: icall.h:501
ICall_MsgMatchFn matchFn
Definition: icall.h:823
ICall_ServiceEnum servId
Definition: icall.h:482
ICall_FuncArgsHdr hdr
Definition: icall.h:564
ICall_EntityID dest
Definition: icall.h:827
ICall_ServiceEnum servId
Definition: icall.h:548
ICall_SyncHandle syncHandle
Definition: icall.h:533
void * ptr
Definition: icall.h:466
uint_least8_t localId
Definition: icall.h:953
ICall_FuncArgsHdr hdr
Definition: icall.h:607
ICall_EntityID entity
Definition: icall.h:838
ICall_SyncHandle syncHandle
Definition: icall.h:524
size_t arg
Definition: icall.h:678
ICall_EntityID entity
Definition: icall.h:913
uint_least8_t priority
Definition: icall.h:674
void * msg
Definition: icall.h:829
uint_fast8_t state
Definition: icall.h:639
ICall_ServiceEnum servId
Definition: icall.h:661
ICall_FuncArgsHdr hdr
Definition: icall.h:555
uint_least32_t timeUntilWakeupInMs
Definition: icall.h:650
void * arg
Definition: icall.h:931
ICall_FuncArgsHdr hdr
Definition: icall.h:659
ICall_FuncArgsHdr hdr
Definition: icall.h:947
uint_least32_t value
Definition: icall.h:652
uint_fast8_t result
Definition: icall.h:663
void(* entryfn)(size_t arg)
Definition: icall.h:672
bool value
Definition: icall.h:600
uint_least32_t milliseconds
Definition: icall.h:515
ICall_ServiceEnum servId
Definition: icall.h:499
void * msg
Definition: icall.h:506
ICall_EntityID src
Definition: icall.h:475
ICall_FuncArgsHdr hdr
Definition: icall.h:544
ICall_EntityID entity
Definition: icall.h:951
ICall_EntityID entity
Definition: icall.h:443
ICall_FuncArgsHdr hdr
Definition: icall.h:819
ICall_TimerID timerid
Definition: icall.h:940
ICall_FuncArgsHdr hdr
Definition: icall.h:587
ICall_ServiceEnum service
Definition: icall.h:909
size_t size
Definition: icall.h:455
uint_least32_t value
Definition: icall.h:589
ICall_PwrNotifyFn fn
Definition: icall.h:810
void(* isrfunc)(void)
Definition: icall.h:568
ICall_ServiceFunc fn
Definition: icall.h:911
ICall_FuncArgsHdr hdr
Definition: icall.h:938
ICall_FuncArgsHdr hdr
Definition: icall.h:453
ICall_FuncArgsHdr hdr
Definition: icall.h:441
union _icall_fetch_msg_args_t::@1 src
ICall_EntityID entityId
Definition: icall.h:480
ICall_FuncArgsHdr hdr
Definition: icall.h:648
ICall_FuncArgsHdr hdr
Definition: icall.h:670
ICall_ServiceEnum service
Definition: icall.h:432
bool incFlag
Definition: icall.h:609
uint_least32_t milliseconds
Definition: icall.h:821
ICall_EntityID entityId
Definition: icall.h:546
ICall_PwrBitmap_t bitmap
Definition: icall.h:628
bool pwrRequired
Definition: icall.h:611
ICall_FuncArgsHdr hdr
Definition: icall.h:626
ICall_TimerID timerid
Definition: icall.h:927
ICall_FuncArgsHdr hdr
Definition: icall.h:836
uint_least32_t timeout
Definition: icall.h:925
ICall_FuncID func
Definition: icall.h:434
ICall_MSGFormat format
Definition: icall.h:485
ICall_FuncArgsHdr hdr
Definition: icall.h:637
ICall_EntityID dest
Definition: icall.h:504
ICall_FuncArgsHdr hdr
Definition: icall.h:473
ICall_SyncHandle msgSyncHdl
Definition: icall.h:916
ICall_ServiceEnum servId
Definition: icall.h:825
union _icall_send_args_t::@0 dest
ICall_FuncArgsHdr hdr
Definition: icall.h:513
ICall_FuncArgsHdr hdr
Definition: icall.h:494
ICall_FuncArgsHdr hdr
Definition: icall.h:808
uint_least16_t stacksize
Definition: icall.h:676
ICall_SyncHandle msgSyncHdl
Definition: icall.h:446
void * msg
Definition: icall.h:487
int_least32_t intnum
Definition: icall.h:566
ICall_FuncArgsHdr hdr
Definition: icall.h:923
ICall_FuncArgsHdr hdr
Definition: icall.h:907
ICall_FuncArgsHdr hdr
Definition: icall.h:522
ICall_ServiceEnum service
Definition: icall.h:949
int_least32_t intnum
Definition: icall.h:557
ICall_PwrNotifyFn _private
Definition: icall.h:801
ICall_FuncArgsHdr hdr
Definition: icall.h:464
void * ptr
Definition: icall.h:457