/* Function to read a register of the MAX7310. */
uint8_t max7310_reg_read(uint8_t reg_addr)
/* Function to read a register of the MAX7310. */
uint8_t max7310_reg_read(uint8_t reg_addr)
{
    uint8_t buf;
    max7310_i2c_req->reg_addr = reg_addr;
    max7310_i2c_req->buffer = &buf;
    i2c_read(max7310_i2c_req);
    return buf;
}