view Scan/UARTConnect/capabilities.kll @ 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 fc2c2a1e9615
children
line wrap: on
line source

Name = UARTConnectCapabilities;
Version = 0.1;
Author = "HaaTa (Jacob Alexander) 2015";
KLL = 0.3a;

# Modified Date
Date = 2015-03-15;

# UART Buffer Size
# Number of bytes to reserve for each side of UARTConnect
# For true NKRO support must be at least: <# of Keys> x 3 + 5
UARTConnectBufSize => UARTConnectBufSize_define;
UARTConnectBufSize = 128; # MDErgo1 requires at least a 119 byte buffer

# UART Speed
# *NOTE* This must be changed on every device in the chain or else UARTConnect will not work
# The faster the speed, the lower the latency, but higher chance for an error
UARTConnectBaud => UARTConnectBaud_define;
UARTConnectBaudFine => UARTConnectBaudFine_define;
# Generally, leave BaudFine at zero unless trying to tune the link to an external UART
# You'll want to look at the specific chip datasheet for the exact equation
#
# Example of 115200 Baud using a 48 MHz clock (mk20dx128vlf5)
# 48 MHz / ( 16 * Baud ) = BDH/L
# Baud: 115200 -> 48 MHz / ( 16 * 115200 ) = 26.0416667
# Thus baud setting = 26
# NOTE: If finer baud adjustment is needed see UARTx_C4 -> BRFA in the datasheet
# Baud fine setting = 0x02
UARTConnectBaud = 1; # 4.5 Mbpsa  @ 72 MHz
UARTConnectBaudFine = 0x0;

#UARTConnectBaud = 39; # 115385 bps @ 72 MHz (close to 115200)

# Cable Check Command Length
# This defines the length of the cable command
# 0xD2 11010010 is used for each check byte
#
# For example:
# Length: 4
# Args: 0xD2 0xD2 0xD2 0xD2
UARTConnectCableCheckLength => UARTConnectCableCheckLength_define;
UARTConnectCableCheckLength = 2;

# Connect Enable
# Define used to indicate to non-connect modules that support should be compiled in
ConnectEnabled => ConnectEnabled_define;
ConnectEnabled = 1;