예제 #1
0
파일: sc_ltc4150.c 프로젝트: 4120976/RIOT
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());
}
예제 #2
0
파일: main.c 프로젝트: SilkeRieger/projects
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;
}
예제 #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());
}