kmpp_obj_func.h 876 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: Apache-2.0 OR MIT */
  2. /*
  3. * Copyright (c) 2024 Rockchip Electronics Co., Ltd.
  4. */
  5. #ifndef KMPP_OBJ_FUNC_PREFIX
  6. #error "KMPP_OBJ_FUNC_PREFIX must be defined on using kmpp_idef_begin.h"
  7. #endif
  8. #ifndef KMPP_OBJ_INTF_TYPE
  9. #error "KMPP_OBJ_INTF_TYPE must be defined on using kmpp_idef_begin.h"
  10. #endif
  11. #ifndef KMPP_OBJ_ENTRY_TABLE
  12. #error "KMPP_OBJ_ENTRY_TABLE must be defined on using kmpp_idef_begin.h"
  13. #endif
  14. #define KMPP_OBJ_FUNC(x, y, z) x##y##z
  15. #define ENTRY_TO_DECLARE(ftype, type, f1) \
  16. rk_s32 KMPP_OBJ_FUNC(KMPP_OBJ_FUNC_PREFIX, _set_, f1)(KMPP_OBJ_INTF_TYPE p, type val); \
  17. rk_s32 KMPP_OBJ_FUNC(KMPP_OBJ_FUNC_PREFIX, _get_, f1)(KMPP_OBJ_INTF_TYPE p, type* val);
  18. KMPP_OBJ_ENTRY_TABLE(ENTRY_TO_DECLARE)
  19. #undef KMPP_OBJ_FUNC_PREFIX
  20. #undef KMPP_OBJ_INTF_TYPE
  21. #undef KMPP_OBJ_ENTRY_TABLE
  22. #undef ENTRY_TO_DECLARE
  23. #undef KMPP_OBJ_FUNC