// zrusit autoclear flag !!! A_STATUS a_event_init(A_EVENT *pEvent, osa_event_clear_mode_t clearMode) { assert(pEvent); krhino_event_create(&pEvent->event, "event", 0); pEvent->clearMode = clearMode; return A_OK; }
static uint8_t event_break_case1(void) { kstat_t ret; ret = krhino_event_create(NULL, MODULE_NAME, TEST_FLAG); MYASSERT(ret == RHINO_NULL_PTR); ret = krhino_event_create(&test_event, MODULE_NAME, TEST_FLAG); MYASSERT(ret == RHINO_SUCCESS); MYASSERT(test_event.blk_obj.obj_type == RHINO_EVENT_OBJ_TYPE); test_event.blk_obj.obj_type = RHINO_OBJ_TYPE_NONE; ret = krhino_event_del(&test_event); test_event.blk_obj.obj_type = RHINO_EVENT_OBJ_TYPE; MYASSERT(ret == RHINO_KOBJ_TYPE_ERR); ret = krhino_event_del(&test_event); MYASSERT(ret == RHINO_SUCCESS); return 0; }