DroneOS/Drivers/Source/drvHMC5883.c
///////////////////////////////////////////////////////////////////////////////
//! Sets HMC5883 device configration byte
//! \param Mode register value
//! \return dosTrue if mode byte were successfully updated
Sets HMC5883 device configration byte
\param Mode register value
\return dosTrue if mode byte were successfully updated
Sets HMC5883 device configration byte \ param Mode register value \ return dosTrue if mode byte were successfully updated
dosBool drvHMC5883SetMode(dosByte in_mode)
{
	dosBool ack = HMC5883_I2C_Start(HMC5883_I2C, drvI2C_WRITE, drvHMC5883_BASE_ADDRESS);
  if( ack )
  {
  	HMC5883_I2C_WriteByte(HMC5883_I2C, drvHMC5883_RA_MODE);
		HMC5883_I2C_WriteByte(HMC5883_I2C, in_mode);
	}      
	HMC5883_I2C_Stop(HMC5883_I2C);
	return ack;
}
dosBool drvHMC5883SetMode ( dosByte in_mode ) { dosBool ack = HMC5883_I2C_Start ( HMC5883_I2C , drvI2C_WRITE , drvHMC5883_BASE_ADDRESS ) ; if ( ack ) { HMC5883_I2C_WriteByte ( HMC5883_I2C , drvHMC5883_RA_MODE ) ; HMC5883_I2C_WriteByte ( HMC5883_I2C , in_mode ) ; } HMC5883_I2C_Stop ( HMC5883_I2C ) ; return ack ; }
Sets HMC5883 device configration byte
\param Mode register value
\return dosTrue if mode byte were successfully updated
Sets HMC5883 device configration byte \ param Mode register value \ return dosTrue if mode byte were successfully updated