

void axis_init(){
    uint8_t data[] = {
        0x1F,0x01,
        0x23,0x90,
        0x2E,0x9F,
        0x24,0xC0,
        0x22,0x01,
        0x30,0x2A,
        0x32,0x0A,
        0x33,0x03,
        0x25,0x00,                                 
        0x20,0x57,
        0x57,0x04        

    };
    
    for(int i=0;i<sizeof(data);i+=2){
        i2c_master_write_slave(0x19,&data[i],2);
    }
}

void getxyz(){
    uint16_t x_data=0,y_data=0,z_data=0;
    int16_t x,y,z;
    uint8_t data_xyz[] = {0};
    uint8_t data_sta;
    uint8_t x1;
    i2c_master_read_slave(0x19,0x61,&data_sta,1);
    i2c_master_read_slave(0x19,0x62,&x1,1);
    i2c_master_read_slave(0x19,0x69,data_xyz,6);
    printf("1.%x %x\n",data_sta,data_xyz[0]);
    printf("2.%x %x\n",x1,data_xyz[1]);
}