Advertisement
Guest User

Untitled

a guest
Apr 1st, 2011
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 KB | None | 0 0
  1. Index: firmware/target/arm/as3525/sd-as3525v2.c
  2. ===================================================================
  3. --- firmware/target/arm/as3525/sd-as3525v2.c (revision 29666)
  4. +++ firmware/target/arm/as3525/sd-as3525v2.c (working copy)
  5. @@ -432,16 +432,6 @@
  6. /*b23 | CMD_CCS_EXPECTED unused */
  7. /*b31 */ | CMD_DONE_BIT;
  8.  
  9. -#if defined(SANSA_FUZEV2)
  10. - if (amsv2_variant == 0)
  11. - {
  12. - extern int buttonlight_is_on;
  13. - if(buttonlight_is_on)
  14. - _buttonlight_on();
  15. - else
  16. - _buttonlight_off();
  17. - }
  18. -#endif
  19. semaphore_wait(&command_completion_signal, TIMEOUT_BLOCK);
  20.  
  21. /* Handle command responses & errors */
  22. Index: firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c
  23. ===================================================================
  24. --- firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c (revision 29666)
  25. +++ firmware/target/arm/as3525/sansa-fuzev2/backlight-fuzev2.c (working copy)
  26. @@ -26,8 +26,6 @@
  27. #include "ascodec-target.h"
  28. #include "as3514.h"
  29.  
  30. -int buttonlight_is_on = 0;
  31. -
  32. void _backlight_set_brightness(int brightness)
  33. {
  34. ascodec_write_pmu(AS3543_BACKLIGHT, 2, brightness * 10);
  35. @@ -39,8 +37,14 @@
  36. ascodec_write_pmu(AS3543_BACKLIGHT, 2, backlight_brightness * 10);
  37.  
  38. /* needed for button light */
  39. - if (amsv2_variant == 1)
  40. + if (amsv2_variant == 0)
  41. + {
  42. + GPIOB_DIR |= 1<<5;
  43. + }
  44. + else
  45. + {
  46. ascodec_write_pmu(0x1a, 1, 0x30); /* MUX_PWGD = PWM */
  47. + }
  48.  
  49. return true;
  50. }
  51. @@ -65,9 +69,7 @@
  52. {
  53. if (amsv2_variant == 0)
  54. {
  55. - GPIOB_DIR |= 1<<5;
  56. GPIOB_PIN(5) = (1<<5);
  57. - buttonlight_is_on = 1;
  58. }
  59. else
  60. {
  61. @@ -80,8 +82,6 @@
  62. if (amsv2_variant == 0)
  63. {
  64. GPIOB_PIN(5) = 0;
  65. - GPIOB_DIR &= ~(1<<5);
  66. - buttonlight_is_on = 0;
  67. }
  68. else
  69. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement