OpenBIC
OpenSource Bridge-IC
max11617.c File Reference
#include <stdio.h>
#include <string.h>
#include "sensor.h"
#include "hal_i2c.h"
#include "pmbus.h"
#include <logging/log.h>
Include dependency graph for max11617.c:

Macros

#define MAX1363_CHANNEL_SEL_MASK   0x1E
 
#define MAX1363_CHANNEL_SEL(a)   ((a) << 1)
 
#define MAX1363_CONFIG_SCAN_SINGLE_1   0x60
 
#define MAX1363_CONFIG_SE   0x01
 
#define MAX1363_SCAN_MASK   0x60
 
#define MAX1363_SE_DE_MASK   0x01
 
#define MAX11617_VREF   2.048
 

Functions

 LOG_MODULE_REGISTER (max11617)
 
uint8_t max11617_read (sensor_cfg *cfg, int *reading)
 
uint8_t max11617_init (sensor_cfg *cfg)
 

Macro Definition Documentation

◆ MAX11617_VREF

#define MAX11617_VREF   2.048

◆ MAX1363_CHANNEL_SEL

#define MAX1363_CHANNEL_SEL (   a)    ((a) << 1)

◆ MAX1363_CHANNEL_SEL_MASK

#define MAX1363_CHANNEL_SEL_MASK   0x1E

◆ MAX1363_CONFIG_SCAN_SINGLE_1

#define MAX1363_CONFIG_SCAN_SINGLE_1   0x60

◆ MAX1363_CONFIG_SE

#define MAX1363_CONFIG_SE   0x01

◆ MAX1363_SCAN_MASK

#define MAX1363_SCAN_MASK   0x60

◆ MAX1363_SE_DE_MASK

#define MAX1363_SE_DE_MASK   0x01

Function Documentation

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( max11617  )

◆ max11617_init()

uint8_t max11617_init ( sensor_cfg cfg)

◆ max11617_read()

uint8_t max11617_read ( sensor_cfg cfg,
int *  reading 
)