1 // Copyright (C) 2022 Beken Corporation 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 #pragma once 16 17 #include <common/bk_include.h> 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 #define MEDIA_MAJOR_MSG_QUEUE_SIZE (60) 24 #define MEDIA_MINOR_MSG_QUEUE_SIZE (60) 25 26 #define MEDIA_EVT_BIT (16) 27 28 typedef enum 29 { 30 MONO_CPU = 0, 31 MAJOR_CPU, 32 MINOR_CPU, 33 } media_cpu_t; 34 35 36 bk_err_t media_major_init(void); 37 bk_err_t media_minor_init(void); 38 bk_err_t media_app_init(void); 39 bk_err_t media_mailbox_send_msg(uint32_t cmd, uint32_t param1, uint32_t param2); 40 41 #ifdef CONFIG_DUAL_CORE 42 #define GET_CPU_ID() get_cpu_id() 43 #else 44 #define GET_CPU_ID() (MONO_CPU) 45 #endif 46 media_cpu_t get_cpu_id(void); 47 48 49 #ifdef __cplusplus 50 } 51 #endif 52