comparison src/cs/drivers/drv_app/pwr/pwr_env.h @ 0:4e78acac3d88

src/{condat,cs,gpf,nucleus}: import from Selenite
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Oct 2020 06:23:26 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4e78acac3d88
1 /*****************************************************************************/
2 /* */
3 /* File Name: pwr_env.h */
4 /* */
5 /* Purpose: This file contains prototypes for RV manager related */
6 /* functions used to get info, start and stop the pwr block */
7 /* */
8 /* Version 0.1 */
9 /* */
10 /* Date Modification */
11 /* ------------------------------------ */
12 /* 20/08/2000 Create */
13 /* */
14 /* Author Candice Bazanegue (c-brille@ti.com) */
15 /* */
16 /* (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved */
17 /*****************************************************************************/
18
19 #ifndef __PWR_ENV_H__
20 #define __PWR_ENV_H__
21
22 #include "rvm/rvm_gen.h"
23 #include "pwr/pwr_api.h"
24
25 #include "pwr/pwr_cust.h"
26
27 #include "pwr/pwr_pool_size.h" /* Stack & Memory Bank sizes definitions */
28
29 #define PWR_MAILBOX_USED RVF_TASK_MBOX_1
30
31 /* memory bank size and watermark */
32 #define PWR_MB_PRIM_SIZE PWR_MB1_SIZE
33
34 #define PWR_MB_PRIM_WATERMARK (PWR_MB_PRIM_SIZE - 200)
35
36 #define PWR_MB_PRIM_INC_SIZE 0
37 #define PWR_MB_PRIM_INC_WATERMARK 0
38
39 typedef struct
40 {
41 T_RVF_MB_ID prim_id;
42 T_RVF_ADDR_ID addr_id;
43 T_PWR_CHARGING_STATE charging_state;
44 UINT16 i2v_madc_offset;
45 UINT16 madc_eoc_current_code;
46 UINT16 max_voltage_code;
47 T_POWER_INFO power_info;
48 T_POWER_ALERT power_alert;
49 T_RV_RETURN power_emergency;
50 T_PWR_TIMER0_STATE timer0_state;
51 T_PWR_BATTERY_TYPE bat_type;
52 INT16 bat_celsius_temp; /* temperature in Celsius degrees */
53 } T_PWR_ENV_CTRL_BLK;
54
55
56 extern T_PWR_ENV_CTRL_BLK *pwr_env_ctrl_blk;
57
58
59 /* Prototypes */
60
61 T_RVM_RETURN pwr_get_info (T_RVM_INFO_SWE *infoSWE);
62
63 T_RVM_RETURN pwr_set_info( T_RVF_ADDR_ID addr_id,
64 T_RV_RETURN return_path[],
65 T_RVF_MB_ID mbId[],
66 T_RVM_RETURN (*callBackFct) (T_RVM_NAME SWEntName,
67 T_RVM_RETURN errorCause,
68 T_RVM_ERROR_TYPE errorType,
69 T_RVM_STRING errorMsg));
70
71 T_RVM_RETURN pwr_init (void);
72 T_RVM_RETURN pwr_start (void);
73 T_RVM_RETURN pwr_stop (void);
74 T_RVM_RETURN pwr_kill (void);
75
76
77 #endif /* __PWR_ENV_H__ */