Skip to content

Commit

Permalink
Update i2c.c
Browse files Browse the repository at this point in the history
  • Loading branch information
atc1441 authored Jul 2, 2022
1 parent 982ea26 commit 5d91e9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ATC_Thermometer/i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RAM bool i2c_sending;

void init_i2c(){
i2c_gpio_set(I2C_GPIO_GROUP_C2C3);
i2c_master_init(0x78, (uint8_t)(CLOCK_SYS_CLOCK_HZ/(4*400000)) );
i2c_master_init(0x78, (uint8_t)(CLOCK_SYS_CLOCK_HZ/(4*750000)) );
}

void send_i2c(uint8_t device_id, uint8_t *buffer, int dataLen){
Expand All @@ -28,4 +28,4 @@ uint8_t test_i2c_device(uint8_t address){
while(reg_i2c_status & FLD_I2C_CMD_BUSY );

return (reg_i2c_status & FLD_I2C_NAK)?0:1;
}
}

0 comments on commit 5d91e9f

Please sign in to comment.