2013-06-22 05:11:53 +02:00
/**
* Shell commands for coulomb counter
*
* Copyright ( C ) 2013 INRIA .
*
2013-11-22 20:47:05 +01:00
* This file is subject to the terms and conditions of the GNU Lesser General
2013-06-22 05:11:53 +02:00
* Public License . See the file LICENSE in the top level directory for more
* details .
*
* @ ingroup shell_commands
* @ {
* @ file sc_ltc4150 . c
* @ brief provides shell commands to access ltc4150
* @ author Oliver Hahm < oliver . hahm @ inria . fr >
* @ }
*/
2010-11-05 23:44:12 +01:00
# include <stdio.h>
# include <ltc4150.h>
2013-06-22 05:11:53 +02:00
void _get_current_handler ( char * unused )
{
2013-08-08 18:34:51 +02:00
( void ) unused ;
2013-06-22 05:11:53 +02:00
printf ( " Power usage: %.4f mA (%.4f mA avg/ %.4f mAh total / %i usec) \n " , ltc4150_get_current_mA ( ) , ltc4150_get_avg_mA ( ) , ltc4150_get_total_mAh ( ) , ltc4150_get_interval ( ) ) ;
2010-11-05 23:44:12 +01:00
}
2013-06-22 05:11:53 +02:00
void _reset_current_handler ( char * unused )
{
2013-08-08 18:34:51 +02:00
( void ) unused ;
2013-06-22 05:11:53 +02:00
ltc4150_start ( ) ;
2010-11-05 23:44:12 +01:00
}