/* Function to read a register of the video A/D converter ADV7180. */
int32_t max7310_reg_write(uint8_t reg_addr, uint8_t data)
/* Function to read a register of the video A/D converter ADV7180. */
int32_t max7310_reg_write(uint8_t reg_addr, uint8_t data)
{
    max7310_i2c_req->reg_addr = reg_addr;
    max7310_i2c_req->buffer = &data;
    return i2c_write(max7310_i2c_req);
}