blob: c01e602397c762681f9ac6e84a457cca33705823 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/* Copyright 2021 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef __CROS_EC_PWR_DEFS_H
#define __CROS_EC_PWR_DEFS_H
#include "system.h"
struct pwr_con_t {
uint16_t volts;
uint16_t milli_amps;
};
/*
* Return power (in milliwatts) corresponding to input power connection
* struct entry.
*/
inline int pwr_con_to_milliwatts(struct pwr_con_t *pwr)
{
return (pwr->volts * pwr->milli_amps);
}
#endif
|