08-26-2019 09:22 PM
Hello, I am rying to use the BHy1_driver_and_MCU_solution. I have followed the porting instructions and after I call bhy_driver_init() I get my error message. I tried printing the error code and -18 printed out. The thing is I don't see a #define statement in bhy.h defining -18.
s8 bhy_err =0;
bhy_err = bhy_driver_init(bhy_firmware_image);
if(bhy_err!= BHY_SUCCESS)
{
printk("Fail to init bhy %d \n",bhy_err);
}
else{
printk("initialized,waiting for interupt...\n");
}
do{
(void)gpio_pin_read(bhi_int_pin,21,&p);
}while(p);
do{
(void)gpio_pin_read(bhi_int_pin,21,&p);
}while(!p);
printk("entering while loop \n");
What is also weird, is that the interupt pin also fires and the statement "entering while loop prints in my terminal".
I believe I have implemented the I2C functions correctly, returning 0 for succes and a negative value in case of failure.
Does anyone have any insight?
08-27-2019 05:23 PM