1: int32_t AG903_BMUMgrGetBMUSrcAddress(
AG903_BMUMgrHandle *handle, uint32_t *addr)
2: {
3: uint8_t src = handle->src_id;
4: uint32_t unit = (handle - handle_list);
5:
6:
7:
if(unit >=
AG903_BMU_UNIT_NUM || &handle_list[unit] != handle)
8: {
9:
return -
AG903_EINVAL;
10: }
11:
12:
13:
if(
AG903_BMU_SRC_GFX0 <= src && src <=
AG903_BMU_SRC_GFX3)
14: {
15:
16: (*addr) = (unit<<24) | ((uint32_t)5<<29) | ((uint32_t)1<<28);
17: }
else
18: {
19:
20: (*addr) = (unit<<24) | ((uint32_t)5<<29);
21: }
22:
23:
return AG903_ENONE;
24: }