Archived
1
0
This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
controller/Output/pjrcUSB/capabilities.kll

102 lines
3.3 KiB
Plaintext
Raw Normal View History

Name = pjrcUSBCapabilities;
Version = 0.8;
Author = "HaaTa (Jacob Alexander) 2014-2016";
KLL = 0.3d;
# Modified Date
Major USB update, fixes most (if not all) known issues USB - General - Refactored descriptors - Enabled/Disable USB endpoints - Added debug flags for special features - Code cleanup - Interface count calculation based off of enabled endpoints - Delayed wTotalLength calculation to simplify descriptor offsets - Re-ordered endpoints and interfaces - Added more debug output - Added usbInitTime to show how long keyboard initialization took (Useful when debugging bad init sequences) - Added function for usb_resume() which takes care of the resume sequence * Resume is now only called if packets are starting to timeout USB - Special Options - Added enableDeviceRestartOnUSBTimeout * A last resort hammer for bad USB Chipsets/OSs, don't use if you can help it * Disabled - Added enableUSBResume * Enables host resume wake-up signalling, required to wake a computer from sleep * Enabled - Added enableUSBLowPowerNegotiation * Enables power negotiation hack * Required to use firmware with an IPad and other hard-limit low-power USB hosts * Hasn't been tested with the recent changes * Disabled - Added enableUSBSuspend * Enables power down events on host USB bus suspend * Enabled USB - Keyboard - Attempted to cleanup HID SET_REPORT * Works much better * Still has an issue under Linux which generates *a lot* of NAKs (initializes quickly regardless) + Not present on other keyboards + SETUP -> OUT -> IN : This sequence is the problem + Specifically during the OUT phase - Enabled USB - CDC Virtual Serial Port - Code cleanup - Added convenience struct USBCDCLineCoding for easier debugging - Attempted to cleanup CDC_SET_LING_CODING * Works much better * Still has an issue under Linux which generates *a lot* of NAKs (initializes quickly regardless) + SETUP -> OUT -> IN : This sequence is the problem + Specifically during the OUT phase + Likely the same issues as HID SET_REPORT - Enabled USB - Mouse - Enabled USB - Joystick - Disabled USB - RawIO - Initial code, API not used yet - Disabled DFU - Updated load script, now faster
2016-05-31 07:19:45 +00:00
Date = 2016-05-31;
# Output capabilities
consCtrlOut => Output_consCtrlSend_capability( consCode : 2 );
2015-05-14 04:58:22 +00:00
noneOut => Output_noneSend_capability();
sysCtrlOut => Output_sysCtrlSend_capability( sysCode : 1 );
usbKeyOut => Output_usbCodeSend_capability( usbCode : 1 );
mouseOut => Output_usbMouse_capability( mouseCode : 2, relative_x : 2, relative_y : 2 );
# Configuration capabilities
kbdProtocolBoot => Output_kbdProtocolBoot_capability();
kbdProtocolNKRO => Output_kbdProtocolNKRO_capability();
2016-05-26 11:06:12 +00:00
toggleKbdProtocol => Output_toggleKbdProtocol_capability();
# Locale Settings
keyboardLocale => KeyboardLocale_define;
keyboardLocale = 0;
# Default KRO Mode
# Set to 0 for Boot Mode (6KRO)
# Set to 1 for NKRO Mode (default)
usbProtocol => USBProtocol_define;
usbProtocol = 1;
# Bootloader Mode capability
# XXX
# By default this is disabled on purpose
# It is a large security hazard
flashModeEnabled => flashModeEnabled_define;
flashModeEnabled = 0;
flashMode => Output_flashMode_capability();
Major USB update, fixes most (if not all) known issues USB - General - Refactored descriptors - Enabled/Disable USB endpoints - Added debug flags for special features - Code cleanup - Interface count calculation based off of enabled endpoints - Delayed wTotalLength calculation to simplify descriptor offsets - Re-ordered endpoints and interfaces - Added more debug output - Added usbInitTime to show how long keyboard initialization took (Useful when debugging bad init sequences) - Added function for usb_resume() which takes care of the resume sequence * Resume is now only called if packets are starting to timeout USB - Special Options - Added enableDeviceRestartOnUSBTimeout * A last resort hammer for bad USB Chipsets/OSs, don't use if you can help it * Disabled - Added enableUSBResume * Enables host resume wake-up signalling, required to wake a computer from sleep * Enabled - Added enableUSBLowPowerNegotiation * Enables power negotiation hack * Required to use firmware with an IPad and other hard-limit low-power USB hosts * Hasn't been tested with the recent changes * Disabled - Added enableUSBSuspend * Enables power down events on host USB bus suspend * Enabled USB - Keyboard - Attempted to cleanup HID SET_REPORT * Works much better * Still has an issue under Linux which generates *a lot* of NAKs (initializes quickly regardless) + Not present on other keyboards + SETUP -> OUT -> IN : This sequence is the problem + Specifically during the OUT phase - Enabled USB - CDC Virtual Serial Port - Code cleanup - Added convenience struct USBCDCLineCoding for easier debugging - Attempted to cleanup CDC_SET_LING_CODING * Works much better * Still has an issue under Linux which generates *a lot* of NAKs (initializes quickly regardless) + SETUP -> OUT -> IN : This sequence is the problem + Specifically during the OUT phase + Likely the same issues as HID SET_REPORT - Enabled USB - Mouse - Enabled USB - Joystick - Disabled USB - RawIO - Initial code, API not used yet - Disabled DFU - Updated load script, now faster
2016-05-31 07:19:45 +00:00
## USB Compatibility Flags ##
# Some OSs and USB Chipsets have issues with USB features
# These flags are available to provide ways to debug them
# Enable USB Suspend/Low Power mode
# After a period of inactivity, the USB host may request that the device go into low power mode
# This is different than system sleep, though it may occur around the same time
enableUSBSuspend => enableUSBSuspend_define;
enableUSBSuspend = 1;
# Enable Low-power Negotiation
# In order to support low-powered USB hosts, such as an Apple IPad, a low power auto-negotiation scheme has been implemented
# Unfortunately, badly behaved USB Chipsets and OSs may not work correctly with this support enabled
# Typical symptoms:
# * USB constantly re-initializing when first plugging in
enableUSBLowPowerNegotiation => enableUSBLowPowerNegotiation_define;
enableUSBLowPowerNegotiation = 0;
# Enable Device Restart on USB Timeout
# *USE AS LAST RETORT*
# To work around some USB OS, Chipset and Firwmare bugs, an auto-restart mechanism has been implemented
# Depending on the situation, this can be rather aggressive.
# This behaves differently than the Low-power negotiation restart and have very different triggering schemes.
enableDeviceRestartOnUSBTimeout => enableDeviceRestartOnUSBTimeout_define;
enableDeviceRestartOnUSBTimeout = 0;
# Enable Host-Resume (wake-from-sleep)
# On specific actions (such as USB key actions), will trigger the host device to wake if USB is suspended
enableUSBResume => enableUSBResume_define;
enableUSBResume = 1;
## USB Endpoint Configuration ##
# 1 - Enable endpoint
# 0 - Disable endpoint
# Any/all endpoints can be disabled
# But you'll lose functionality for that feature
# Disabling endpoints will save RAM and Flash on the target MCU
# Joystick Endpoint
# *Currently Unused*
enableJoystick => enableJoystick_define;
enableJoystick = 0;
# Mouse Endpoint
enableMouse => enableMouse_define;
enableMouse = 1;
# Keyboard Endpoint
enableKeyboard => enableKeyboard_define;
enableKeyboard = 1;
# CDC / Serial Port Endpoint
enableVirtualSerialPort => enableVirtualSerialPort_define;
enableVirtualSerialPort = 1;
# Raw I/O Endpoint
# *Currently Unused*
enableRawIO => enableRawIO_define;
enableRawIO = 0;