mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
Made set_irq_level() an inline function, and optimized it by removing the bit shifts
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4330 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
aa5b23d616
commit
111a972b65
8 changed files with 25 additions and 22 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#include "adc.h"
|
||||
#include "serial.h"
|
||||
#include "power.h"
|
||||
#include "system.h"
|
||||
|
||||
struct event_queue button_queue;
|
||||
|
||||
|
|
@ -256,10 +257,10 @@ static int button_flip(int button)
|
|||
*/
|
||||
void button_set_flip(bool flip)
|
||||
{
|
||||
if (flip != flipped) /* not the curent setting */
|
||||
if (flip != flipped) /* not the current setting */
|
||||
{
|
||||
/* avoid race condition with the button_tick() */
|
||||
int oldlevel = set_irq_level(15);
|
||||
int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
|
||||
lastbtn = button_flip(lastbtn);
|
||||
flipped = flip;
|
||||
set_irq_level(oldlevel);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ bool ide_powered(void)
|
|||
|
||||
void power_off(void)
|
||||
{
|
||||
set_irq_level(15);
|
||||
set_irq_level(HIGHEST_IRQ_LEVEL);
|
||||
#ifdef HAVE_POWEROFF_ON_PBDR
|
||||
and_b(~0x10, &PBDRL);
|
||||
or_b(0x10, &PBIORL);
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ static void screen_dump(void)
|
|||
|
||||
serial_enable_tx();
|
||||
|
||||
level = set_irq_level(15);
|
||||
level = set_irq_level(HIGHEST_IRQ_LEVEL);
|
||||
for(y = 0;y < LCD_HEIGHT/8;y++)
|
||||
{
|
||||
for(x = 0;x < LCD_WIDTH;x++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue