mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 13:45:10 -05:00
Use TIMER_FREQ for timers in plugins. Fixes timer speed on iPod.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9427 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
139acd9c57
commit
1be25a4d71
4 changed files with 10 additions and 7 deletions
|
|
@ -219,8 +219,8 @@ void timer_init(unsigned hz, unsigned to)
|
||||||
{
|
{
|
||||||
rb->memset(&gTimer, 0, sizeof(gTimer));
|
rb->memset(&gTimer, 0, sizeof(gTimer));
|
||||||
|
|
||||||
gTimer.transmit = FREQ / hz; /* time for bit transitions */
|
gTimer.transmit = TIMER_FREQ / hz; /* time for bit transitions */
|
||||||
gTimer.timeout = FREQ / to; /* time for receive timeout */
|
gTimer.timeout = TIMER_FREQ / to; /* time for receive timeout */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,10 @@
|
||||||
// GNU General Public License for more details.
|
// GNU General Public License for more details.
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
// Revision 1.2 2006/04/02 01:52:44 kkurbjun
|
// Revision 1.3 2006/04/02 12:45:29 amiconn
|
||||||
|
// Use TIMER_FREQ for timers in plugins. Fixes timer speed on iPod.
|
||||||
|
//
|
||||||
|
// Revision 1.2 2006-04-02 01:52:44 kkurbjun
|
||||||
// Update adds prboom's high resolution support, also makes the scaling for platforms w/ resolution less then 320x200 much nicer. IDoom's lookup table code has been removed. Also fixed a pallete bug. Some graphic errors are present in menu and status bar. Also updates some headers and output formatting.
|
// Update adds prboom's high resolution support, also makes the scaling for platforms w/ resolution less then 320x200 much nicer. IDoom's lookup table code has been removed. Also fixed a pallete bug. Some graphic errors are present in menu and status bar. Also updates some headers and output formatting.
|
||||||
//
|
//
|
||||||
// Revision 1.1 2006-03-28 15:44:01 dave
|
// Revision 1.1 2006-03-28 15:44:01 dave
|
||||||
|
|
@ -84,7 +87,7 @@ int I_GetTime (void)
|
||||||
void I_Init (void)
|
void I_Init (void)
|
||||||
{
|
{
|
||||||
#if (CONFIG_CPU != PP5020) && !defined(SIMULATOR)
|
#if (CONFIG_CPU != PP5020) && !defined(SIMULATOR)
|
||||||
rb->timer_register(1, NULL, CPU_FREQ/TICRATE, 1, doomtime);
|
rb->timer_register(1, NULL, TIMER_FREQ/TICRATE, 1, doomtime);
|
||||||
#endif
|
#endif
|
||||||
I_InitSound();
|
I_InitSound();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -278,9 +278,9 @@ void gray_show(bool enable)
|
||||||
gray_update();
|
gray_update();
|
||||||
#else /* !SIMULATOR */
|
#else /* !SIMULATOR */
|
||||||
#if CONFIG_LCD == LCD_SSD1815
|
#if CONFIG_LCD == LCD_SSD1815
|
||||||
_gray_rb->timer_register(1, NULL, CPU_FREQ / 67, 1, _timer_isr);
|
_gray_rb->timer_register(1, NULL, TIMER_FREQ / 67, 1, _timer_isr);
|
||||||
#elif CONFIG_LCD == LCD_S1D15E06
|
#elif CONFIG_LCD == LCD_S1D15E06
|
||||||
_gray_rb->timer_register(1, NULL, CPU_FREQ / 70, 1, _timer_isr);
|
_gray_rb->timer_register(1, NULL, TIMER_FREQ / 70, 1, _timer_isr);
|
||||||
#elif CONFIG_LCD == LCD_IFP7XX
|
#elif CONFIG_LCD == LCD_IFP7XX
|
||||||
/* TODO: implement for iFP */
|
/* TODO: implement for iFP */
|
||||||
(void)_timer_isr;
|
(void)_timer_isr;
|
||||||
|
|
|
||||||
|
|
@ -923,7 +923,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter){
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
calc_period();
|
calc_period();
|
||||||
rb->timer_register(1, NULL, CPU_FREQ/1024, 1, timer_callback);
|
rb->timer_register(1, NULL, TIMER_FREQ/1024, 1, timer_callback);
|
||||||
draw_display();
|
draw_display();
|
||||||
|
|
||||||
/* main loop */
|
/* main loop */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue