|
PebbleOS
|
#include <stdint.h>#include <pbl/device.h>#include <pbl/drivers/i2c.h>#include <pbl/kernel/mutex.h>#include <pbl/util/misc.h>Data Structures | |
| struct | pbl_npm1300 |
| nPM1300 core. More... | |
Macros | |
| #define | PBL_NPM1300_DEFINE(sym, _bus, _addr) |
| Define the core. | |
Functions | |
| static const struct pbl_npm1300 * | pbl_npm1300_from_cell (const struct pbl_device *cell) |
| Get the core a cell belongs to. | |
| void | pbl_npm1300_lock (const struct pbl_npm1300 *pmic) |
| Lock the registers, around a read-modify-write sequence. | |
| void | pbl_npm1300_unlock (const struct pbl_npm1300 *pmic) |
| Unlock the registers. | |
| int | pbl_npm1300_read (const struct pbl_npm1300 *pmic, uint16_t reg, uint8_t *val) |
| Read a register. | |
| int | pbl_npm1300_write (const struct pbl_npm1300 *pmic, uint16_t reg, uint8_t val) |
| Write a register. | |