/* Enable One-Shot mode and perform a single temperature measure.  */
uint32_t mcp980x_one_shot_mode(void)
/* Enable One-Shot mode and perform a single temperature measure.  */
uint32_t mcp980x_one_shot_mode(void)
{
	uint8_t uc_config_reg = 0;
	uint32_t ul_retval = mcp980x_get_configuration(&uc_config_reg);
	if (ul_retval != TWI_SUCCESS) {
		return ul_retval;
	}
	if (!(uc_config_reg & MCP980X_CONFIG_SHUTDOWN_ENABLE)) {
		ul_retval = mcp980x_disable();
		if (ul_retval != TWI_SUCCESS) {
			return ul_retval;
		}
		uc_config_reg &= (~MCP980X_CONFIG_SHUTDOWN_ENABLE);
	}
	return mcp980x_set_configuration(MCP980X_CONFIG_ONE_SHOT_ENABLE | uc_config_reg);
}