Stacey Sheldon
dff43d5156
board_info: add guard for multiple includes of .h file
2012-05-22 21:50:53 -04:00
Stacey Sheldon
dab400c80d
usb: decouple "available" from "cable connected"
...
The bootloader needs to understand whether the USB cable
is connected. The HID and CDC drivers need to know if
the cable is connected _and_ the device has been enumerated
already. Separate these two concepts in the API.
Combining these was resulting in the BL not properly
detecting that the cable was plugged in, and trying to boot
the firmware image immediately. This effectively bricked
the board if you ever had an invalid firmware image.
It also happens to be the case that the BU images automatically
invalidate themselves after updating the BL so they don't run
again. The cable detect bug + this intended behaviour of the
BU image resulted in a bricked board after upgrading the BL.
2012-05-22 00:21:24 -04:00
Stacey Sheldon
698ea8e86e
usb util: Add common utility functions for USB descriptors
...
Make a home for generic functions related to USB.
2012-05-19 16:14:10 -04:00
Stacey Sheldon
3e0a9bc47e
usb: Change supported LANGID in USB descriptor to be English US
...
Some versions of Windows will ignore the USB device serial number
if the string is not delivered with LANGID = English US 0x0409.
This is true regardless of the configured locale of the machine.
2012-05-19 16:12:34 -04:00
Stacey Sheldon
b905607dc7
serial: use defines for serial number lengths
...
Use #defined sizes for returned serial number lengths instead
of hard-coded values.
2012-05-19 16:06:48 -04:00
James Cotton
3f63051df8
PiOS ADC: This could still use a lot of cleanup and needs to be implemented in
...
the non-FreeRTOS case but now the ADC device is allocated dynamically which
means CC3D won't waste heap on it.
2012-05-01 11:11:31 -05:00
James Cotton
d7cb232315
Add MPU6000 accel range to config structure. Also put in correct values.
2012-04-03 02:07:04 -05:00
James Cotton
a960f3d07e
Switch the MPU6000 driver to using a FreeRTOS queue. Need to update Revo code
...
to take advantage of this.
2012-04-03 02:07:03 -05:00
Stacey Sheldon
c854c3f4a4
usbhook: add support in API for deactivating USB
2012-03-07 19:53:17 -05:00
Stacey Sheldon
fdf54ab86c
hid: fix response to HID descriptor
...
HID driver was incorrectly giving back the HID interface
descriptor when asked for the HID descriptor. This should
let OP boards interact better with generic HID layer drivers
and also gives us nicer output in lsusb once the HID descriptor
is read.
2012-03-07 19:52:54 -05:00
James Cotton
f20e5da9ed
Merge branch 'next' into revolution
...
Conflicts:
ground/openpilotgcs/src/plugins/config/config.pro
ground/openpilotgcs/src/plugins/config/configrevowidget.h
ground/openpilotgcs/src/plugins/scope/scopegadgetwidget.cpp
2012-03-03 11:41:41 -06:00
James Cotton
e3df261213
Merge branch 'stac/revo-usb' into revolution
...
Conflicts:
flight/Revolution/System/pios_board.c
2012-03-02 13:00:13 -06:00
James Cotton
d018d93e88
Clean up previous commit a bit and make the sampling rate a variable (and adapt
...
the sampling time accordingly).
2012-02-13 01:49:54 -06:00
Stacey Sheldon
e2939dae2a
revo usb: Add support for USB to Revo
2012-02-07 02:25:31 -05:00
Brian Webb
a314604f9b
Added failsafe to GCS Receiver device.
2012-02-02 19:59:42 -07:00
James Cotton
ad3d470f40
Flashfs and Flash: Add new function to write a series of blocks in one flash
...
write transaction to improve efficieny.
2012-01-26 12:39:35 -06:00
James Cotton
4fc907ad0d
Add a transaction semaphore to flash and flashfs to make sure multiple saves
...
or loads can't be attempted between threads
2012-01-26 11:36:07 -06:00
James Cotton
205aabe895
L3GD20: Make this sensor push data onto a FreeRTOS queue so that the sensor
...
reading task can block according. Also now the gyro data is sent to
stabilization multiple times per update of the attitude loop.
2012-01-25 01:20:07 -06:00
James Cotton
0da20bb846
Flash: Because most of the commands are a JEDEC standard rename this file
...
pios_flash_jedec and abstract out the methods that can vary between chips.
2012-01-25 00:23:24 -06:00
James Cotton
a02cad6f52
Flashfs: Separate out the sector sizes and magic values into a runtime
...
configurable structure. This makes it easier to deal with different chip
layouts.
2012-01-24 23:56:59 -06:00
James Cotton
5ad37e691c
USB: Update the USB configuration structure to include the GPIO that is used
...
for sensing and then load different config for CC and CC3D. Updated the
bootloader as well. Also changed the PIOS_USB_CheckAvailability function to
only return the sense signal and not the transfer_possible flag as this is not
set in time for the bootloader on CC3D for some reason.
2012-01-24 22:15:43 -06:00
James Cotton
104c091590
Correct the range constants for the L3GD20 driver
2012-01-24 19:48:14 -06:00
James Cotton
a25d52785b
Change the bus speed for the L3GD20 to 10MHz and some small cleanups
2012-01-24 19:17:49 -06:00
James Cotton
c9263cb8c0
L3GD20: Dynamically allocate buffer structure when used
2012-01-24 15:51:38 -06:00
James Cotton
8c208412c9
Give the BMA180 a dynamically allocated device structure and also make it
...
properly bind to a SPI and slave number. Temporarily reducing spi bus to
slowest possible speed.
2012-01-24 14:38:00 -06:00
James Cotton
c242ab8b86
Merge branch 'next' into revolution3
...
Conflicts:
flight/AHRS/ahrs.c
flight/AHRS/pios_board.c
flight/Bootloaders/Revolution/Makefile
flight/CopterControl/System/pios_board.c
flight/INS/pios_board.c
flight/OpenPilot/Makefile
flight/OpenPilot/System/openpilot.c
flight/OpenPilot/System/pios_board.c
flight/PiOS/Boards/STM32103CB_CC_Rev1.h
flight/PiOS/Boards/STM32F4xx_Revolution.h
flight/Revolution/Makefile
flight/Revolution/System/inc/pios_config.h
flight/Revolution/test.c
2012-01-24 10:46:35 -06:00
James Cotton
66293a9788
Merge remote-tracking branch 'origin/stac/led-boottime-config' into next
2012-01-24 10:38:33 -06:00
James Cotton
4d3af7afbf
Add ID test to ADXL345
2012-01-24 09:23:12 -06:00
James Cotton
11471ff68b
Update drivers for CC to the new EXTI system and SPI calls
2012-01-24 09:23:12 -06:00
James Cotton
aaf1c5dfdd
Update the F1 SPI library to support multiple NSS lines
2012-01-23 23:27:02 -06:00
James Cotton
2524662475
Copy the BMP085 back from next
2012-01-23 16:58:07 -06:00
James Cotton
9a12299074
Update the driver cfg structures for the EXTI changes. Make the drivers call
...
the pios_exti_init instead of their individual implementations.
2012-01-23 16:55:52 -06:00
James Cotton
c84240e485
Merge branch 'next' into revolution3
...
Conflicts:
flight/PiOS/STM32F10x/pios_bmp085.c
flight/PiOS/STM32F10x/pios_exti.c
2012-01-23 06:51:30 -06:00
Stacey Sheldon
bfe6676eed
exti: rewrite exti layer to improve portability
...
The exti layer now allows drivers to register interrupt callbacks
during board initialization. All details of the driver using a
particular EXTI pin have been removed from the EXTI layer so it
can now be used on any board without board-specific modification.
This includes some nice refinements provided by Mike Smith during
initial review. His original commits have been squashed into this
one.
2012-01-22 23:23:41 -05:00
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
James Cotton
e505de7ba0
Remove redundant remap field from merge
2012-01-21 13:22:00 -06:00
James Cotton
838370b3a4
Fix calls to backup registers on F4
2012-01-21 13:21:37 -06:00
James Cotton
bb0bfe0ae4
Merge branch 'next' into revolution3
...
Conflicts:
flight/Bootloaders/CopterControl/Makefile
flight/Bootloaders/PipXtreme/Makefile
flight/Bootloaders/Revolution/inc/pios_config.h
flight/CopterControl/Makefile
flight/INS/inc/pios_config.h
flight/Libraries/taskmonitor.c
flight/Modules/Altitude/altitude.c
flight/Modules/Attitude/attitude.c
flight/OpenPilot/Makefile
flight/OpenPilot/Makefile.posix
flight/OpenPilot/System/inc/pios_usb_board_data.h
flight/OpenPilot/System/inc/taskmonitor.h
flight/OpenPilot/System/pios_board.c
flight/OpenPilot/System/taskmonitor.c
flight/PiOS/Boards/STM32F4xx_Revolution.h
flight/PiOS/STM32F4xx/pios_bmp085.c
flight/PiOS/STM32F4xx/pios_iap.c
flight/PiOS/pios.h
flight/Revolution/System/inc/pios_config.h
flight/Revolution/System/inc/taskmonitor.h
flight/Revolution/System/taskmonitor.c
ground/openpilotgcs/src/plugins/serialconnection/serialplugin.cpp
shared/uavobjectdefinition/systemalarms.xml
shared/uavobjectdefinition/taskinfo.xml
2012-01-21 11:27:03 -06:00
James Cotton
ff0bd87f4e
PIOS SPI: Add a second claim bus method for use in ISR. This has no timeout
...
and uses an ISR safe queue claiming method. This avoids deadlocks when ISR
blocks other tasks from freeing the bus.
2012-01-21 09:07:06 -06:00
James Cotton
1e8811362e
On revolution attach the flash chip to the accel bus now. Also extended the
...
flash chip driver to take in the slave number during initialization so this is
no longer a hardcoded option.
2012-01-20 07:37:47 -06:00
Stacey Sheldon
64202ce092
Merge remote-tracking branch 'origin/stac/i2c_decoupling' into next
2012-01-17 22:35:36 -05:00
James Cotton
1b5e776dc5
Hardcoded scale for now since it isn't picking up from the cfg structure.
2012-01-17 19:53:20 -06:00
Stacey Sheldon
bffb184b7a
usb: add standard boilerplate to new files
2012-01-16 21:32:52 -05:00
Stacey Sheldon
ec6d550225
i2c: allow i2c adapters to remap pin functions
...
Allows us to support more complex pin configurations
for i2c.
2012-01-14 15:38:55 -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
James Cotton
ebbe1bd497
Some beginning work on the l3gd20 driver
2012-01-08 09:07:07 +01:00
James Cotton
cc47520baa
Checking ID on ST gyro works
2012-01-04 23:23:42 -06:00
James Cotton
0cc18e7dcf
Add files for new L3DG20 sensor
2012-01-04 20:33:54 -06:00
James Cotton
0da6109871
Update the F4 copyright headers to 2012
2012-01-04 19:29:29 -06:00