diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2008-03-26 01:50:41 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2008-03-26 01:50:41 +0000 |
commit | af395f4db6ad7b83f9d9afefb1c0ceeedd140a45 (patch) | |
tree | b631289b4a3b28d3c65b10d272d50298f377c69f /firmware/target/arm/ipod/backlight-nano_video.c | |
parent | 74d678fdbcbc427c057e7682ba0a0566e49a8b97 (diff) | |
download | rockbox-af395f4db6ad7b83f9d9afefb1c0ceeedd140a45.tar.gz rockbox-af395f4db6ad7b83f9d9afefb1c0ceeedd140a45.zip |
Do core interrupt masking in a less general fashion and save some instructions to decrease size and speed things up a little bit. Small fix to a few places where interrupts would get enabled again where they shouldn't have been (context switching calls when disabled).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16811 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/ipod/backlight-nano_video.c')
-rw-r--r-- | firmware/target/arm/ipod/backlight-nano_video.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/target/arm/ipod/backlight-nano_video.c b/firmware/target/arm/ipod/backlight-nano_video.c index 6d77e2bd03..647bab9ac6 100644 --- a/firmware/target/arm/ipod/backlight-nano_video.c +++ b/firmware/target/arm/ipod/backlight-nano_video.c | |||
@@ -43,11 +43,11 @@ void _backlight_set_brightness(int val) | |||
43 | { | 43 | { |
44 | do | 44 | do |
45 | { | 45 | { |
46 | oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL); | 46 | oldlevel = disable_irq_save(); |
47 | GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_VAL, 0x80); | 47 | GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_VAL, 0x80); |
48 | udelay(10); | 48 | udelay(10); |
49 | GPIO_SET_BITWISE(GPIOD_OUTPUT_VAL, 0x80); | 49 | GPIO_SET_BITWISE(GPIOD_OUTPUT_VAL, 0x80); |
50 | set_irq_level(oldlevel); | 50 | restore_irq(oldlevel); |
51 | udelay(10); | 51 | udelay(10); |
52 | } | 52 | } |
53 | while (++current_dim < val); | 53 | while (++current_dim < val); |
@@ -56,11 +56,11 @@ void _backlight_set_brightness(int val) | |||
56 | { | 56 | { |
57 | do | 57 | do |
58 | { | 58 | { |
59 | oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL); | 59 | oldlevel = disable_irq_save(); |
60 | GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_VAL, 0x80); | 60 | GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_VAL, 0x80); |
61 | udelay(200); | 61 | udelay(200); |
62 | GPIO_SET_BITWISE(GPIOD_OUTPUT_VAL, 0x80); | 62 | GPIO_SET_BITWISE(GPIOD_OUTPUT_VAL, 0x80); |
63 | set_irq_level(oldlevel); | 63 | restore_irq(oldlevel); |
64 | udelay(10); | 64 | udelay(10); |
65 | } | 65 | } |
66 | while (--current_dim > val); | 66 | while (--current_dim > val); |