/******************************************************************************* * Function Name: CySetTemp ******************************************************************************** * * Summary: * This is a wraparound for CySetTempInt(). It is used to return second * successful read of temperature value. * * Parameters: * None * * Return: * status: * CYRET_SUCCESS if successful. * CYRET_LOCKED if Flash writing already in use * CYRET_UNKNOWN if there was an SPC error. * * uint8 dieTemperature[2]: * Holds die temperature for the flash writting algorithm. The first byte is * the sign of the temperature (0 = negative, 1 = positive). The second byte is * the magnitude. * *******************************************************************************/ cystatus CySetTemp(void) { cystatus status = CySetTempInt(); if(status == CYRET_SUCCESS) { status = CySetTempInt(); } return (status); }
/******************************************************************************* * Function Name: CySetTemp ******************************************************************************** * * Summary: * This is a wraparound for CySetTempInt(). It is used to return the second * successful read of the temperature value. * * Parameters: * None * * Return: * status: * CYRET_SUCCESS if successful. * CYRET_LOCKED if Flash writing already in use * CYRET_UNKNOWN if there was an SPC error. * * uint8 dieTemperature[2]: * Holds the die temperature for the flash writing algorithm. The first byte is * the sign of the temperature (0 = negative, 1 = positive). The second byte is * the magnitude. * *******************************************************************************/ cystatus CySetTemp(void) { cystatus status = CyFlashGetSpcAlgorithm(); if(status == CYRET_SUCCESS) { status = CySetTempInt(); } return (status); }