author | kergoth <kergoth> | 2002-09-27 23:35:30 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-09-27 23:35:30 (UTC) |
commit | 996c0d02d16c185acc3190baa5b4a1fc934e730c (patch) (unidiff) | |
tree | 837e0d9f0fef522964d28e3e841686d63521dadd | |
parent | d7bcdda1857ff31830705921d8248200d881cf93 (diff) | |
download | opie-996c0d02d16c185acc3190baa5b4a1fc934e730c.zip opie-996c0d02d16c185acc3190baa5b4a1fc934e730c.tar.gz opie-996c0d02d16c185acc3190baa5b4a1fc934e730c.tar.bz2 |
Check for /etc/oz_version.. tired of seeing OpenZaurus v0.0 in opie-login.
-rw-r--r-- | libopie/odevice.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 9871e80..3bc1e0c 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -424,262 +424,270 @@ void ODeviceIPAQ::alarmSound ( ) | |||
424 | qApp-> processEvents ( ); | 424 | qApp-> processEvents ( ); |
425 | 425 | ||
426 | if ( fd >= 0 ) { | 426 | if ( fd >= 0 ) { |
427 | if ( vol_reset ) | 427 | if ( vol_reset ) |
428 | ::ioctl ( fd, MIXER_WRITE( 0 ), &vol ); | 428 | ::ioctl ( fd, MIXER_WRITE( 0 ), &vol ); |
429 | ::close ( fd ); | 429 | ::close ( fd ); |
430 | } | 430 | } |
431 | #endif | 431 | #endif |
432 | #endif | 432 | #endif |
433 | } | 433 | } |
434 | 434 | ||
435 | uint ODeviceIPAQ::hasLeds ( ) const | 435 | uint ODeviceIPAQ::hasLeds ( ) const |
436 | { | 436 | { |
437 | return 1; | 437 | return 1; |
438 | } | 438 | } |
439 | 439 | ||
440 | OLedState ODeviceIPAQ::led ( uint which ) const | 440 | OLedState ODeviceIPAQ::led ( uint which ) const |
441 | { | 441 | { |
442 | if ( which == 0 ) | 442 | if ( which == 0 ) |
443 | return d-> m_leds [0]; | 443 | return d-> m_leds [0]; |
444 | else | 444 | else |
445 | return OLED_Off; | 445 | return OLED_Off; |
446 | } | 446 | } |
447 | 447 | ||
448 | bool ODeviceIPAQ::setLed ( uint which, OLedState st ) | 448 | bool ODeviceIPAQ::setLed ( uint which, OLedState st ) |
449 | { | 449 | { |
450 | static int fd = ::open ( "/dev/touchscreen/0", O_RDWR|O_NONBLOCK ); | 450 | static int fd = ::open ( "/dev/touchscreen/0", O_RDWR|O_NONBLOCK ); |
451 | 451 | ||
452 | if ( which == 0 ) { | 452 | if ( which == 0 ) { |
453 | if ( fd >= 0 ) { | 453 | if ( fd >= 0 ) { |
454 | LED_IN leds; | 454 | LED_IN leds; |
455 | ::memset ( &leds, 0, sizeof( leds )); | 455 | ::memset ( &leds, 0, sizeof( leds )); |
456 | leds. TotalTime = 0; | 456 | leds. TotalTime = 0; |
457 | leds. OnTime = 0; | 457 | leds. OnTime = 0; |
458 | leds. OffTime = 1; | 458 | leds. OffTime = 1; |
459 | leds. OffOnBlink = 2; | 459 | leds. OffOnBlink = 2; |
460 | 460 | ||
461 | switch ( st ) { | 461 | switch ( st ) { |
462 | case OLED_Off : leds. OffOnBlink = 0; break; | 462 | case OLED_Off : leds. OffOnBlink = 0; break; |
463 | case OLED_On : leds. OffOnBlink = 1; break; | 463 | case OLED_On : leds. OffOnBlink = 1; break; |
464 | case OLED_BlinkSlow: leds. OnTime = 10; leds. OffTime = 10; break; | 464 | case OLED_BlinkSlow: leds. OnTime = 10; leds. OffTime = 10; break; |
465 | case OLED_BlinkFast: leds. OnTime = 5; leds. OffTime = 5; break; | 465 | case OLED_BlinkFast: leds. OnTime = 5; leds. OffTime = 5; break; |
466 | } | 466 | } |
467 | 467 | ||
468 | if ( ::ioctl ( fd, LED_ON, &leds ) >= 0 ) { | 468 | if ( ::ioctl ( fd, LED_ON, &leds ) >= 0 ) { |
469 | d-> m_leds [0] = st; | 469 | d-> m_leds [0] = st; |
470 | return true; | 470 | return true; |
471 | } | 471 | } |
472 | } | 472 | } |
473 | } | 473 | } |
474 | return false; | 474 | return false; |
475 | } | 475 | } |
476 | 476 | ||
477 | bool ODeviceIPAQ::setPowerButtonHandler ( ODevice::PowerButtonHandler p ) | 477 | bool ODeviceIPAQ::setPowerButtonHandler ( ODevice::PowerButtonHandler p ) |
478 | { | 478 | { |
479 | bool res = false; | 479 | bool res = false; |
480 | int fd; | 480 | int fd; |
481 | 481 | ||
482 | if (( fd = ::open ( "/proc/sys/ts/suspend_button_mode", O_WRONLY )) >= 0 ) { | 482 | if (( fd = ::open ( "/proc/sys/ts/suspend_button_mode", O_WRONLY )) >= 0 ) { |
483 | if ( ::write ( fd, p == KERNEL ? "0" : "1", 1 ) == 1 ) | 483 | if ( ::write ( fd, p == KERNEL ? "0" : "1", 1 ) == 1 ) |
484 | res = true; | 484 | res = true; |
485 | else | 485 | else |
486 | ::perror ( "write to /proc/sys/ts/suspend_button_mode" ); | 486 | ::perror ( "write to /proc/sys/ts/suspend_button_mode" ); |
487 | 487 | ||
488 | ::close ( fd ); | 488 | ::close ( fd ); |
489 | } | 489 | } |
490 | else | 490 | else |
491 | ::perror ( "/proc/sys/ts/suspend_button_mode" ); | 491 | ::perror ( "/proc/sys/ts/suspend_button_mode" ); |
492 | 492 | ||
493 | return res; | 493 | return res; |
494 | } | 494 | } |
495 | 495 | ||
496 | 496 | ||
497 | bool ODeviceIPAQ::setDisplayBrightness ( int bright ) | 497 | bool ODeviceIPAQ::setDisplayBrightness ( int bright ) |
498 | { | 498 | { |
499 | bool res = false; | 499 | bool res = false; |
500 | int fd; | 500 | int fd; |
501 | 501 | ||
502 | if ( bright > 255 ) | 502 | if ( bright > 255 ) |
503 | bright = 255; | 503 | bright = 255; |
504 | if ( bright < 0 ) | 504 | if ( bright < 0 ) |
505 | bright = 0; | 505 | bright = 0; |
506 | 506 | ||
507 | // 128 is the maximum if you want a decent lifetime for the LCD | 507 | // 128 is the maximum if you want a decent lifetime for the LCD |
508 | 508 | ||
509 | bright = (int) (( ::pow ( 2, double( bright ) / 255.0 ) - 1 ) * 128.0 ); // logarithmic | 509 | bright = (int) (( ::pow ( 2, double( bright ) / 255.0 ) - 1 ) * 128.0 ); // logarithmic |
510 | //bright = ( bright + 1 ) / 2; | 510 | //bright = ( bright + 1 ) / 2; |
511 | 511 | ||
512 | if ((( fd = ::open ( "/dev/ts", O_WRONLY )) >= 0 ) || | 512 | if ((( fd = ::open ( "/dev/ts", O_WRONLY )) >= 0 ) || |
513 | (( fd = ::open ( "/dev/h3600_ts", O_WRONLY )) >= 0 )) { | 513 | (( fd = ::open ( "/dev/h3600_ts", O_WRONLY )) >= 0 )) { |
514 | FLITE_IN bl; | 514 | FLITE_IN bl; |
515 | bl. mode = 1; | 515 | bl. mode = 1; |
516 | bl. pwr = bright ? 1 : 0; | 516 | bl. pwr = bright ? 1 : 0; |
517 | bl. brightness = bright; | 517 | bl. brightness = bright; |
518 | res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 ); | 518 | res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 ); |
519 | ::close ( fd ); | 519 | ::close ( fd ); |
520 | } | 520 | } |
521 | return res; | 521 | return res; |
522 | } | 522 | } |
523 | 523 | ||
524 | int ODeviceIPAQ::displayBrightnessResolution ( ) const | 524 | int ODeviceIPAQ::displayBrightnessResolution ( ) const |
525 | { | 525 | { |
526 | return 255; // really 128, but logarithmic control is smoother this way | 526 | return 255; // really 128, but logarithmic control is smoother this way |
527 | } | 527 | } |
528 | 528 | ||
529 | 529 | ||
530 | /************************************************** | 530 | /************************************************** |
531 | * | 531 | * |
532 | * Zaurus | 532 | * Zaurus |
533 | * | 533 | * |
534 | **************************************************/ | 534 | **************************************************/ |
535 | 535 | ||
536 | 536 | ||
537 | 537 | ||
538 | void ODeviceZaurus::init ( ) | 538 | void ODeviceZaurus::init ( ) |
539 | { | 539 | { |
540 | d-> m_modelstr = "Zaurus SL5000"; | 540 | d-> m_modelstr = "Zaurus SL5000"; |
541 | d-> m_model = OMODEL_Zaurus_SL5000; | 541 | d-> m_model = OMODEL_Zaurus_SL5000; |
542 | d-> m_vendorstr = "Sharp"; | 542 | d-> m_vendorstr = "Sharp"; |
543 | d-> m_vendor = OVENDOR_Sharp; | 543 | d-> m_vendor = OVENDOR_Sharp; |
544 | 544 | ||
545 | QFile f ( "/proc/filesystems" ); | 545 | QFile f ( "/proc/filesystems" ); |
546 | 546 | ||
547 | if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read ( ). find ( "\tjffs2\n" ) >= 0 )) { | 547 | if ( f. open ( IO_ReadOnly ) && ( QTextStream ( &f ). read ( ). find ( "\tjffs2\n" ) >= 0 )) { |
548 | d-> m_systemstr = "OpenZaurus"; | 548 | d-> m_systemstr = "OpenZaurus"; |
549 | d-> m_system = OSYSTEM_OpenZaurus; | 549 | d-> m_system = OSYSTEM_OpenZaurus; |
550 | 550 | ||
551 | f. close ( ); | 551 | f. close ( ); |
552 | |||
553 | f. setName ( "/etc/oz_version" ); | ||
554 | if ( f. open ( IO_ReadOnly )) { | ||
555 | QTextStream ts ( &f ); | ||
556 | d-> m_sysverstr = ts. readLine ( ). mid ( 10 ); | ||
557 | f. close ( ); | ||
558 | } | ||
552 | } | 559 | } |
553 | else { | 560 | else { |
554 | d-> m_systemstr = "Zaurus"; | 561 | d-> m_systemstr = "Zaurus"; |
555 | d-> m_system = OSYSTEM_Zaurus; | 562 | d-> m_system = OSYSTEM_Zaurus; |
556 | } | 563 | } |
557 | 564 | ||
565 | |||
558 | d-> m_leds [0] = OLED_Off; | 566 | d-> m_leds [0] = OLED_Off; |
559 | } | 567 | } |
560 | 568 | ||
561 | #include <unistd.h> | 569 | #include <unistd.h> |
562 | #include <fcntl.h> | 570 | #include <fcntl.h> |
563 | #include <sys/ioctl.h> | 571 | #include <sys/ioctl.h> |
564 | 572 | ||
565 | //#include <asm/sharp_char.h> // including kernel headers is evil ... | 573 | //#include <asm/sharp_char.h> // including kernel headers is evil ... |
566 | 574 | ||
567 | #define SHARP_DEV_IOCTL_COMMAND_START 0x5680 | 575 | #define SHARP_DEV_IOCTL_COMMAND_START 0x5680 |
568 | 576 | ||
569 | #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | 577 | #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) |
570 | #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) | 578 | #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) |
571 | 579 | ||
572 | #define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ | 580 | #define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ |
573 | #define SHARP_BUZ_KEYSOUND 2 /* key sound */ | 581 | #define SHARP_BUZ_KEYSOUND 2 /* key sound */ |
574 | #define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ | 582 | #define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ |
575 | 583 | ||
576 | /* --- for SHARP_BUZZER device --- */ | 584 | /* --- for SHARP_BUZZER device --- */ |
577 | 585 | ||
578 | //#defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | 586 | //#defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) |
579 | //#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) | 587 | //#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) |
580 | 588 | ||
581 | #define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) | 589 | #define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) |
582 | #define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) | 590 | #define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) |
583 | #define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3) | 591 | #define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3) |
584 | #define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4) | 592 | #define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4) |
585 | #define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5) | 593 | #define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5) |
586 | 594 | ||
587 | //#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ | 595 | //#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ |
588 | //#define SHARP_BUZ_KEYSOUND 2 /* key sound */ | 596 | //#define SHARP_BUZ_KEYSOUND 2 /* key sound */ |
589 | 597 | ||
590 | //#define SHARP_PDA_ILLCLICKSOUND 3 /* illegal click */ | 598 | //#define SHARP_PDA_ILLCLICKSOUND 3 /* illegal click */ |
591 | //#define SHARP_PDA_WARNSOUND 4 /* warning occurred */ | 599 | //#define SHARP_PDA_WARNSOUND 4 /* warning occurred */ |
592 | //#define SHARP_PDA_ERRORSOUND 5 /* error occurred */ | 600 | //#define SHARP_PDA_ERRORSOUND 5 /* error occurred */ |
593 | //#define SHARP_PDA_CRITICALSOUND 6 /* critical error occurred */ | 601 | //#define SHARP_PDA_CRITICALSOUND 6 /* critical error occurred */ |
594 | //#define SHARP_PDA_SYSSTARTSOUND 7 /* system start */ | 602 | //#define SHARP_PDA_SYSSTARTSOUND 7 /* system start */ |
595 | //#define SHARP_PDA_SYSTEMENDSOUND 8 /* system shutdown */ | 603 | //#define SHARP_PDA_SYSTEMENDSOUND 8 /* system shutdown */ |
596 | //#define SHARP_PDA_APPSTART 9 /* application start */ | 604 | //#define SHARP_PDA_APPSTART 9 /* application start */ |
597 | //#define SHARP_PDA_APPQUIT 10 /* application ends */ | 605 | //#define SHARP_PDA_APPQUIT 10 /* application ends */ |
598 | 606 | ||
599 | //#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ | 607 | //#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ |
600 | //#define SHARP_BUZ_DAILY_ALARM 12 /* daily alarm */ | 608 | //#define SHARP_BUZ_DAILY_ALARM 12 /* daily alarm */ |
601 | //#define SHARP_BUZ_GOT_PHONE_CALL 13 /* phone call sound */ | 609 | //#define SHARP_BUZ_GOT_PHONE_CALL 13 /* phone call sound */ |
602 | //#define SHARP_BUZ_GOT_MAIL 14 /* mail sound */ | 610 | //#define SHARP_BUZ_GOT_MAIL 14 /* mail sound */ |
603 | // | 611 | // |
604 | 612 | ||
605 | #defineSHARP_LED_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) | 613 | #defineSHARP_LED_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) |
606 | #define SHARP_LED_SETSTATUS (SHARP_LED_IOCTL_START+1) | 614 | #define SHARP_LED_SETSTATUS (SHARP_LED_IOCTL_START+1) |
607 | 615 | ||
608 | typedef struct sharp_led_status { | 616 | typedef struct sharp_led_status { |
609 | int which; /* select which LED status is wanted. */ | 617 | int which; /* select which LED status is wanted. */ |
610 | int status; /* set new led status if you call SHARP_LED_SETSTATUS */ | 618 | int status; /* set new led status if you call SHARP_LED_SETSTATUS */ |
611 | } sharp_led_status; | 619 | } sharp_led_status; |
612 | 620 | ||
613 | #define SHARP_LED_MAIL_EXISTS 9 /* mail status (exists or not) */ | 621 | #define SHARP_LED_MAIL_EXISTS 9 /* mail status (exists or not) */ |
614 | 622 | ||
615 | #define LED_MAIL_NO_UNREAD_MAIL 0 /* for SHARP_LED_MAIL_EXISTS */ | 623 | #define LED_MAIL_NO_UNREAD_MAIL 0 /* for SHARP_LED_MAIL_EXISTS */ |
616 | #define LED_MAIL_NEWMAIL_EXISTS 1 /* for SHARP_LED_MAIL_EXISTS */ | 624 | #define LED_MAIL_NEWMAIL_EXISTS 1 /* for SHARP_LED_MAIL_EXISTS */ |
617 | #define LED_MAIL_UNREAD_MAIL_EX 2 /* for SHARP_LED_MAIL_EXISTS */ | 625 | #define LED_MAIL_UNREAD_MAIL_EX 2 /* for SHARP_LED_MAIL_EXISTS */ |
618 | 626 | ||
619 | // #include <asm/sharp_apm.h> // including kernel headers is evil ... | 627 | // #include <asm/sharp_apm.h> // including kernel headers is evil ... |
620 | 628 | ||
621 | #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) | 629 | #define APM_IOCGEVTSRC OD_IOR( 'A', 203, int ) |
622 | #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) | 630 | #define APM_IOCSEVTSRC OD_IORW( 'A', 204, int ) |
623 | #define APM_EVT_POWER_BUTTON (1 << 0) | 631 | #define APM_EVT_POWER_BUTTON (1 << 0) |
624 | 632 | ||
625 | #define FL_IOCTL_STEP_CONTRAST 100 | 633 | #define FL_IOCTL_STEP_CONTRAST 100 |
626 | 634 | ||
627 | 635 | ||
628 | void ODeviceZaurus::buzzer ( int sound ) | 636 | void ODeviceZaurus::buzzer ( int sound ) |
629 | { | 637 | { |
630 | static int fd = ::open ( "/dev/sharp_buz", O_RDWR|O_NONBLOCK ); | 638 | static int fd = ::open ( "/dev/sharp_buz", O_RDWR|O_NONBLOCK ); |
631 | 639 | ||
632 | if ( fd >= 0 ) | 640 | if ( fd >= 0 ) |
633 | ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); | 641 | ::ioctl ( fd, SHARP_BUZZER_MAKESOUND, sound ); |
634 | } | 642 | } |
635 | 643 | ||
636 | 644 | ||
637 | void ODeviceZaurus::alarmSound ( ) | 645 | void ODeviceZaurus::alarmSound ( ) |
638 | { | 646 | { |
639 | buzzer ( SHARP_BUZ_SCHEDULE_ALARM ); | 647 | buzzer ( SHARP_BUZ_SCHEDULE_ALARM ); |
640 | } | 648 | } |
641 | 649 | ||
642 | void ODeviceZaurus::touchSound ( ) | 650 | void ODeviceZaurus::touchSound ( ) |
643 | { | 651 | { |
644 | buzzer ( SHARP_BUZ_TOUCHSOUND ); | 652 | buzzer ( SHARP_BUZ_TOUCHSOUND ); |
645 | } | 653 | } |
646 | 654 | ||
647 | void ODeviceZaurus::keySound ( ) | 655 | void ODeviceZaurus::keySound ( ) |
648 | { | 656 | { |
649 | buzzer ( SHARP_BUZ_KEYSOUND ); | 657 | buzzer ( SHARP_BUZ_KEYSOUND ); |
650 | } | 658 | } |
651 | 659 | ||
652 | 660 | ||
653 | uint ODeviceZaurus::hasLeds ( ) const | 661 | uint ODeviceZaurus::hasLeds ( ) const |
654 | { | 662 | { |
655 | return 1; | 663 | return 1; |
656 | } | 664 | } |
657 | 665 | ||
658 | OLedState ODeviceZaurus::led ( uint which ) const | 666 | OLedState ODeviceZaurus::led ( uint which ) const |
659 | { | 667 | { |
660 | if ( which == 0 ) | 668 | if ( which == 0 ) |
661 | return d-> m_leds [0]; | 669 | return d-> m_leds [0]; |
662 | else | 670 | else |
663 | return OLED_Off; | 671 | return OLED_Off; |
664 | } | 672 | } |
665 | 673 | ||
666 | bool ODeviceZaurus::setLed ( uint which, OLedState st ) | 674 | bool ODeviceZaurus::setLed ( uint which, OLedState st ) |
667 | { | 675 | { |
668 | static int fd = ::open ( "/dev/sharp_led", O_RDWR|O_NONBLOCK ); | 676 | static int fd = ::open ( "/dev/sharp_led", O_RDWR|O_NONBLOCK ); |
669 | 677 | ||
670 | if ( which == 0 ) { | 678 | if ( which == 0 ) { |
671 | if ( fd >= 0 ) { | 679 | if ( fd >= 0 ) { |
672 | struct sharp_led_status leds; | 680 | struct sharp_led_status leds; |
673 | ::memset ( &leds, 0, sizeof( leds )); | 681 | ::memset ( &leds, 0, sizeof( leds )); |
674 | leds. which = SHARP_LED_MAIL_EXISTS; | 682 | leds. which = SHARP_LED_MAIL_EXISTS; |
675 | 683 | ||
676 | switch ( st ) { | 684 | switch ( st ) { |
677 | case OLED_Off : leds. status = LED_MAIL_NO_UNREAD_MAIL; break; | 685 | case OLED_Off : leds. status = LED_MAIL_NO_UNREAD_MAIL; break; |
678 | case OLED_On : leds. status = LED_MAIL_NEWMAIL_EXISTS; break; | 686 | case OLED_On : leds. status = LED_MAIL_NEWMAIL_EXISTS; break; |
679 | case OLED_BlinkSlow: | 687 | case OLED_BlinkSlow: |
680 | case OLED_BlinkFast: leds. status = LED_MAIL_UNREAD_MAIL_EX; break; | 688 | case OLED_BlinkFast: leds. status = LED_MAIL_UNREAD_MAIL_EX; break; |
681 | } | 689 | } |
682 | 690 | ||
683 | if ( ::ioctl ( fd, SHARP_LED_SETSTATUS, &leds ) >= 0 ) { | 691 | if ( ::ioctl ( fd, SHARP_LED_SETSTATUS, &leds ) >= 0 ) { |
684 | d-> m_leds [0] = st; | 692 | d-> m_leds [0] = st; |
685 | return true; | 693 | return true; |