1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
Commit Graph

12 Commits

Author SHA1 Message Date
Stacey Sheldon
6bb4f0c61d leds: use boot-time config for PiOS LED layer
LEDs are now configured based on a board-specific initialization
in PIOS_BOARD_Init().

LEDs are now named:
  PIOS_LED_HEARTBEAT
  PIOS_LED_ALARM
2012-01-22 18:22:59 -05:00
Stacey Sheldon
a51bf72bc7 usb: allow runtime selection of USB descriptors via hwsettings 2012-01-14 14:28:15 -05:00
Stacey Sheldon
2d27c54d48 com_msg: Create new message based COM layer for bootloaders
The main purpose of this new COM implementation is that it is
much simpler, and requires less code space.  This takes a bit
of the pressure off of the CC bootloader which was right at
the limit of available code space in the bootloader partition.

This is not intended to ever be used by the application.

This driver also formalizes the assumptions in the bootloader's
usage of the COM layer.  All messages are assumed to arrive
in atomic chunks from the HID layer.
2012-01-14 14:23:18 -05:00
Stacey Sheldon
b94f4b49a4 usb: major refactoring of USB descriptors, CDC and HID
Summary of changes:
 * USB CDC and HID drivers are completely split apart.
   * This will allow different max buffer sizes for HID and CDC.
 * USB descriptors have been overhauled:
   * Proper structs/macros/enums declared for USB (see pios_usb_defs.h)
   * Two common descriptor definitions.  One for HID+CDC another for HID only.
     See pios_usb_desc_{hid_cdc,hid_only}.c for details.
   * Long standing bugs in OP USB descriptors became much more obvious with the
     new struct definitions.
   * Board specific USB initialization is now in pios_usb_board_data.h in each build target.
   * Definition of USB descriptors is now entirely indpendent of STM32 libs.
     Glue into STM32 libs is provided by pios_usbhook.c.
 * Removed a lot of stale/irrelevant USB #defines throughout the tree.
 * Improved naming consistency throughout USB code:
   * PIOS_USB_HID_* now refers to the HID endpoint code.
   * PIOS_USB_CDC_* now refers to the CDC endpoint code.
   * PIOS_USB_* now refers to the low-level USB code.
   * PIOS_USB_BOARD_* now refers to board-specific USB data
   * PIOS_USBHOOK_* is glue between PIOS and STM32 USB libs.
   * struct usb_* and enum usb_* and USB_* and HID_* are all types from the USB spec.
 * Shrunk the buffer size on the CDC call mgmt endpoint to save some RAM.
 * Made a few more USB related variables static to save some RAM.
2012-01-02 14:27:06 -05:00
Stacey Sheldon
eebdda6276 usb cdc: make HID/CDC configurable in hwsettings 2011-12-30 23:05:34 -05:00
Stacey Sheldon
c0259dc616 usb cdc: USB composite device with HID + VCP 2011-12-30 23:05:33 -05:00
Stacey Sheldon
c2fb0d8b43 com: allow run-time allocation of buffers 2011-07-29 15:33:14 -04:00
Stacey Sheldon
5f8760a55c com: Move buffering out of USART/HID layer and into COM layer
This allows the spektrum and sbus receiver drivers to bind
directly to the usart layer using a properly exported API
rather than overriding the interrupt handler.

Bytes are now pushed directly from the usart layer into the
com layer without any buffering.  The com layer performs all
of the buffering.

A further benefit from this approach is that we can put all
blocking/non-blocking behaviour into the COM layer and not
in the underlying drivers.

Misc related changes:
 - Remove obsolete .handler field from irq configs
 - Adapt all users of PIOS_COM_* functions to new API
 - Fixup callers of PIOS_USB_HID_Init()
2011-07-27 19:45:38 -04:00
zedamota
1cc152b4dd More cleaning, moved stopwatch files to library folder, code formatting. 2011-04-29 20:48:13 +01:00
stac
3b34cc71b4 bl_pipxtreme: bind to new COM driver
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2789 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-02-14 01:17:42 +00:00
zedamota
ad0b3e911d OP-268/PipX Bootloader - Changed Timers for MD device, auto memory space fetching (as per people request ;)). Stripped unused functions to reduce size.
TESTED WORKS.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2431 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-14 15:33:24 +00:00
zedamota
301d9cddfc OP-268/PipX Bootloader - Trunk integration of Edouard's work.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2399 ebee16cc-31ac-478f-84a7-5cbb03baadba
2011-01-13 15:57:30 +00:00