MPU9250.c
BOOL whoami_MPU(){
	uint8_t response;
	byteread_MPU(MPUREG_WHOAMI, &response);
	
	#ifdef DEBUG_PRINT
	char msg[40];
	sprintf(msg, "WHO AM I MPU: %s\r\n", (response == MPU_DEVICE_ID)?"Passed":"Failed");
	UART_OutString(msg);
	#endif
	
	return (BOOL)(response == MPU_DEVICE_ID);
}
/*                                 WHO AM I?
 * usage: call these functions to know if SPI/I2C-Master is working correctly. 
 * It checks the I2C address of the mpu9250 which should be 0x71, 
 * and I2C address of the AK8963 which should be 0x48.
 */
WHO AM I.
usage: call these functions to know if SPI/I2C-Master is working correctly.
It checks the I2C address of the mpu9250 which should be 0x71,
and I2C address of the AK8963 which should be 0x48.
WHO AM I . usage : call these functions to know if SPI / I2C - Master is working correctly . It checks the I2C address of the mpu9250 which should be 0x71 and I2C address of the AK8963 which should be 0x48 .
BOOL whoami_MPU(){
	uint8_t response;
	byteread_MPU(MPUREG_WHOAMI, &response);
	#ifdef DEBUG_PRINT
	char msg[40];
	sprintf(msg, "WHO AM I MPU: %s\r\n", (response == MPU_DEVICE_ID)?"Passed":"Failed");
	UART_OutString(msg);
	#endif
	return (BOOL)(response == MPU_DEVICE_ID);
}
BOOL whoami_MPU ( ) { uint8_t response ; byteread_MPU ( MPUREG_WHOAMI , & response ) ; #ifdef DEBUG_PRINT char msg [ 40 ] ; sprintf ( msg , " \r \n " , ( response == MPU_DEVICE_ID ) ? " " : " " ) ; UART_OutString ( msg ) ; #endif return ( BOOL ) ( response == MPU_DEVICE_ID ) ; }
WHO AM I?
WHO AM I?