btnut/btnode/include/hardware/btn-bat.h File Reference


Detailed Description

Functions for battery measurement.

Date:
15.11.2004
Author:
Mustafa Yuecel <mustafa.yuecel@alumni.ethz.ch>

Matthias Ringwald <mringwal@inf.ethz.ch>

The ADC is now automatically initialised, there is no need to do this manually anymore. The corresponding changes to the nut source code to ADCInit() have been made.

Attention:
Don't use another function which use the adc.h at the same time

#include <sys/types.h>

Functions

int btn_bat_measure (int n)
u_char btn_external_power (void)


Function Documentation

int btn_bat_measure ( int  n  ) 

this function returns the battery voltage in mV.

Parameters:
n # of adc readings (between 10 and 100)
Returns:
average voltage in mV
Examples:
bt-remoteprog/demo-rprog.c.

u_char btn_external_power ( void   ) 

this function checks if you have external (unlimited) power.

Returns:
1 if external power, else 0
Examples:
bt-remoteprog/demo-rprog.c.


Generated on Wed Apr 29 11:12:29 2009 for BTnut System Software by doxygen 1.5.1
!!! Dieses Dokument stammt aus dem ETH Web-Archiv und wird nicht mehr gepflegt !!!
!!! This document is stored in the ETH Web archive and is no longer maintained !!!