Figure 8 Code Example For Usage Of Meas_Supply_Voltage() - Infineon SP37 Function Manual

High integrated single-chip tpms sensor with a low power embedded microcontroller and wireless fsk/ask uhf transmitter
Table of Contents

Advertisement

2.8.8
Code Example
// Library function prototypes
#include "SP37_ROMLibrary.h"
void main()
{
// Return value of battery voltage measurement is stored in StatusByte
unsigned char StatusByte;
// struct for battery voltage measurement results
struct{
signed int Voltage;
signed int Raw_voltage;
}
idata Volt_Result;
// Battery voltage measurement function call
StatusByte = Meas_Supply_Voltage(&Volt_Result.Voltage);
if(!StatusByte){
// Battery voltage measurement was successful
}
else{
// Battery voltage measurement was not successful, underflow or
// overflow of ADC result occurred
}
}
Figure 8
Code example for usage of Meas_Supply_Voltage()
ROM Library Function Guide
Tire Pressure Monitoring Sensor
61
SP37
ROM Library Functions
Revision 1.0, 2011-12-15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents