Lines Matching refs:onoff_srv

13 static struct onoff_manager onoff_srv;  variable
241 rc = onoff_manager_init(&onoff_srv, &transitions); in setup_test()
248 rc = onoff_monitor_register(&onoff_srv, &onoff_mon); in setup_test()
262 rc = onoff_request(&onoff_srv, &onoff_cli); in setup_error()
267 zassert_true(onoff_has_error(&onoff_srv), in setup_error()
283 rc = onoff_manager_init(&onoff_srv, NULL); in ZTEST()
289 rc = onoff_manager_init(&onoff_srv, &xit); in ZTEST()
294 rc = onoff_manager_init(&onoff_srv, &xit); in ZTEST()
299 rc = onoff_manager_init(&onoff_srv, &xit); in ZTEST()
314 zassert_equal(onoff_monitor_register(&onoff_srv, NULL), -EINVAL, in ZTEST()
318 zassert_equal(onoff_monitor_register(&onoff_srv, &mon), -EINVAL, in ZTEST()
330 zassert_equal(onoff_monitor_unregister(&onoff_srv, NULL), -EINVAL, in ZTEST()
334 zassert_equal(onoff_monitor_unregister(&onoff_srv, &onoff_mon), 0, in ZTEST()
336 zassert_equal(onoff_monitor_unregister(&onoff_srv, &onoff_mon), -EINVAL, in ZTEST()
350 rc = onoff_request(&onoff_srv, NULL); in ZTEST()
357 rc = onoff_request(&onoff_srv, &cli2); in ZTEST()
362 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
367 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
372 onoff_srv.refs = -1; in ZTEST()
373 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
389 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
392 zassert_equal(onoff_srv.refs, 1U, in ZTEST()
393 "req refs: %u", onoff_srv.refs); in ZTEST()
395 zassert_equal(callback_srv, &onoff_srv, in ZTEST()
408 rc = onoff_release(&onoff_srv); in ZTEST()
411 zassert_equal(onoff_srv.refs, 0U, in ZTEST()
412 "rel refs: %u", onoff_srv.refs); in ZTEST()
420 rc = onoff_release(&onoff_srv); in ZTEST()
437 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
440 zassert_equal(onoff_srv.refs, 0U, in ZTEST()
441 "to-on refs: %u", onoff_srv.refs); in ZTEST()
449 zassert_equal(onoff_srv.refs, 1U, in ZTEST()
450 "on refs: %u", onoff_srv.refs); in ZTEST()
457 rc = onoff_release(&onoff_srv); in ZTEST()
460 zassert_equal(onoff_srv.refs, 0U, in ZTEST()
461 "on refs: %u", onoff_srv.refs); in ZTEST()
468 zassert_equal(onoff_srv.refs, 0U, in ZTEST()
469 "rel refs: %u", onoff_srv.refs); in ZTEST()
487 rc = onoff_reset(&onoff_srv, NULL); in ZTEST()
493 rc = onoff_reset(&onoff_srv, &cli2); in ZTEST()
498 rc = onoff_reset(&onoff_srv, &onoff_cli); in ZTEST()
503 rc = onoff_reset(&onoff_srv, &onoff_cli); in ZTEST()
508 rc = onoff_reset(&onoff_srv, &onoff_cli); in ZTEST()
531 rc = onoff_reset(&onoff_srv, &onoff_cli); in ZTEST()
558 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
561 zassert_equal(onoff_srv.refs, 0U, in ZTEST()
562 "req refs: %u", onoff_srv.refs); in ZTEST()
571 rc = onoff_request(&onoff_srv, &cli2); in ZTEST()
601 rc = onoff_request(&onoff_srv, &cli0); in ZTEST()
604 zassert_equal(onoff_srv.refs, 1U, in ZTEST()
605 "req0 refs: %u", onoff_srv.refs); in ZTEST()
617 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
625 zassert_equal(onoff_srv.refs, 2U, in ZTEST()
626 "srv refs: %u", onoff_srv.refs); in ZTEST()
628 rc = onoff_release(&onoff_srv); /* pair with cli0 */ in ZTEST()
631 zassert_equal(onoff_srv.refs, 1U, in ZTEST()
636 rc = onoff_release(&onoff_srv); /* pair with cli */ in ZTEST()
639 zassert_equal(onoff_srv.refs, 0U, in ZTEST()
656 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
671 rc = onoff_release(&onoff_srv); in ZTEST()
674 zassert_equal(onoff_srv.refs, 0U, in ZTEST()
675 "on refs: %u", onoff_srv.refs); in ZTEST()
683 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
718 rc = onoff_monitor_unregister(&onoff_srv, &onoff_mon); in ZTEST()
724 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
727 rc = onoff_cancel(&onoff_srv, &onoff_cli); in ZTEST()
732 zassert_equal(onoff_srv.flags, ONOFF_STATE_OFF, in ZTEST()
748 rc = onoff_monitor_unregister(&onoff_srv, &onoff_mon); in ZTEST()
752 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
759 rc = onoff_release(&onoff_srv); in ZTEST()
764 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
771 zassert_equal(onoff_srv.flags, ONOFF_STATE_ON, in ZTEST()
797 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
827 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
832 zassert_true(onoff_has_error(&onoff_srv), in ZTEST()
845 rc = onoff_reset(&onoff_srv, &cli2); in ZTEST()
856 rc = onoff_reset(&onoff_srv, &onoff_cli); in ZTEST()
883 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
887 rc = onoff_release(&onoff_srv); in ZTEST()
894 rc = onoff_reset(&onoff_srv, &cli2); in ZTEST()
898 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
902 rc = onoff_release(&onoff_srv); in ZTEST()
918 rc = onoff_cancel(&onoff_srv, NULL); in ZTEST()
925 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
934 rc = onoff_cancel(&onoff_srv, &onoff_cli); in ZTEST()
938 rc = onoff_cancel(&onoff_srv, &onoff_cli); in ZTEST()
962 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
976 rc = onoff_release(&onoff_srv); in ZTEST()
979 zassert_equal(onoff_srv.refs, 0U, in ZTEST()
980 "on refs: %u", onoff_srv.refs); in ZTEST()
988 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
995 rc = onoff_cancel(&onoff_srv, &onoff_cli); in ZTEST()
1020 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
1023 rc = onoff_cancel_or_release(&onoff_srv, &onoff_cli); in ZTEST()
1040 rc = onoff_request(&onoff_srv, &onoff_cli); in ZTEST()
1046 rc = onoff_cancel_or_release(&onoff_srv, &onoff_cli); in ZTEST()