acpu_ctrl.h
ACPU Controller.
- Author
Sifli software development team
Unnamed Group
-
ACPU_TASK_INPUT_PARAM_SIZE
-
ACPU_TASK_OUTPUT_VAL_SIZE
-
HCPU_TASK_INPUT_PARAM_SIZE
-
HCPU_TASK_OUTPUT_VAL_SIZE
-
ACPU_ERR_OK
-
ACPU_ERR_COMMON
-
ACPU_ERR_PRINTF
-
ACPU_ERR_CALL_HCPU
-
ACPU_ERR_ASSERT
-
ACPU_TASK_INVALID
ACPU task name macro
-
ACPU_TASK_0
-
ACPU_TASK_1
-
ACPU_TASK_opus_encoder_init
-
ACPU_TASK_opus_encoder_ctl
-
ACPU_TASK_opus_encode
-
ACPU_TASK_opus_decoder_init
-
ACPU_TASK_opus_decoder_ctl
-
ACPU_TASK_opus_decode
-
ACPU_TASK_COUNT
-
enum hcpu_task_name_t
Values:
-
enumerator HCPU_TASK_INVALID
-
enumerator HCPU_TASK_MALLOC
-
enumerator HCPU_TASK_FREE
-
enumerator HCPU_TASK_COUNT
-
enumerator HCPU_TASK_INVALID
-
void acpu_power_on(void)
Power on ACPU, no need to be called by user
-
void acpu_power_off(void)
Power off ACPU, no need to be called by user
-
void *acpu_run_task(uint8_t task_name, void *param, uint32_t param_size, uint8_t *error_code)
Call ACPU to run specified task
- 参数:
task_name – [in] task name, 0 is invalid task name, any number greater than 0 is a valid task name, e.g. macro ACPU_TASK_0 defined above use 1 as the value
param – [in] parameter buffer pointer, the param content is copied to shared buffer which would be read by ACPU, the param buffer format is defined by each task
param_size – [in] parameter buffer size, max size is limited by ACPU_TASK_INPUT_PARAM_SIZE
error_code – [out] error code pointer, it’s used to save error code returned by ACPU, 0 means no error happens, other value means some error happens
- 返回:
ACPU returned result buffer pointer, its length is limited by ACPU_TASK_OUTPUT_VAL_SIZE. buffer format is defined by each task.
-
void acpu_main(uint8_t task_name, void *param)
ACPU entry function
User needs to implement this function to provide customized ACPU functionality.
- 参数:
task_name – [in] task name, 0 is invalid task name, any number greater than 0 is a valid task name, e.g. macro ACPU_TASK_0 defined above use 1 as the value
param – [in] parameter given by HCPU
-
void acpu_send_result(void *val, uint32_t val_size)
ACPU send result to HCPU
It can be called by ACPU to return task result to HCPU
- 参数:
val – [in] data needs to be sent to HCPU. It’s copied to shared buffer which would be read by HCPU
val_size – [in] data size, it’s limited by ACPU_TASK_OUTPUT_VAL_SIZE
-
struct opus_encode_init_arg_t
-
struct opus_encode_ctl_arg_t
-
struct opus_decode_init_arg_t
-
struct opus_decode_ctl_arg_t
-
struct opus_encode_arg_t
-
struct opus_decode_arg_t