53 #ifndef __RKHFWK_RDYGRP_H__
54 #define __RKHFWK_RDYGRP_H__
66 #if RKH_CFG_FWK_MAX_SMA <= 8
67 #define RKH_NUM_RDYGRP 1
68 #elif RKH_CFG_FWK_MAX_SMA > 8 && RKH_CFG_FWK_MAX_SMA <= 16
69 #define RKH_NUM_RDYGRP 2
70 #elif RKH_CFG_FWK_MAX_SMA > 16 && RKH_CFG_FWK_MAX_SMA <= 24
71 #define RKH_NUM_RDYGRP 3
72 #elif RKH_CFG_FWK_MAX_SMA > 24 && RKH_CFG_FWK_MAX_SMA <= 32
73 #define RKH_NUM_RDYGRP 4
74 #elif RKH_CFG_FWK_MAX_SMA > 32 && RKH_CFG_FWK_MAX_SMA <= 40
75 #define RKH_NUM_RDYGRP 5
76 #elif RKH_CFG_FWK_MAX_SMA > 40 && RKH_CFG_FWK_MAX_SMA <= 48
77 #define RKH_NUM_RDYGRP 6
78 #elif RKH_CFG_FWK_MAX_SMA > 48 && RKH_CFG_FWK_MAX_SMA <= 56
79 #define RKH_NUM_RDYGRP 7
80 #elif RKH_CFG_FWK_MAX_SMA > 56 && RKH_CFG_FWK_MAX_SMA <= 64
81 #define RKH_NUM_RDYGRP 8
139 rui8_t tbl[RKH_NUM_RDYGRP];
142 typedef struct RdyCbArg RdyCbArg;
void rkh_rdygrp_setReady(RKHRdyGrp *const me, rui8_t prio)
Making an active object ready inserting it into the ready list.
rbool_t rkh_rdygrp_isReady(RKHRdyGrp *const me)
Evaluates to true if any active object is ready.
void rkh_rdygrp_setUnready(RKHRdyGrp *const me, rui8_t prio)
Removing an active object from the ready list.
rui8_t rkh_rdygrp_findHighest(RKHRdyGrp *const me)
Finding the highest priority active object ready.
rui8_t rkh_rdygrp_traverse(RKHRdyGrp *const me, void(*rdyCb)(RdyCbArg *), RdyCbArg *rdyCbArg)
Traverse a ready list to find the ready active objects and thus invoking a callback function.
void rkh_rdygrp_init(RKHRdyGrp *const me)
Initializes the ready mechanism for active objects.
RKH engine interface.This header file is directly included in RKH interface file, rkh....
rui8_t grp
Each bit in rkhrg.grp is used to indicate whenever any SMA in a group is ready to run.