-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 | |||
@@ -528,54 +528,62 @@ int ODeviceIPAQ::displayBrightnessResolution ( ) const | |||
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) |