Marc Bax / Mbed 2 deprecated Flexbook180111a

Dependencies:   SDFileSystem app epson mbed msp430 pl tests

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pmic-tps65185.h Source File

pmic-tps65185.h

00001 /*
00002   Plastic Logic EPD project on MSP430
00003 
00004   Copyright (C) 2013, 2014 Plastic Logic Limited
00005 
00006   This program is free software: you can redistribute it and/or modify
00007   it under the terms of the GNU General Public License as published by
00008   the Free Software Foundation, either version 3 of the License, or
00009   (at your option) any later version.
00010 
00011   This program is distributed in the hope that it will be useful,
00012   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014   GNU General Public License for more details.
00015 
00016   You should have received a copy of the GNU General Public License
00017   along with this program.  If not, see <http://www.gnu.org/licenses/>.
00018 */
00019 /*
00020  * pmic-tps65185.h -- Driver for TI TPS65185 PMIC
00021  *
00022  * Authors:
00023  *  Nick Terry <nick.terry@plasticlogic.com>
00024  *  Guillaume Tucker <guillaume.tucker@plasticlogic.com>
00025  *
00026  */
00027 
00028 #ifndef INCLUDE_PMIC_TPS65185_H
00029 #define INCLUDE_PMIC_TPS65185_H 1
00030 
00031 #include <stdint.h>
00032 #include "mbed.h"
00033 
00034 struct vcom_cal;
00035 
00036 struct tps65185_info {
00037     I2C *i2c;
00038     uint8_t i2c_addr;
00039     const struct vcom_cal *cal;
00040 };
00041 
00042 extern void reg_dump(struct tps65185_info *pmic);
00043 
00044 extern int tps65185_init(struct tps65185_info *pmic, I2C &i2c,
00045              uint8_t i2c_addr, const struct vcom_cal *cal);
00046 extern int tps65185_set_vcom_voltage(struct tps65185_info *pmic, int mv);
00047 extern int tps65185_set_vcom_register(struct tps65185_info *pmic, int value);
00048 
00049 extern int tps65185_temperature_measure(struct tps65185_info *pmic,
00050                     int16_t *measured);
00051 
00052 #endif /* INCLUDE_PMIC_TPS65185_H */