Skip to content

Commit

Permalink
commented out reading of all registers
Browse files Browse the repository at this point in the history
  • Loading branch information
Crinst committed Dec 23, 2024
1 parent 815e1c8 commit 351a91e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/pcf2131/pcf2131.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,16 @@ esp_err_t pcf2131_init_default_config(i2c_dev_t *dev){
CHECK_ARG(dev);

uint8_t reg_data[1];
uint8_t read_data[16];

// control register 1 = general config
I2C_DEV_TAKE_MUTEX(dev);

// read all registers
/*
I2C_DEV_CHECK(dev, i2c_dev_read_reg(dev, REG_CTRL_STATUS1, read_data, 4));
for (uint8_t i=0; i < 15; i++)
printf("Read reg. data i: %d -- %d", i, read_data[i]);
*/
//I2C_DEV_CHECK(dev, i2c_dev_read_reg(dev, REG_CTRL_STATUS1, reg_data, 1));
reg_data[0] = 0x0; // TC_DIS 0, POR_OVRD 0, === normal run
I2C_DEV_CHECK(dev, i2c_dev_write_reg(dev, REG_CTRL_STATUS1, reg_data, 1));
Expand Down

0 comments on commit 351a91e

Please sign in to comment.