/* * abe_init_subroutine_table * * parameter : * none * * operations : * initializes the default table of pointers to subroutines * * return value : * */ void abe_init_subroutine_table(void) { abe_uint32 id; /* reset the table's pointers */ abe_subroutine_write_pointer = 0; /* the first index is the NULL task */ abe_add_subroutine(&id,(abe_subroutine2) abe_null_subroutine_2, SUB_0_PARAM, (abe_uint32*)0); /* write mixer has 3 parameters @@@ TBD*/ abe_add_subroutine(&(abe_subroutine_id[SUB_WRITE_MIXER]), (abe_subroutine2) abe_write_mixer, SUB_4_PARAM, (abe_uint32*)0); /* ping-pong player IRQ */ abe_add_subroutine(&abe_irq_pingpong_player_id,(abe_subroutine2) abe_null_subroutine_0, SUB_0_PARAM, (abe_uint32*)0); abe_add_subroutine(&abe_irq_aps_adaptation_id,(abe_subroutine2) abe_default_irq_aps_adaptation, SUB_0_PARAM, (abe_uint32*)0); }
/* * ABE_PLUG_SUBROUTINE * * Parameter : * id: returned sequence index after plugging a new subroutine * f : subroutine address to be inserted * n : number of parameters of this subroutine * * Returned value : error code * * Operations : register a list of subroutines for call-back purpose * */ void abe_plug_subroutine(abe_uint32 *id, abe_subroutine2 f, abe_uint32 n, abe_uint32* params) { _lock_enter _log(id_plug_subroutine,(abe_uint32)(*id),(abe_uint32)f,n) abe_add_subroutine((abe_uint32 *)id, (abe_subroutine2)f, (abe_uint32)n, (abe_uint32*)params); _lock_exit }