Module: Ligo
- Defined in:
- lib/ligo.rb,
lib/ligo/device.rb,
lib/ligo/context.rb,
lib/ligo/logging.rb,
lib/ligo/version.rb,
lib/ligo/accessory.rb,
lib/ligo/constants.rb
Overview
Copyright (c) 2012, 2013 Renaud AUBIN
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Defined Under Namespace
Modules: Logging Classes: Accessory, Context, Device
Constant Summary collapse
- VERSION =
ligÅ version
"0.2.0"
- VENDOR_IDS =
Android devices Vendor Ids
[ GOOGLE_VID = 0x18d1, INTEL_VID = 0x8087, HTC_VID = 0x0bb4, SAMSUNG_VID = 0x04e8, MOTOROLA_VID = 0x22b8, LGE_VID = 0x1004, HUAWEI_VID = 0x12D1, ACER_VID = 0x0502, SONY_ERICSSON_VID = 0x0FCE, FOXCONN_VID = 0x0489, DELL_VID = 0x413c, NVIDIA_VID = 0x0955, GARMIN_ASUS_VID = 0x091E, SHARP_VID = 0x04dd, ZTE_VID = 0x19D2, KYOCERA_VID = 0x0482, PANTECH_VID = 0x10A9, QUALCOMM_VID = 0x05c6, OTGV_VID = 0x2257, NEC_VID = 0x0409, PMC_VID = 0x04DA, TOSHIBA_VID = 0x0930, SK_TELESYS_VID = 0x1F53, KT_TECH_VID = 0x2116, ASUS_VID = 0x0b05, PHILIPS_VID = 0x0471, TI_VID = 0x0451, FUNAI_VID = 0x0F1C, GIGABYTE_VID = 0x0414, IRIVER_VID = 0x2420, COMPAL_VID = 0x1219, T_AND_A_VID = 0x1BBB, LENOVOMOBILE_VID = 0x2006, LENOVO_VID = 0x17EF, VIZIO_VID = 0xE040, K_TOUCH_VID = 0x24E3, PEGATRON_VID = 0x1D4D, ARCHOS_VID = 0x0E79, POSITIVO_VID = 0x1662, FUJITSU_VID = 0x04C5, LUMIGON_VID = 0x25E3, QUANTA_VID = 0x0408, INQ_MOBILE_VID = 0x2314, SONY_VID = 0x054C, YULONG_COOLPAD_VID = 0x1EBF ]
- GOOGLE_PIDS =
Accessory Protocol allowed product ids
(0x2d00..0x2d05)
- COMMAND_GETPROTOCOL =
Accessory Protocol Commands Accessory Protocol "Get Protocol" command
51
- COMMAND_SENDSTRING =
Accessory Protocol "Send Id String" command
52
- COMMAND_START =
Accessory Protocol "Accessory Mode Start Up" commands
53
- @@reenumeration_delay =
USB reenumeration delay in seconds
1
Class Method Summary collapse
- .getDelay ⇒ Object
-
.os ⇒ Symbol
Return the OS identifier.
- .setDelay(x) ⇒ Object
Class Method Details
.getDelay ⇒ Object
29 30 31 |
# File 'lib/ligo/device.rb', line 29 def self.getDelay @@reenumeration_delay end |
.os ⇒ Symbol
Return the OS identifier
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/ligo.rb', line 41 def self.os @os ||= ( host_os = RbConfig::CONFIG['host_os'] case host_os when /mswin|msys|mingw|cygwin|bccwin|wince|emc/ :windows when /darwin|mac os/ :macosx when /linux/ :linux when /solaris|bsd/ :unix else raise StandardError, "unknown os: #{host_os.inspect}" end ) end |
.setDelay(x) ⇒ Object
25 26 27 |
# File 'lib/ligo/device.rb', line 25 def self.setDelay(x) @@reenumeration_delay = x end |