annotate Scan/ISSILed/led_scan.h @ 420:23a1868b4ac2

Adding dynamic USB power support - Each scan module now has a current change callback which passes the available current as a parameter - No longer attempts to use the max 500 mA immediately, starts with 100 mA then goes to 500 mA after enumeration - If enumeration fails due to bMaxPower of 500 mA, then attempt again at 100 mA (might also be possible to go even lower to 20 mA in certain cases) - Now working with the Apple Ipad (no over-power messages) - Fixed Wake-up behaviour on Apple Ipad (and likely other iOS devices) - More effecient set_feature/clear_feature handling (device handler) - Initial power handling via Interconnect (still needs work to get it more dynamic)
author Jacob Alexander <haata@kiibohd.com>
date Sun, 21 Feb 2016 19:56:52 -0800
parents 66eccdd9ced5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
420
23a1868b4ac2 Adding dynamic USB power support
Jacob Alexander <haata@kiibohd.com>
parents: 341
diff changeset
1 /* Copyright (C) 2014-2016 by Jacob Alexander
315
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
2 *
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
3 * This file is free software: you can redistribute it and/or modify
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
4 * it under the terms of the GNU General Public License as published by
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
5 * the Free Software Foundation, either version 3 of the License, or
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
6 * (at your option) any later version.
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
7 *
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
8 * This file is distributed in the hope that it will be useful,
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
11 * GNU General Public License for more details.
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
12 *
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
13 * You should have received a copy of the GNU General Public License
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
14 * along with this file. If not, see <http://www.gnu.org/licenses/>.
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
15 */
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
16
341
66eccdd9ced5 Code cleanup
Jacob Alexander <haata@kiibohd.com>
parents: 315
diff changeset
17 #pragma once
315
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
18
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
19 // ----- Includes -----
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
20
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
21 // Compiler Includes
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
22 #include <stdint.h>
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
23
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
24
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
25
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
26 // ----- Functions -----
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
27
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
28 void LED_setup();
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
29 uint8_t LED_scan();
bcdc04cb8e2e Initial LED support for ISSI IS31FL3731C
Jacob Alexander <haata@kiibohd.com>
parents:
diff changeset
30
420
23a1868b4ac2 Adding dynamic USB power support
Jacob Alexander <haata@kiibohd.com>
parents: 341
diff changeset
31 void LED_currentChange( unsigned int current );
23a1868b4ac2 Adding dynamic USB power support
Jacob Alexander <haata@kiibohd.com>
parents: 341
diff changeset
32