BSP430  20141115
Board Support Package for MSP430 microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Macros
utility.h File Reference

Miscellaneous constants, macros, functions useful for sensor applications. More...

#include <bsp430/core.h>

Go to the source code of this file.

Macros

#define BSP430_SENSORS_CONVERT_dK_TO_dC(dk_)   ((dk_) - 2732)
 
#define BSP430_SENSORS_CONVERT_dC_TO_dK(dc_)   ((dc_) + 2732)
 
#define BSP430_SENSORS_CONVERT_dK_TO_dFahr(dk_)   (320 + (9 * ((dk_) - 2732)) / 5)
 
#define BSP430_SENSORS_CONVERT_cK_TO_cFahr(ck_)   (3200 + (9 * ((ck_) - 27315)) / 5)
 
#define BSP430_SENSORS_CONVERT_dC_TO_dFahr(dc_)   BSP430_SENSORS_CONVERT_dK_TO_dFahr(BSP430_SENSORS_CONVERT_dC_TO_dK(dc_))
 
#define BSP430_SENSORS_CONVERT_Pa_TO_cinHg(pa_)   ((int)(((pa_) * 100L) / 3386))
 

Detailed Description

Miscellaneous constants, macros, functions useful for sensor applications.

Homepage
http://github.com/pabigot/bsp430

Macro Definition Documentation

#define BSP430_SENSORS_CONVERT_cK_TO_cFahr (   ck_)    (3200 + (9 * ((ck_) - 27315)) / 5)

Convert a temperature, expressed in cK (hundredths of one degree Kelvin) into d[Fahr] (hundredths of one degree Fahrenheit).

#define BSP430_SENSORS_CONVERT_dC_TO_dFahr (   dc_)    BSP430_SENSORS_CONVERT_dK_TO_dFahr(BSP430_SENSORS_CONVERT_dC_TO_dK(dc_))

Convert a temperature, expressed in dC (tenths of one degree Celcius) into d[Fahr] (tenths of one degree Fahrenheit).

#define BSP430_SENSORS_CONVERT_dC_TO_dK (   dc_)    ((dc_) + 2732)

Convert a temperature, expressed in dC (tenths of one degree Celcius) into dK (tenths of one degree Kelvin).

#define BSP430_SENSORS_CONVERT_dK_TO_dC (   dk_)    ((dk_) - 2732)

Convert a temperature, expressed in dK (tenths of one degree Kelvin) into dC (tenths of one degree Celcius).

#define BSP430_SENSORS_CONVERT_dK_TO_dFahr (   dk_)    (320 + (9 * ((dk_) - 2732)) / 5)

Convert a temperature, expressed in dK (tenths of one degree Kelvin) into d[Fahr] (tenths of one degree Fahrenheit).

#define BSP430_SENSORS_CONVERT_Pa_TO_cinHg (   pa_)    ((int)(((pa_) * 100L) / 3386))

Convert a pressure, expressed in Pa (Pascals) into cinHg (hundredths of inches of mercury).