Commit Graph

544 Commits

Author SHA1 Message Date
Dean Camera e0852408de Replace cast-as-char* byte access of multibyte variables with proper shifts and masks to preserve endianness across different architectures. 2011-04-13 06:12:52 +00:00
Dean Camera 852b5e612d Remove redundant type information for bitfield elements, other than the signed/unsignedness of the element.
Change type of USB_SelectedPipe and USB_SelectedEndpoint for the AVR32 UC3 architecture to uint32_t to reduce the compiled code size.
2011-04-10 06:43:02 +00:00
Dean Camera c263ea837a Move global interrupt enable/disable functions out to Common.h and document them. 2011-04-08 05:40:25 +00:00
Dean Camera de9bd767dc Correct UC3 global interrupt functions.
Replace all calls and references to _delay_ms() in the code with the architecture-agnostic Delay_MS() function.

Improve code generation for the Delay_MS() function on the AVR8 architecture when called with a constant input.
2011-04-08 05:05:05 +00:00
Dean Camera 70284d390f Add in a new common Delay_MS() function, which provides a blocking delay for all architectures.
Remove use of avr-libc specific ATOMIC_BLOCK, replace with a new per-architecture set of inline functions to retrieve and manipulate the global interrupt enable bit for each architecture.

Add in documentation for the USB controller common interrupt routine which must be linked to the interrupt controller in the user application on the AVR32 UC3 architecture.
2011-04-08 04:49:20 +00:00
Dean Camera 899df7d331 Renamed all low level Endpoint_Read_*, Endpoint_Write_* and Endpoint_Discard_* functions to use the number of bits instead of a symbolic size (Byte, Word, DWord) so that the function names are applicable and correct across all architectures.
Renamed all low level Pipe_Read_*, Pipe_Write_* and Pipe_Discard_* functions to use the number of bits instead of a symbolic size (Byte, Word, DWord) so that the function names are applicable and correct across all architectures.
2011-04-04 12:52:30 +00:00
Dean Camera 8f5ab27dc9 Use the MIN() macro where possible instead of manual "(x < y) ? x : y" constructs. 2011-03-23 09:26:41 +00:00
Dean Camera aba7932a5c F_CLOCK changed to F_USB to be more descriptive, and applicable on future architecture ports. 2011-03-21 10:20:42 +00:00
Dean Camera 1a130eed6c Updated the software USART code in the XPLAIN Bridge application so that the incomming bits are sampled at their mid-point instead of starting point, to give maximum reliability (thanks to Anton). 2011-03-15 04:02:15 +00:00
Dean Camera cf2411435c Removed Pipe_ClearErrorFlags(), pipe error flags are now automatically cleared when Pipe_ClearError() is called.
More UC3B architecture porting.
2011-02-26 20:22:33 +00:00
Dean Camera 66c38cd940 Added TWI baud rate prescaler and bit length parameters to the TWI_Init() function (thanks to Thomas Herlinghaus). 2011-02-26 15:57:06 +00:00
Dean Camera 3d4d8e7f62 Add new ARCH option to the makefiles to (eventually) specify the target device architecture. Update non-usb peripheral drivers to reflect future multiple architecture support. 2011-02-19 18:37:22 +00:00
Dean Camera 0019fbd129 Add more const-ness to the stream endpoint/pipe functions where possible. 2011-02-13 21:27:24 +00:00
Dean Camera 3d232953d9 Fix typos in the HID class bootloader makefile. 2011-02-11 20:00:48 +00:00
Dean Camera 782614dbb5 Add static keyword to all project globals whose scope should be restricted to the same module as they are declared in.
Tighten up the HID class bootloader code slightly, document that it currently exceeds 2KB of bootloader space for all models other than the Series 2 USB AVRs.
2011-02-10 17:55:49 +00:00
Dean Camera 5995c3f880 Oops - fix missing constants in the TempDataLogger FatFS diskio.h header file.
Add const to all project descriptor definitions for safety.
2011-02-06 18:03:29 +00:00
Dean Camera a95d224185 Update projects using FatFS and PetiteFatFS to the latest library versions. 2011-02-06 15:17:46 +00:00
Dean Camera 279e1b6ece Fixed programming errors in the AVRISP-MKII project when the programming packet is a round multiple of the endpoint bank size under avrdude (thanks to Steffan Woltjer). 2011-02-04 18:17:31 +00:00
Dean Camera 43b9d552bb Renamed all driver termination *_ShutDown() functions to the more logical name *_Disable(). 2011-01-30 23:12:06 +00:00
Dean Camera 9051d3beb0 Oops - fix up some calls to the old function names, include Serial Peripheral driver in the RNDISEthernetHost project. 2011-01-30 22:42:24 +00:00
Dean Camera afd828c095 Removed SerialStream module, rolled functionality into the base USART Serial peripheral driver instead through the new Serial_CreateStream() and Serial_CreateBlockingStream() methods.
Renamed the Serial byte send/receive functions to remain consistent with the CDC driver's byte functions.

Altered the serial byte receive function to make it non-blocking.
2011-01-30 19:47:31 +00:00
Dean Camera 30f6d2bfd8 Oops - forgot to add in LOGICAL MINIMUM and LOGICAL MAXIMUM report items into the standard library Joystick HID report descriptor macro. Add in support for joystick resolution reporting via PHYSICAL_MINIMUM and PHYSICAL_MAXIMUM items. 2011-01-30 14:40:24 +00:00
Dean Camera e6dc951630 Add new HID_DESCRIPTOR_VENDOR() macro, change over all projects and Device ClassDriver demos to use it.
Fix reversed byte ordering of multi-byte HID data.

Added support to the HID parser for extended USAGE items that contain the usage page as well as the usage index.

Removed the HID_IOF_NON_VOLATILE and HID_IOF_VOLATILE flags from HID INPUT items where the flag is invalid. Changed over HID OUTPUT items to use HID_IOF_NON_VOLATILE.

Change over MagStripe project to use HID_DESCRIPTOR_KEYBOARD() for its HID report. Change over MouseHostDevice demo to use HID_DESCRIPTOR_MOUSE() for its HID report.
2011-01-30 14:14:04 +00:00
Dean Camera 26017b68b0 Changed AVRISP-MKII project to use the Watchdog interrupt for command timeouts, to reduce CPU usage and free timer 0 for other uses in the future. 2011-01-22 17:48:06 +00:00
Dean Camera efd57cfe51 Abuse the the C preprocessor so that the HID macros can automatically encode data into the array from the HID macros automagically, by specifying the bit-width of the data, and the data itself as a single integer value of that width. 2011-01-17 19:44:48 +00:00
Dean Camera 039a714ee4 New HID report item macros (with HID_RI_ prefix) to allow for easy creation and editing of HID report descriptors.
Changed over all project and demo HID report descriptors to use the new HID report item macros.

Moved the HIDParser.c source file to the LUFA/Drivers/USB/Class/Common/ directory from the LUFA/Drivers/USB/Class/Host/.
2011-01-16 19:34:28 +00:00
Dean Camera 32830a2b82 Added new ADC_GET_CHANNEL_MASK() convenience macro to the ADC driver. 2011-01-16 16:13:22 +00:00
Dean Camera 70d55f6e0c Added new high level TWI packet read/write commands, altered behaviour of the TWI_StartTransmission() function.
Spell check source code files.
2011-01-13 22:56:49 +00:00
Dean Camera 9c7594e7db Oops - The DS1307 contains an unused "DayOfWeek" register that must be accounted for in the new unified DS1307 Time/Day read and write routines. 2011-01-13 21:01:05 +00:00
Dean Camera 7776aa4e2e Changed TempDataLogger project's DS1307 driver to simplify the function interface and prevent a possible race condition. 2011-01-13 19:14:38 +00:00
Dean Camera 187ccb2e15 Fix typos and outdated information. 2011-01-10 21:53:38 +00:00
Dean Camera f555ad7ced Altered all endpoint/pipe stream transfers so that the new BytesProcessed parameter now points to a location where the number of bytes in the transfer that have been completed can be stored (or NULL if entire transaction should be performed in one chunk).
Added new Endpoint_Null_Stream() and Pipe_Null_stream() functions.

Removed the NO_STREAM_CALLBACKS compile time option due to the new partial stream transfer feature replacing it.

Fixed errors in the incomplete Test and Measurement device demo preventing proper operation (thanks to Pavel Plotnikov).
2011-01-10 18:43:34 +00:00
Dean Camera d126146887 The FAST_STREAM_TRANSFERS compile time option has been removed due to lack of use and low cost/benefit ratio.
Add GCC_FORCE_POINTER_ACCESS() macro use to the RingBuffer library header, to attempt to force GCC into producing more efficient code for manipulating the buffers.
2011-01-08 00:54:30 +00:00
Dean Camera 1d433d4506 Update copyright year on all source files. 2011-01-01 13:00:56 +00:00
Dean Camera 64fe1cd0b2 Rename RingBuffer header functions and typedefs from RingBuff_* to RingBuffer_* so that it matches the header name. 2010-12-31 14:47:20 +00:00
Dean Camera a8b66f318d Documentation improvements - put driver example code into its own section, fix incorrect and missing section names. 2010-12-26 14:55:26 +00:00
Dean Camera 2073b96d82 Added basic driver example use code to the library documentation.
Made the USARTStream global public and documented in the SerialStream module, allowing for the serial USART stream to be accessed via its handle rather than via the implicit stdout and stdin streams.
2010-12-26 14:25:34 +00:00
Dean Camera 39ac72f2d1 Make a new general RingBuffer.h misc library driver, instead of the per-application LightweightRingBuff.h ring buffers. Change over projects to use the new driver.
Add ORDERED_EP_CONFIG to the device Projects (only) that use only a single class driver, or where the endpoint ordering is fixed, to save on compiled binary size.

Added new GCC_FORCE_POINTER_ACCESS() macro to correct GCC's mishandling of struct pointers.
2010-12-26 13:01:37 +00:00
Dean Camera 12418e6eaf Combined page and word ISP programming mode code in the AVRISP-MKII clone project to reduce compiled size and increase maintainability of the code. 2010-12-25 21:36:17 +00:00
Dean Camera 958b20a8ef Fixed possible programming problem in the AVRISP-MKII clone project when programming specific patterns into a target memory space that is only byte (not page) addressable. 2010-12-25 17:49:30 +00:00
Dean Camera 7d83bd0dcc Add DEVICE_STATE_AS_GPIOR=0 compile time option to the library projects, to reduce compiled binary size. 2010-12-24 18:04:51 +00:00
Dean Camera a57287a59f Fix a few more incorrectly ordered endpoint initialisations in the device demos. 2010-12-17 20:26:14 +00:00
Dean Camera 0381399f66 Add missing AVRStudio4 project file for the MIDIToneGenerator project. 2010-12-17 19:59:19 +00:00
Dean Camera 0aa950c241 Fixed incorrect definition of the HID_KEYBOARD_SC_D constant in the HID class driver (thanks to Opendous Inc.).
Add extra comments to the ISPTarget.c source file in the AVRISP-MKII clone project.
2010-12-13 06:05:05 +00:00
Dean Camera 46677b4589 Fixed possible lost data in the XPLAINBridge, USBtoSerial and Benito projects when the host exceeds the packet timeout period on received packets as set by USB_STREAM_TIMEOUT_MS (thanks to Justin Rajewski). 2010-12-12 16:50:45 +00:00
Dean Camera b67f9f3669 Added new RingBuffer_Peek() function to the lightweight ring buffer headers. 2010-12-12 16:39:46 +00:00
Dean Camera 8a7351c760 Added new completed MIDIToneGenerator project. 2010-12-03 03:51:46 +00:00
Dean Camera 82fa9149d7 Fixed broken DFU bootloader, added XPLAIN support for bootloader start when XCK jumpered to ground. 2010-11-27 01:27:55 +00:00
Dean Camera 7704d2915c Fix typos in the XPLAINBridge project preventing compilation. 2010-11-26 04:27:52 +00:00
Dean Camera 9f7883fa2b Added ability to write protect Mass Storage disk write operations from the host OS. 2010-11-26 04:16:47 +00:00