Dean Camera [Mon, 12 Jul 2010 07:11:50 +0000 (07:11 +0000)]
Reduce prescaler of the flush timer in the USBtoSerial demo, so that buffer overruns will not occur regardless of hardware and baud rate settings.
Dean Camera [Mon, 12 Jul 2010 07:04:19 +0000 (07:04 +0000)]
Alter the ring buffer library headers to have both atomic and non-atomic insertion/removal routines. Modify the existing projects so that buffer operations performed in an ISR use the shorted non-atomic versions, as they are already performed in a blocking ISR.
Alter USBtoSerial demo so that it does not enter a blocking loop to send data from the USB to the USART, as this can cause dropped bytes in the reception code if large amounts of data are sent in both directions at the same time. Added a flush timer to the USBtoSerial code for the USART to USB interface, so that multiple bytes can be sent in the same USB packet.
Dean Camera [Mon, 12 Jul 2010 02:23:11 +0000 (02:23 +0000)]
Add glitch protection to the software UART in the XPLAINBridge project code, so that very short glitches on the RX line don't cause a frame reception to occur.
Dean Camera [Sun, 11 Jul 2010 14:14:08 +0000 (14:14 +0000)]
Major changes to the XPLAINBridge software UART code for performance and reliability. New code reduces the number of missed characters and misread characters.
Dean Camera [Sun, 11 Jul 2010 08:11:25 +0000 (08:11 +0000)]
Correct misspellings in the Bluetooth demo code.
Dean Camera [Sun, 11 Jul 2010 07:59:15 +0000 (07:59 +0000)]
Add more doxygen function documentation to the RFCOMM layer.
Dean Camera [Sun, 11 Jul 2010 07:38:18 +0000 (07:38 +0000)]
Oops - ACL layer Bluetooth_SendPacket() function should check and allow NULL channels, since that indicates a control channel request.
Fix up Doxgen documentation for the Bluetooth stack code.
Dean Camera [Sun, 11 Jul 2010 07:29:27 +0000 (07:29 +0000)]
Rename Bluetooth stack function parameters to clearly indicate what sort of Bluetooth channel (ACL, RFCOMM) is required for each parameter, to make the code easier to read.
Add a new RFCOMM_ChannelSignalsReceived() Bluetooth stack callback from the RFCOMM layer for when the remote device sends new terminal control signals.
Fix RFCOMM_SendData() not aborting correctly when the requested RFCOMM channel is not found.
Dean Camera [Fri, 9 Jul 2010 07:44:08 +0000 (07:44 +0000)]
Oops - fix errors in the MassStorageKeyboard SCSI driver file due to incorrect copy/paste.
Dean Camera [Fri, 9 Jul 2010 07:24:34 +0000 (07:24 +0000)]
Rewrote the implementation of the SwapEndian_16() and SwapEndian_32() functions so that they compile down in most instances to minimal loads and stores rather than complicated shifts.
Fixed SCSI.c implementations of all the demos/projects casting the block count to a 32-bit temporary before calling SwapEndian_16().
Dean Camera [Thu, 8 Jul 2010 08:48:52 +0000 (08:48 +0000)]
Add a new RFCOMM_ChannelOpened() callback event for when logical RFCOMM channels are opened in the BluetoothHost demo. Make the demo echo back sent characters to the remote device.
Dean Camera [Thu, 8 Jul 2010 08:05:14 +0000 (08:05 +0000)]
Add a new RFCOMM service callback for when new data has been received on a valid RFCOMM channel.
Dean Camera [Thu, 8 Jul 2010 07:44:07 +0000 (07:44 +0000)]
Move out Bluetooth stack callback functions to a seperate BluetoothEvents.c/.h set of files for clarity in the Incomplete BluetoothHost demo. Add a new stack callback for opened ACL channels, make the demo save the RFCOMM channel when opened so that it does not have to search for it on each iteration of the main program loop.
Dean Camera [Tue, 6 Jul 2010 07:07:54 +0000 (07:07 +0000)]
Make main readme file easier to read, and make documentation build instructions clearer.
Dean Camera [Sun, 4 Jul 2010 14:31:18 +0000 (14:31 +0000)]
Improve commenting of the Dataflash stub board driver file, to prevent confusion of what the dataflash selection masks need to be. Update stub driver to automatically interleave data between the chips if two Dataflash chips are present.
Dean Camera [Fri, 2 Jul 2010 03:37:19 +0000 (03:37 +0000)]
Added new Drivers/USB/LowLevel/Device.c file to house Device mode specific functions that are more complicated than simple macros. Moved USB_Device_SendRemoteWakeup() to the new Device.c source file and corrected it to unfreeze and restart the USB controller clock before issuing a Remote Wakeup request.
Removed the USB_Device_IsRemoteWakeupSent() and USB_Device_IsUSBSuspended() macros, as they are now obsolete.
Dean Camera [Fri, 2 Jul 2010 03:06:16 +0000 (03:06 +0000)]
Move out RFCOMM channel structure init code to a seperate routine, to save on compiled code space and to prevent copy-paste errors.
Dean Camera [Tue, 29 Jun 2010 04:40:02 +0000 (04:40 +0000)]
Add RFCOMM service routine, to send pending configuration requests on RFCOMM channels. Add in RFCOMM channel config flags, to determine which configuration commands have been sent and received.
Add a new RFCOMM_SendChannelSignals() function to transmit a change in V24 terminal handshake lines to the receiving device.
Prevent SABM packets sent to the control DLCI in the RFCOMM layer from creating a new channel entry, as the control DLCI does not have connection data associated with it.
Fix up MSC control packet handling so that received responses can be acknowledged correctly, so that the RFCOMM layer can record when the receiving device has ACKed a sent change in V24 terminal handshake lines.
Dean Camera [Sat, 26 Jun 2010 15:07:13 +0000 (15:07 +0000)]
Make Bluetooth ACL channel searches skip over closed (invalid) channels. RFCOMM channels are considered invalid when the channel state is closed, not when the DLCI is zero - fix incorrect code.
Dean Camera [Fri, 25 Jun 2010 13:28:34 +0000 (13:28 +0000)]
Add default "all" makefile targets to the demo tree makefiles.
Dean Camera [Fri, 25 Jun 2010 13:19:05 +0000 (13:19 +0000)]
Make loops in AVRISP-MKII Clone project's XPROG protocol infinite rather than looping on the timeout value, as this is already checked inside the loop anyway.
Dean Camera [Fri, 25 Jun 2010 09:49:46 +0000 (09:49 +0000)]
Fix Doxygen formatting of parameters for the CALLBACK_HID_Device_CreateHIDReport() function in the ClassDriver HID device demos.
Dean Camera [Thu, 24 Jun 2010 08:12:27 +0000 (08:12 +0000)]
Make XPLAINBridge serial bridge much more reliable for the reception of characters from the XMEGA through the software UART interface.
Dean Camera [Thu, 24 Jun 2010 07:42:18 +0000 (07:42 +0000)]
Maximise the size of the ring buffers in the Benito/XPLAINBridge/USBtoSerial projects, so that they should never become full under normal conditions.
Dean Camera [Wed, 23 Jun 2010 08:10:21 +0000 (08:10 +0000)]
Split RFCOMM channel signals into Remote and Local pairs. Use memcpy() to copy over data from the command parameters to the RFCOMM response parameters.
Ensure that only the valid parameter bytes are sent back in response to MSC commands.
Dean Camera [Wed, 23 Jun 2010 07:17:47 +0000 (07:17 +0000)]
Add TEST RFCOMM command handler. Remove the RFCOMM channel UseUIFrame element, as the Bluetooth adaptions to RFCOMM only allow UIH frames to be used.
Dean Camera [Tue, 22 Jun 2010 07:55:02 +0000 (07:55 +0000)]
Use a bitmask instead of an array of bools in the SDP UUID List matching algorithm to reduce the compiled code size and stack used.
Dean Camera [Tue, 22 Jun 2010 07:06:27 +0000 (07:06 +0000)]
Added new pgm_read_ptr() macro to Common.h for reading of pointers out of flash memory space.
Added new SWAPENDIAN_16() and SWAPENDIAN_32() macros to Common.h for statically initialized variables at compile time.
Dean Camera [Mon, 21 Jun 2010 13:39:56 +0000 (13:39 +0000)]
Moved calls to V2Params_UpdateParamValues() out of the main AVRISP-MKII and XPLAINBridge project loops and into the AVRISP management function.
Dean Camera [Thu, 17 Jun 2010 09:17:09 +0000 (09:17 +0000)]
Fixed broken PDI EEPROM Section Erase functionality in the AVRISP-MKII project.
Dean Camera [Thu, 17 Jun 2010 08:15:58 +0000 (08:15 +0000)]
Renamed SERIAL_STREAM_ASSERT() macro to STDOUT_ASSERT().
Minor tweaks to the library documentation.
Dean Camera [Wed, 16 Jun 2010 11:46:42 +0000 (11:46 +0000)]
Fix compile and Doxygen errors due to the spell-check changes in the source code.
Dean Camera [Wed, 16 Jun 2010 11:01:01 +0000 (11:01 +0000)]
Spell check code and manual pages. Remove custom Doxygen CSS stylesheet, as the new 1.7 Doxygen's default stylesheet is much better.
Dean Camera [Tue, 15 Jun 2010 11:28:15 +0000 (11:28 +0000)]
Rename RFCOMM_GetFrameDataLength() to RFCOMM_GetVariableFieldValue() as it is multi-purpose, and modify it to move the buffer pointer itself rather than relying on the caller.
Make RFCOMM_GetChannelData() return NULL if the required channel DLCI is found, but the channel is closed.
Add modem signals (BREAK, DCD, etc.) to the channel state array, and add in a handler for the Modem Status RFCOMM control command.
Dean Camera [Tue, 15 Jun 2010 10:09:42 +0000 (10:09 +0000)]
Changed the RFCOMM-specific ItemProtocolChannel_t type to a more generic ItemProtocol_8BitParam_t name, and added a new ItemProtocol_16BitParam_t to the SDP protocol type defines.
Dean Camera [Tue, 15 Jun 2010 09:32:35 +0000 (09:32 +0000)]
Add RFCOMM channel configuration parsing and channel states to the incomplete BluetoothHost demo.
Add missing BT_* prefix to the Bluetooth stack's channel state enum values.
Dean Camera [Tue, 15 Jun 2010 03:40:02 +0000 (03:40 +0000)]
Fix HID parser documentation for the default maximum report/path/etc. elements so that it matches the current code values.
Dean Camera [Tue, 15 Jun 2010 03:34:55 +0000 (03:34 +0000)]
Change over Doxygen \note documentation to \pre where applicable.
Dean Camera [Mon, 14 Jun 2010 11:58:23 +0000 (11:58 +0000)]
Update TemperatureDataLogger and Webserver projects to the latest FATFS library version.
Dean Camera [Sun, 13 Jun 2010 13:21:35 +0000 (13:21 +0000)]
Split out the RFCOMM Control Channel command processing code into a seperate set of files for clarity.
Dean Camera [Sun, 13 Jun 2010 12:44:20 +0000 (12:44 +0000)]
Rename the incomplete Bluetooth Host demo's ServiceDiscoveryProtocol.c/.h files to SDP.c/.h. Fix compile errors in RFCOMM.c/.h.
Dean Camera [Sun, 13 Jun 2010 12:37:16 +0000 (12:37 +0000)]
More RFCOMM layer additions - begin to add multiplexer channel state variables.
Dean Camera [Sat, 12 Jun 2010 08:52:44 +0000 (08:52 +0000)]
Oops - temp code left in the XPLAINBridge project which prevented it from entering programmer mode.
Dean Camera [Sat, 12 Jun 2010 08:39:12 +0000 (08:39 +0000)]
Slight improvements to the reliability of the software UART in the XPLAINBridge project.
Dean Camera [Sat, 12 Jun 2010 07:03:22 +0000 (07:03 +0000)]
Minor fixes to demos to add in some missing comments, printf() formatting. Make incomplete Bluetooth demo indicate connections visually via the board LEDs.
Dean Camera [Sat, 12 Jun 2010 07:01:18 +0000 (07:01 +0000)]
Speed up calls to Pipe_IsPipeBound() by immediately skipping unconfigured pipes, rather than performing token check first.
Dean Camera [Thu, 10 Jun 2010 01:30:32 +0000 (01:30 +0000)]
Oops - light weight ring buffer documentation used \ref instead of \param to document function parameters.
Dean Camera [Thu, 10 Jun 2010 01:26:10 +0000 (01:26 +0000)]
Add missing documentation to the lightweight ring buffer code in the XPLAINBridge project.
Dean Camera [Tue, 8 Jun 2010 14:47:17 +0000 (14:47 +0000)]
Update main library makefile with missing source files for the "clean" rule.
Dean Camera [Tue, 8 Jun 2010 11:14:07 +0000 (11:14 +0000)]
Add missing ATTR_NON_NULL_PTR_ARG and ATTR_ALWAYS_INLINE attributes to class driver functions.
Dean Camera [Tue, 8 Jun 2010 09:13:11 +0000 (09:13 +0000)]
Add Mecurial repository mirror link to the library documentation.
Dean Camera [Mon, 7 Jun 2010 13:39:34 +0000 (13:39 +0000)]
Add stub RFCOMM command handlers. Move out RFCOMM frame length and data pointer calculations to the master RFCOMM frame reception routine, instead of inside each frame type handler function.
Dean Camera [Mon, 7 Jun 2010 12:53:47 +0000 (12:53 +0000)]
More RFCOMM layer implementation - fix FCS calculation, add in start of control channel command processing.
Dean Camera [Mon, 7 Jun 2010 09:07:18 +0000 (09:07 +0000)]
Make the RFCOMM_SendFrame() function correctly generate frames from the input parameters, change addressing to use the raw DLCI address plus flags.
Dean Camera [Sun, 6 Jun 2010 14:39:51 +0000 (14:39 +0000)]
Refactor out RFCOMM packet send code into a seperate function.
Dean Camera [Sun, 6 Jun 2010 14:03:56 +0000 (14:03 +0000)]
Fix incorrect copyright attribution on the class-driver keyboard demos due to header copy-pasting.
Dean Camera [Sun, 6 Jun 2010 13:49:50 +0000 (13:49 +0000)]
Document lightweight ring buffer header files.
Dean Camera [Sun, 6 Jun 2010 08:33:14 +0000 (08:33 +0000)]
Add the svn:eol-style property onto new files which where missing it to ensure uniform line endings.
Dean Camera [Fri, 4 Jun 2010 06:25:12 +0000 (06:25 +0000)]
Document Bluetooth files with overall file Doxygen comments. Add more initial RFCOMM layer code to receive and respond to SABM packets.
Dean Camera [Thu, 3 Jun 2010 15:58:22 +0000 (15:58 +0000)]
Fixed incorrect function references in the Mass Storage Class driver documentation.
Dean Camera [Thu, 3 Jun 2010 15:55:28 +0000 (15:55 +0000)]
More documentation fixes.
Dean Camera [Thu, 3 Jun 2010 15:32:45 +0000 (15:32 +0000)]
Minor documentation cleanups.
Dean Camera [Thu, 3 Jun 2010 12:45:15 +0000 (12:45 +0000)]
Start implementation of RFCOMM decoding layer. Add new service initialize routines for each Bluetooth service - currently unused, but will eventually reset the service state of RFCOMM when a new connection is made.
Dean Camera [Thu, 3 Jun 2010 08:42:20 +0000 (08:42 +0000)]
Delay needed in bluetooth code due to the send function not waiting for the pipe bank to become ready before writing. Add in a call to Pipe_WaitUntilReady() to fix the issue.
Dean Camera [Thu, 3 Jun 2010 08:33:01 +0000 (08:33 +0000)]
Extra protocol value in the RFCOMM protocol is the channel number, not the PSM - update typedef name and size.
Add delay to the Connection Request signal processing routine - without this, the host will not create the RFCOMM channel correctly. Need to investigate why this delay is needed.
Dean Camera [Thu, 3 Jun 2010 07:45:09 +0000 (07:45 +0000)]
Add PSM value to the RFCOMM service so that the host knows what PSM to use on channels when trying to access it.
Dean Camera [Thu, 3 Jun 2010 03:58:57 +0000 (03:58 +0000)]
Add start of RFCOMM service layer to the incomplete BluetoothHost demo.
Reduce the size of the attribute search list from 15 ranges to 8 to save RAM.
Dean Camera [Wed, 2 Jun 2010 15:44:48 +0000 (15:44 +0000)]
Oops - descriptor pointer should be assigned, not incremented with the new type-safe code.
Dean Camera [Wed, 2 Jun 2010 15:28:07 +0000 (15:28 +0000)]
Better fix to avoid void pointer arithmetic in ConfigDescriptor.h to regain C++ compatibility (thanks to Michael Hennebry).
Dean Camera [Wed, 2 Jun 2010 14:49:06 +0000 (14:49 +0000)]
Fix byte ordering of UUIDs in the SDP server - host can now successfully pair to the Bluetooth device and discover the exposed Serial Port Profile RFCOMM service.
Dean Camera [Wed, 2 Jun 2010 07:05:34 +0000 (07:05 +0000)]
The SDP UUID lists should be searched and ALL UUIDs matched for a record to be retrieved, not partial matches. Change the SDP code so that the entire list must be matched against a service attribute table's contents before it is returned.
Change matching algorithm so that it recursively searches through the entire attribute table, and not just pre-specified sequence attributes.
Add browse lists and proper descriptions to the Serial Port service.
Dean Camera [Wed, 2 Jun 2010 04:36:46 +0000 (04:36 +0000)]
Add L2CAP service attribute table. Fix up ProtocolDescriptorList attributes, and add macros for used UUIDs to reduce typing and make the code easier to read.
Dean Camera [Tue, 1 Jun 2010 14:05:47 +0000 (14:05 +0000)]
Clean up the Service tables, add incomplete ProtocolDescriptorList attribute to the SDP service.
Dean Camera [Tue, 1 Jun 2010 13:11:55 +0000 (13:11 +0000)]
Remove incorrect Language ID offset attribute from the SDP server - client assumes 0x0100 offset for primary language anyway, and the format of the offset was incorrect anyway.
Dean Camera [Tue, 1 Jun 2010 12:34:48 +0000 (12:34 +0000)]
Service Attribute SDP requests should have only one Data Element Sequence container around the single service's retrieved attributes, not two.
Dean Camera [Tue, 1 Jun 2010 11:38:07 +0000 (11:38 +0000)]
Document inline SDP data read/write functions.
Dean Camera [Tue, 1 Jun 2010 11:07:29 +0000 (11:07 +0000)]
Much faster attribute range lookup - look through short list of attributes and compare to range, rather than looking up by each possible value within the range.
Cleanups to SDP code. Add missing RFCOMM language base ID offset attribute. Fix incorrect definition of the SWAPENDIAN_32() macro.
Dean Camera [Tue, 1 Jun 2010 04:22:20 +0000 (04:22 +0000)]
Fix the encoding of UUIDs in the SDP server so that they match the Bluetooth UUID format properly.
Dean Camera [Tue, 1 Jun 2010 03:07:05 +0000 (03:07 +0000)]
Move SDP service tables out into a new set of files, to make the SDP service code cleaner.
Dean Camera [Tue, 1 Jun 2010 02:54:53 +0000 (02:54 +0000)]
Add Service Attribute request processing to the SDP server code.
Dean Camera [Mon, 31 May 2010 14:08:15 +0000 (14:08 +0000)]
Fix endianness issues in the Service Discovery Protocol service of the incomplete Bluetooth Host demo. Host can now correctly retrieve specific services, however Windows does not appear to be sending the appropriate generic browse class IDs needed to report the virtual serial service.
Dean Camera [Mon, 31 May 2010 06:55:23 +0000 (06:55 +0000)]
Remove void* arithmetic in the USB_GetNextDescriptor() static inline function, to make the header file C++ compatible once again. Implement workaround for an obscure GCC bug which can cause incorrect code generation under some circumstances when the void* is re-cast.
Dean Camera [Sun, 30 May 2010 14:01:41 +0000 (14:01 +0000)]
Small tweaks to ConfigDescriptor.c/.h to ensure pointers use the correct type, and to remove const attribute from the descriptor comparator callback function pointer type define, and into the function prototype instead.
Dean Camera [Sun, 30 May 2010 07:29:18 +0000 (07:29 +0000)]
Fixed internal device serial not being accessible on the ATMEGAXXU2 AVRs (thanks to Axel Rohde).
Dean Camera [Sat, 29 May 2010 08:08:26 +0000 (08:08 +0000)]
Fix spacing of the function parameter descriptions in the Doxygen documentation.
Dean Camera [Sat, 29 May 2010 07:51:01 +0000 (07:51 +0000)]
Fixed incorrect signature for the ATMEGA32U2 in the DFU bootloader (thanks to Axel Rohde).
Partial fix to the Bluetooth SDP code - data should be encoded in big endian, not little endian.
Dean Camera [Thu, 27 May 2010 10:36:21 +0000 (10:36 +0000)]
Added new VTARGET_REF_VOLTS and VTARGET_SCALE_FACTOR compile time defines to the AVRISP-MKII programmer project to set the VTARGET reference voltage and scale factor.
Fixed XPLAINBridge project not correctly reading the XMEGA's supply voltage when reporting back to the host.
Dean Camera [Wed, 26 May 2010 13:26:10 +0000 (13:26 +0000)]
Replace ring buffer library in Benito and USBtoSerial projects with the new lightweight ring buffer header to improve reliability.
Dean Camera [Wed, 26 May 2010 12:44:05 +0000 (12:44 +0000)]
Removed unused line encoding data and control requests from the CDC Bootloader code, to save space.
Dean Camera [Wed, 26 May 2010 12:24:44 +0000 (12:24 +0000)]
Switch to using the correct intptr_t type use where a pointer must be cast to an integer type.
Dean Camera [Wed, 26 May 2010 11:54:55 +0000 (11:54 +0000)]
The EEPROM stream read/write functions now use eeprom_update_byte() instead of eeprom_write_byte(), so that only changed bytes are written to EEPROM to preserve its lifespan.
Changed over the AVRISP-MKII and TemperatureDataLogger projects to use eeprom_update_byte() when writing non-volatile parameters to EEPROM to preserve its lifespan.
Dean Camera [Wed, 26 May 2010 08:10:35 +0000 (08:10 +0000)]
Add better documentation to the Software UART code in the XPLAINBridge project.
Dean Camera [Wed, 26 May 2010 07:51:25 +0000 (07:51 +0000)]
Switch software UART over to timer 1 and remove timer prescaling to try to prevent integer rounding errors and thus minimize the possible error of the UART code.
Dean Camera [Wed, 26 May 2010 07:35:27 +0000 (07:35 +0000)]
Rename software USART driver globals to make the code more in line with the rest of the XPLAINBridge project.
Dean Camera [Wed, 26 May 2010 06:59:55 +0000 (06:59 +0000)]
Make software USART used in the XPLAINBridge project directly check and store into the ring buffers, rather than polling from the main program loop to avoid added latency.
Dean Camera [Wed, 26 May 2010 06:35:02 +0000 (06:35 +0000)]
Create a new LightweightRingBuffer.h header file for the XPLAIN project to abstract out the new ring buffer without a performance penalty.
Dean Camera [Wed, 26 May 2010 06:15:05 +0000 (06:15 +0000)]
The RingBuff library code has been replaced in the XPLAINBridge project with an ultra lightweight buffer to help improve the reliability of the bridge.
Dean Camera [Tue, 25 May 2010 06:14:37 +0000 (06:14 +0000)]
Fixed RNDISEthernet demos crashing when calculating checksums for Ethernet/TCP packets of more than ~500 bytes due to an overflow in the checksum calculation loop (thanks to Kevin Malec).
Removed string Attributes from the Service Discovery Protocol code to minimise the potential points of failure while the base code is being debugged.
Dean Camera [Sun, 23 May 2010 13:15:19 +0000 (13:15 +0000)]
Add UUID Class matching to the Service Discovery Protocol code - SDP is now correctly matched against the generic Service Discovery Class UUID.
Dean Camera [Sun, 23 May 2010 08:39:02 +0000 (08:39 +0000)]
Remove obsolete entry from the Doxygen configuration files.