mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Enable (and fix) battery_bench on hosted targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31471 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
05f12e0877
commit
bba84a9ce2
2 changed files with 9 additions and 2 deletions
|
@ -1,4 +1,7 @@
|
||||||
/* plugins common to all models */
|
/* plugins common to all models */
|
||||||
|
#ifndef SIMULATOR
|
||||||
|
battery_bench.c
|
||||||
|
#endif
|
||||||
chessclock.c
|
chessclock.c
|
||||||
credits.c
|
credits.c
|
||||||
cube.c
|
cube.c
|
||||||
|
@ -116,8 +119,6 @@ iriver_flash.c
|
||||||
rockbox_flash.c
|
rockbox_flash.c
|
||||||
#endif /* CONFIG_CPU */
|
#endif /* CONFIG_CPU */
|
||||||
|
|
||||||
battery_bench.c
|
|
||||||
|
|
||||||
#if defined(IPOD_NANO2G)
|
#if defined(IPOD_NANO2G)
|
||||||
crypt_firmware.c
|
crypt_firmware.c
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -414,7 +414,9 @@ static void thread(void)
|
||||||
bat[buf_idx].flags = charge_state();
|
bat[buf_idx].flags = charge_state();
|
||||||
#endif
|
#endif
|
||||||
buf_idx++;
|
buf_idx++;
|
||||||
|
#if USING_STORAGE_CALLBACK
|
||||||
rb->register_storage_idle_func(flush_buffer);
|
rb->register_storage_idle_func(flush_buffer);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* What to do when the measurement buffer is full:
|
/* What to do when the measurement buffer is full:
|
||||||
|
@ -454,8 +456,12 @@ static void thread(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if USING_STORAGE_CALLBACK
|
||||||
/* unregister flush callback and flush to disk */
|
/* unregister flush callback and flush to disk */
|
||||||
rb->unregister_storage_idle_func(flush_buffer, true);
|
rb->unregister_storage_idle_func(flush_buffer, true);
|
||||||
|
#else
|
||||||
|
flush_buffer(NULL);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* log end of bench and exit reason */
|
/* log end of bench and exit reason */
|
||||||
fd = rb->open(BATTERY_LOG, O_RDWR | O_CREAT | O_APPEND, 0666);
|
fd = rb->open(BATTERY_LOG, O_RDWR | O_CREAT | O_APPEND, 0666);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue