<commit_before>#ifndef _JETSON_I2C_H
#define _JETSON_I2C_H

#include "../Common/inc/jetsonStatus.h"
#include "../Common/inc/jetsonConstants.h"

#define I2C_DIR "/dev/i2c-"
#define DEFAULT_I2C_BUS I2C_1

typedef unsigned char I2CDevAddr;

typedef enum
{
    I2C_0 = 0,  // Pin 3  I2C_GP_DAT
    I2C_1       // Pin 27 I2C_GP1_DAT
} TX2_I2C_BUS;

// Need device register values to read/write

Status i2c_open (TxU8 addr, TX2_I2C_BUS bus, TxS32 *fd);
Status i2c_close (TxS32 *fd);
Status i2c_smbus_write_word (TxU8 reg, TxU32 writeVal, TxS32 fd);
Status i2c_smbus_read_word (TxU8 reg, TxS32 fd, TxU32 *result);
Status i2c_write_word (TxU8 reg, TxU32 writeVal, TxS32 fd);
Status i2c_read_word (TxU8 reg, TxS32 fd, TxU32 *result);
#endif<commit_msg>- Re-wrote comment to describe device register definition in jetsonI2C.h<commit_after>#ifndef _JETSON_I2C_H
#define _JETSON_I2C_H

#include "../Common/inc/jetsonStatus.h"
#include "../Common/inc/jetsonConstants.h"

#define I2C_DIR "/dev/i2c-"
#define DEFAULT_I2C_BUS I2C_1

typedef unsigned char I2CDevAddr;

typedef enum
{
    I2C_0 = 0,  // Pin 3  I2C_GP_DAT
    I2C_1       // Pin 27 I2C_GP1_DAT
} TX2_I2C_BUS;

/*
 * Need device reister values in order to read/write using i2c
 * Define here
 */

Status i2c_open (TxU8 addr, TX2_I2C_BUS bus, TxS32 *fd);
Status i2c_close (TxS32 *fd);
Status i2c_smbus_write_word (TxU8 reg, TxU32 writeVal, TxS32 fd);
Status i2c_smbus_read_word (TxU8 reg, TxS32 fd, TxU32 *result);
Status i2c_write_word (TxU8 reg, TxU32 writeVal, TxS32 fd);
Status i2c_read_word (TxU8 reg, TxS32 fd, TxU32 *result);

#endif
{'fraction_non_alphanumeric': 0.10025220680958385, 'fraction_numerical': 0.06935687263556116, 'mean_word_length': 4.548951048951049, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4390759', 'n_tokens_mistral': 755, 'n_tokens_neox': 714, 'n_words': 176}