change i2c address and add title

This commit is contained in:
Manticore 2025-01-05 17:24:57 +05:30
parent 3e5c36c23f
commit eeba30bda2

View File

@ -1,3 +1,9 @@
/*
Author : Siva prakasam V
Date : 05/01/25
Title : I2C driver for Battery Monitor
*/
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
@ -7,7 +13,7 @@
#include <linux/i2c-dev.h>
#define I2C_BUS "/dev/i2c-1" // I2C bus device
#define I2C_ADDRESS 0x50 // Example I2C device address (7-bit address)
#define I2C_ADDRESS 0x6B // I2C device address
// Function to write a byte to the I2C device
int i2c_write(int file, uint8_t reg, uint8_t value) {