Minor coding style and consistency fixes
This commit is contained in:
@@ -1,23 +1,27 @@
|
||||
#ifndef MAD_CORE_BUS_I2C_H
|
||||
#define MAD_CORE_BUS_I2C_H
|
||||
|
||||
// Sensors
|
||||
#define AHT01 0x0 // Upper Sensor TWI Channel
|
||||
#define AHT02 0x1 // Middle Sensor TWI Channel
|
||||
#define AHT03 0x2 // Lower Sensor TWI Channel
|
||||
#include "common/types.h"
|
||||
|
||||
int I2C_Init(void);
|
||||
int I2C_Start(unsigned char addr, unsigned char mode);
|
||||
int I2C_SetChannel(int channel);
|
||||
int I2C_Write(unsigned char data);
|
||||
unsigned char I2C_Read_ACK(void);
|
||||
unsigned char I2C_Read_NACK(void);
|
||||
int I2C_Wait_ACK(void);
|
||||
int I2C_Stop(void);
|
||||
// I2C multiplexer channels
|
||||
#define AHT01 0x0 // Upper
|
||||
#define AHT02 0x1 // Middle
|
||||
#define AHT03 0x2 // Lower
|
||||
|
||||
int I2C_AHT20_Init(void);
|
||||
int I2C_AHT20_Read(float *temp, float *rhum);
|
||||
int I2C_Init(void);
|
||||
int I2C_Start(byte addr, byte mode);
|
||||
int I2C_SetChannel(int channel);
|
||||
int I2C_Write(byte data);
|
||||
byte I2C_Read_ACK(void);
|
||||
byte I2C_Read_NACK(void);
|
||||
int I2C_Wait_ACK(void);
|
||||
int I2C_Stop(void);
|
||||
|
||||
unsigned short I2C_ADS1115_Read(int channel);
|
||||
// AHT20 temperature and humidity sensor
|
||||
int I2C_AHT20_Init(void);
|
||||
int I2C_AHT20_Read(float *temp, float *rhum);
|
||||
|
||||
// ADS1115 analog to digital converter
|
||||
word I2C_ADS1115_Read(int channel);
|
||||
|
||||
#endif // MAD_CORE_BUS_I2C_H
|
||||
|
||||
Reference in New Issue
Block a user