Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: SDFileSystem app epson mbed msp430 pl tests
pmic-tps65185.h@1:5874c1a074a7, 2018-01-11 (annotated)
- Committer:
- marcbax
- Date:
- Thu Jan 11 14:12:00 2018 +0000
- Revision:
- 1:5874c1a074a7
- Parent:
- 0:c643d398cdb6
Version 180111a with error as reported to Mark Symonds
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| marcbax | 0:c643d398cdb6 | 1 | /* |
| marcbax | 0:c643d398cdb6 | 2 | Plastic Logic EPD project on MSP430 |
| marcbax | 0:c643d398cdb6 | 3 | |
| marcbax | 0:c643d398cdb6 | 4 | Copyright (C) 2013, 2014 Plastic Logic Limited |
| marcbax | 0:c643d398cdb6 | 5 | |
| marcbax | 0:c643d398cdb6 | 6 | This program is free software: you can redistribute it and/or modify |
| marcbax | 0:c643d398cdb6 | 7 | it under the terms of the GNU General Public License as published by |
| marcbax | 0:c643d398cdb6 | 8 | the Free Software Foundation, either version 3 of the License, or |
| marcbax | 0:c643d398cdb6 | 9 | (at your option) any later version. |
| marcbax | 0:c643d398cdb6 | 10 | |
| marcbax | 0:c643d398cdb6 | 11 | This program is distributed in the hope that it will be useful, |
| marcbax | 0:c643d398cdb6 | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| marcbax | 0:c643d398cdb6 | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| marcbax | 0:c643d398cdb6 | 14 | GNU General Public License for more details. |
| marcbax | 0:c643d398cdb6 | 15 | |
| marcbax | 0:c643d398cdb6 | 16 | You should have received a copy of the GNU General Public License |
| marcbax | 0:c643d398cdb6 | 17 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
| marcbax | 0:c643d398cdb6 | 18 | */ |
| marcbax | 0:c643d398cdb6 | 19 | /* |
| marcbax | 0:c643d398cdb6 | 20 | * pmic-tps65185.h -- Driver for TI TPS65185 PMIC |
| marcbax | 0:c643d398cdb6 | 21 | * |
| marcbax | 0:c643d398cdb6 | 22 | * Authors: |
| marcbax | 0:c643d398cdb6 | 23 | * Nick Terry <nick.terry@plasticlogic.com> |
| marcbax | 0:c643d398cdb6 | 24 | * Guillaume Tucker <guillaume.tucker@plasticlogic.com> |
| marcbax | 0:c643d398cdb6 | 25 | * |
| marcbax | 0:c643d398cdb6 | 26 | */ |
| marcbax | 0:c643d398cdb6 | 27 | |
| marcbax | 0:c643d398cdb6 | 28 | #ifndef INCLUDE_PMIC_TPS65185_H |
| marcbax | 0:c643d398cdb6 | 29 | #define INCLUDE_PMIC_TPS65185_H 1 |
| marcbax | 0:c643d398cdb6 | 30 | |
| marcbax | 0:c643d398cdb6 | 31 | #include <stdint.h> |
| marcbax | 0:c643d398cdb6 | 32 | #include "mbed.h" |
| marcbax | 0:c643d398cdb6 | 33 | |
| marcbax | 0:c643d398cdb6 | 34 | struct vcom_cal; |
| marcbax | 0:c643d398cdb6 | 35 | |
| marcbax | 0:c643d398cdb6 | 36 | struct tps65185_info { |
| marcbax | 0:c643d398cdb6 | 37 | I2C *i2c; |
| marcbax | 0:c643d398cdb6 | 38 | uint8_t i2c_addr; |
| marcbax | 0:c643d398cdb6 | 39 | const struct vcom_cal *cal; |
| marcbax | 0:c643d398cdb6 | 40 | }; |
| marcbax | 0:c643d398cdb6 | 41 | |
| marcbax | 0:c643d398cdb6 | 42 | extern void reg_dump(struct tps65185_info *pmic); |
| marcbax | 0:c643d398cdb6 | 43 | |
| marcbax | 0:c643d398cdb6 | 44 | extern int tps65185_init(struct tps65185_info *pmic, I2C &i2c, |
| marcbax | 0:c643d398cdb6 | 45 | uint8_t i2c_addr, const struct vcom_cal *cal); |
| marcbax | 0:c643d398cdb6 | 46 | extern int tps65185_set_vcom_voltage(struct tps65185_info *pmic, int mv); |
| marcbax | 0:c643d398cdb6 | 47 | extern int tps65185_set_vcom_register(struct tps65185_info *pmic, int value); |
| marcbax | 0:c643d398cdb6 | 48 | |
| marcbax | 0:c643d398cdb6 | 49 | extern int tps65185_temperature_measure(struct tps65185_info *pmic, |
| marcbax | 0:c643d398cdb6 | 50 | int16_t *measured); |
| marcbax | 0:c643d398cdb6 | 51 | |
| marcbax | 0:c643d398cdb6 | 52 | #endif /* INCLUDE_PMIC_TPS65185_H */ |