OpenBIC
OpenSource Bridge-IC
|
#include <stdio.h>
#include <stdlib.h>
#include <logging/log.h>
#include "libutil.h"
#include "sensor.h"
#include "ads1015.h"
Macros | |
#define | MSB_MASK BIT(15) |
#define | CONVERSION_VAL_MASK GENMASK(15, 4) |
#define | DEFAULT_CONFIG_VAL 0x8583 |
#define | VALUE_MSB_MASK GENMASK(15, 8) |
#define | VALUE_LSB_MASK GENMASK(7, 0) |
Functions | |
LOG_MODULE_REGISTER (dev_ads1015) | |
uint8_t | ads1015_read (sensor_cfg *cfg, int *reading) |
uint8_t | ads1015_init (sensor_cfg *cfg) |
#define CONVERSION_VAL_MASK GENMASK(15, 4) |
#define DEFAULT_CONFIG_VAL 0x8583 |
#define MSB_MASK BIT(15) |
#define VALUE_LSB_MASK GENMASK(7, 0) |
#define VALUE_MSB_MASK GENMASK(15, 8) |
uint8_t ads1015_init | ( | sensor_cfg * | cfg | ) |
uint8_t ads1015_read | ( | sensor_cfg * | cfg, |
int * | reading | ||
) |
LOG_MODULE_REGISTER | ( | dev_ads1015 | ) |