Exemple #1
0
void _get_current_handler(int argc, char **argv)
{
    (void) argc;
    (void) argv;

    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());
}
Exemple #2
0
int main(void)
{
    ltc4150_start();

    hwtimer_tick_id = hwtimer_set(tick_ticks,
                                  test_ltc_tick,
                                  (void *) thread_pid);

    while (1) {
        thread_sleep();
        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());
    }

    return 0;
}
Exemple #3
0
void _get_current_handler(char* unused) {
	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());
}