comparison src/cs/drivers/drv_app/lcc/lcc_api.c @ 0:b6a5e36de839

src/cs: initial import from Magnetite
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 15 Jul 2018 04:39:26 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:b6a5e36de839
1 /******************************************************************************
2 * Power Task (pwr)
3 * Design and coding by Svend Kristian Lindholm, skl@ti.com
4 *
5 * PWR MMI Interface
6 *
7 * $Id: pwr_api.c 1.1 Wed, 20 Aug 2003 10:22:37 +0200 skl $
8 *
9 ******************************************************************************/
10
11 #include "lcc/lcc.h"
12 #include "lcc/lcc_env.h"
13 #include "lcc/lcc_trace.h"
14 #include "rv/rv_defined_swe.h"
15
16 /******************************************************************************
17 * Function prototypes
18 ******************************************************************************/
19
20 T_RVM_RETURN pwr_start_timer(UINT32 *timer_begin);
21
22 // Inform the PWR process which callback function to send MMI events
23 // and perform initialization of mmi related variables
24 void pwr_register (T_RV_RETURN_PATH *return_path, void *ptr) {
25 ttw(ttr(TTrInit,"pwr_register (%d)" NL, 0x00));
26
27 // Assign return path (callback or task address id)
28 pwr_ctrl->rpath.callback_func = return_path->callback_func;
29 pwr_ctrl->rpath.addr_id = return_path->addr_id;
30
31 // Pointer to mmi event memory allocated (& deallocated) by the MMI
32 pwr_ctrl->mmi_ptr = (struct mmi_info_ind_s *) ptr;
33
34 // Yes - the mmi has registered!
35 pwr_ctrl->flag_mmi_registered = 1;
36
37 // Start the mmi repetition timer
38 pwr_start_timer(&pwr_ctrl->time_begin_mmi_rep);
39 ttw(ttr(TTrTimerLow,"mmi repetition timer started(%d)" NL, 0));
40
41 ttw(ttr(TTrInit,"pwr_register (%d)" NL, 0xFF));
42 }