Commit Graph

187 Commits

Author SHA1 Message Date
Pat Hickey f9eff068f9 AP_HAL_AVR: UtilityStringTest added 2012-12-20 14:52:37 +11:00
Pat Hickey defc539e57 AP_HAL_AVR: implement string Utils in terms of existing vprintf 2012-12-20 14:52:37 +11:00
Pat Hickey b3abe89989 AP_HAL_AVR: add Util stubs 2012-12-20 14:52:37 +11:00
Pat Hickey 372c0074b1 AP_HAL_AVR: remove old style HAL_AVR classes (deprecated) 2012-12-20 14:52:37 +11:00
Andrew Tridgell b8843489be HAL_AVR: fixed example warnings 2012-12-20 14:52:36 +11:00
Pat Hickey eb530b86e8 move Arduino.mk to /mk/Arduino.mk 2012-12-20 14:52:35 +11:00
Pat Hickey 3153105682 AP_HAL_AVR: spi transaction handle null RX properly 2012-12-20 14:52:32 +11:00
Pat Hickey 4fe889c9c5 AP_HAL_AVR: Implement bulk SPI transaction 2012-12-20 14:52:32 +11:00
Pat Hickey 087b1fa196 AP_HAL_AVR: AnalogIn returns new ADCSource each time a channel is requested
* fixes a bug where multiple sources created as pin -1, then change to
  appropriate pin on mavlink messages. Make treat each creation as distinct
  object.
2012-12-20 14:52:32 +11:00
Pat Hickey 90670cb499 AP_HAL_AVR: panic in spidevice0 2012-12-20 14:52:31 +11:00
Pat Hickey 9656b0ad0e AP_HAL_AVR: add panic method to scheduler 2012-12-20 14:52:31 +11:00
Andrew Tridgell 7d27e420ae AP_HAL: remove unnecessary Arduino.h includes 2012-12-20 14:52:30 +11:00
Pat Hickey 07be511f5e AP_HAL_AVR: move AP_HAL_MAIN into separate header 2012-12-20 14:52:30 +11:00
Andrew Tridgell e10e3ee3be AP_HAL: fixed argv declaration to match getopt() 2012-12-20 14:52:29 +11:00
Andrew Tridgell 18824c7ef5 AP_HAL: expose argc/argv in hal.init()
used for SITL port
2012-12-20 14:52:29 +11:00
Pat Hickey f060df9747 AP_HAL_AVR: now that we can detect the APM revision, use wdt reboot on apm2 2012-12-20 14:52:28 +11:00
Andrew Tridgell 1342a82ba7 HAL_AVR: catch atomic nesting errors 2012-12-20 14:51:40 +11:00
Andrew Tridgell e57834d763 DataFlash: added SITL header 2012-12-20 14:51:40 +11:00
Andrew Tridgell 551ff0c8b8 AP_HAL_AVR: prevent build of AVR code on non-AVR platforms 2012-12-20 14:51:40 +11:00
Andrew Tridgell 562b6a20c9 AP_HAL_AVR: conditionally build AVR specific helper code 2012-12-20 14:51:38 +11:00
Pat Hickey 475da4eca4 CONFIG_HAL_BOARD - test sketches fixed up, build all passes 2012-12-20 14:51:37 +11:00
Pat Hickey 25e597d3b3 AP_HAL_AVR: Refactor APM1 and APM2 instances to use CONFIG_HAL_BOARD 2012-12-20 14:51:37 +11:00
Pat Hickey cb70590227 AP_HAL_AVR: remove Dataflash driver 2012-12-20 14:51:37 +11:00
Pat Hickey 00cd4b1857 AP_HAL_AVR: Do not init HAL's dataflash 2012-12-20 14:51:37 +11:00
Pat Hickey af852aa6a9 AP_HAL_AVR: init dataflash from HAL init 2012-12-20 14:51:35 +11:00
Pat Hickey 7f02993994 AP_HAL_AVR: less chatty Dataflash 2012-12-20 14:51:35 +11:00
Andrew Tridgell eb81a3934e HAL_AVR: removed extra min() define 2012-12-20 14:51:34 +11:00
Pat Hickey f9c8f93b37 AP_HAL_AVR: Dataflash APM2 does a better job detecting no df card 2012-12-20 14:51:34 +11:00
Andrew Tridgell aff1e56e82 AP_HAL: fixed AnalogIn example sketch 2012-12-20 14:51:34 +11:00
Pat Hickey 13f7bd1723 AP_HAL_AVR: AnalogIn supports read_average & read_latest 2012-12-20 14:51:34 +11:00
Pat Hickey f9e9b8a7ef AP_HAL_AVR: move scheduler's timer-hw dependent methods to a separate cpp 2012-12-20 14:51:34 +11:00
Andrew Tridgell d9f69923f2 HAL_AVR: fixed int types -> uint8_t 2012-12-20 14:51:34 +11:00
Andrew Tridgell 857c0b69e5 AP_HAL_AVR: fixed interrupt attach for MPU6000 2012-12-20 14:51:34 +11:00
Andrew Tridgell 31bb300f81 AP_HAL_AVR: fixed bounds check for rc input 2012-12-20 14:51:34 +11:00
Pat Hickey a79adcb7f4 AP_HAL_AVR: comment wibbles 2012-12-20 14:51:34 +11:00
Pat Hickey 8d97596ea0 AP_HAL_AVR: RCInput has overrides 2012-12-20 14:51:34 +11:00
Pat Hickey dfdc14f583 AP_HAL_AVR: Console uses only sized int types 2012-12-20 14:51:34 +11:00
Pat Hickey 2ee214ee36 AP_HAL_AVR: AnalogIn uses only sized int types 2012-12-20 14:51:33 +11:00
Pat Hickey 9455d4c297 AP_HAL_AVR: UARTDriver impl uses only sized int types 2012-12-20 14:51:33 +11:00
Pat Hickey ba07ae283f AP_HAL_AVR: sized ints in GPIO 2012-12-20 14:51:33 +11:00
Pat Hickey 765e2da8a7 AP_HAL_AVR: analog input fixed when ANALOG_INPUT_NONE
* need to provide new sample so we dont spin forever
2012-12-20 14:51:33 +11:00
Pat Hickey 2826a605ba AP_HAL_AVR: Dataflash debugging 2012-12-20 14:51:33 +11:00
Pat Hickey ff09314ab8 AP_HAL_AVR: SPI debugging 2012-12-20 14:51:33 +11:00
Pat Hickey d504db195e AP_HAL_AVR: add sei in defer timer process 2012-12-20 14:51:33 +11:00
Andrew Tridgell 0f3e30a0c3 HAL_AVR: fixed race condition in delay() 2012-12-20 14:51:33 +11:00
Pat Hickey 6218d7779f AP_HAL: expose DF_LOGGING_FORMAT to user 2012-12-20 14:51:33 +11:00
Pat Hickey 88f09d100a AP_HAL_AVR: fix implementation of delay in scheduler 2012-12-20 14:51:32 +11:00
Pat Hickey 0b7a55b9f6 AP_HAL_AVR: AnalogIn hack to make vcc read work
* needs improvment
2012-12-20 14:51:32 +11:00
Pat Hickey 6e45ce12b2 AP_HAL_AVR: implement reboot in scheduler
* still need to fix system io register inits to do it like bootloader would
2012-12-20 14:51:32 +11:00
Pat Hickey 04d7b5ffe4 AP_HAL_AVR: implement changes to AnalogIn 2012-12-20 14:51:32 +11:00
Pat Hickey 50b765616b AP_HAL_AVR: change uart0,1,2,3 to uartA,B,C 2012-12-20 14:51:32 +11:00
Pat Hickey 2244ac295c AP_HAL_AVR: improve RCInput documentation
copied directlyf rom AP_HAL header
2012-12-20 14:51:31 +11:00
Pat Hickey b89c45735b AP_HAL_AVR: provide 'int main (void)' impl as a macro
* avoid extra typing
* makes it HAL implementation specific
2012-12-20 14:51:31 +11:00
Pat Hickey a639f7c34f AP_HAL_AVR: rename FastSerial example to UARTDriver 2012-12-20 14:51:31 +11:00
Pat Hickey 52f6d67238 AP_HAL_AVR: add ArduPlaneLibs test sketch 2012-12-20 14:51:31 +11:00
Pat Hickey d47f77f8dd AP_HAL_AVR Scheduler: support nested atomic sections 2012-12-20 14:51:31 +11:00
Pat Hickey f543cede01 AP_HAL & AP_HAL_AVR: new SPI driver model 2012-12-20 14:51:31 +11:00
Pat Hickey 03eb5a1beb AP_HAL_AVR: gpio and scheduler renamed arduino to avr 2012-12-20 14:51:30 +11:00
Pat Hickey 2e32ec3013 AP_HAL_AVR GPIO: rename Arduino to be AVR 2012-12-20 14:51:30 +11:00
Pat Hickey 17b951c45b AP_HAL_AVR Scheduler: rename Arduino to be AVR 2012-12-20 14:51:30 +11:00
Pat Hickey b2c44d8a81 AP_HAL: move AP_Semaphore to be part of the HAL 2012-12-20 14:51:30 +11:00
Pat Hickey 5f48193ea0 AP_HAL_AVR analog in example: use new constant for board vcc, and vcc not vdd 2012-12-20 14:51:30 +11:00
Pat Hickey 0c3e59a307 AP_HAL_AVR: AnalogIn channels respect pins, obey NONE input, all common
* there's no need for separate APM1/APM2 classes, so that was eliminated
* single class only has special member for vcc. all others created by
  channel interface.
2012-12-20 14:51:30 +11:00
Pat Hickey b7c4cc20ac GPIO: optimized read, write, and mode for DigitalSource objects 2012-12-20 14:51:30 +11:00
Pat Hickey 47f555feac AP_HAL_AVR: I2CDriver increments lockup count on any error
tridge made these changes to the "I2c" lib in a3589f2956
2012-12-20 14:51:30 +11:00
Pat Hickey 93f6267334 AP_HAL_AVR: create ArduCopterLibs test sketch
* used to make sure all ArduCopter deps build
2012-12-20 14:51:30 +11:00
Pat Hickey c9541d3b00 AP_HAL: added begin_atomic and end_atomic to scheduler 2012-12-20 14:51:29 +11:00
Pat Hickey 87c55f68c2 AP_HAL_AVR Storage: conform to new API 2012-12-20 14:51:29 +11:00
Andrew Tridgell c5221c34a5 HAL_AVR: don't auto build PX4 stuff yet 2012-12-20 14:51:28 +11:00
Andrew Tridgell e9d41312ca HAL_AVR: automatically find tests to build 2012-12-20 14:51:28 +11:00
Pat Hickey a4f1f6a5db AP_Progmem: fix dependencies for all sketches touched by AP_HAL_AVR 2012-12-20 14:51:28 +11:00
Pat Hickey bae7e4b88e AP_HAL Scheduler: simplify register_timer_process, min time for delay cb 2012-12-20 14:51:27 +11:00
Andrew Tridgell 53105efbcd HAL_AVR: more uart0 -> console changes 2012-12-20 14:51:27 +11:00
Andrew Tridgell d133f15f57 HAL_AVR: use hal.console instead of hal.uart0 2012-12-20 14:51:27 +11:00
Andrew Tridgell ecd67ad79b HAL_AVR: added more build examples 2012-12-20 14:51:27 +11:00
Andrew Tridgell e663f5feab HAL_AVR: use ccache if available 2012-12-20 14:51:27 +11:00
Andrew Tridgell f269172d96 HAL_AVR: fixed build of remaining HAL_AVR examples 2012-12-20 14:51:27 +11:00
Andrew Tridgell 978c7ae329 HAL_AVR: added build_all.sh script 2012-12-20 14:51:27 +11:00
Andrew Tridgell 49e1f452e1 HAL_AVR: fixed I2C example build 2012-12-20 14:51:27 +11:00
Pat Hickey 1cd09be2fd AP_HAL_AVR: proper empty uart for APM1 vs APM2
* APM1 uses uart2 as a spi port (dataflash)
* APM2 uses uart3 as a spi port (dataflash)
2012-12-20 14:51:26 +11:00
Pat Hickey de81267bd5 AP_HAL_AVR: utility/vprintf.cpp fixed for avr-gcc 4.6 2012-12-20 14:51:26 +11:00
Pat Hickey 11bf533c57 AP_HAL_AVR: implement GPIO::attach_interrupt just for interrupt 6 2012-12-20 14:51:26 +11:00
Pat Hickey d422ab7806 AP_HAL: Extend Scheduler to support defered timer procs
* based on queue_proc from AP_PeriodicProcess
2012-12-20 14:51:26 +11:00
Pat Hickey c56c4ae240 Various example sketches: hal.uart0->begin(115200) is redundant. use console.
just assume uart0 is initialized by the HAL, because it is. DRY.
also, don't ever use uart0 explicitly in example sketches, use console
and let the hal figure it out.
2012-12-20 14:51:25 +11:00
Pat Hickey 11cfde1e46 AP_HAL_AVR: I2CDriver initialize in HAL init
* Makes more sense to have everything set to go by the time we're in setup.
2012-12-20 14:51:25 +11:00
Pat Hickey 73ccfaf2d7 AP_HAL: implement DigitalSource abstraction
* GPIO's complement to AnalogSource
2012-12-20 14:51:25 +11:00
Pat Hickey e83504f80d AP_HAL_AVR LCDTest: fix build 2012-12-20 14:51:25 +11:00
Pat Hickey 40734bc2f2 AP_HAL_AVR Console: bugfix on buffer bytes free vs used
* had them reversed. doh
2012-12-20 14:51:25 +11:00
Pat Hickey 52adb462a9 AP_HAL_AVR: Finished implementation of AVRConsoleDriver 2012-12-20 14:51:24 +11:00
Pat Hickey 98f86d0288 AP_HAL_AVR: Console more complete, but still not 100% 2012-12-20 14:51:24 +11:00
Pat Hickey 6f4d208ffc AP_HAL_AVR: fixup in vprintf header 2012-12-20 14:51:24 +11:00
Pat Hickey f889d5ac13 AP_HAL_AVR: trivial ConsoleDriver implementation
* user backend unimplemented. will do that next.
2012-12-20 14:51:24 +11:00
Pat Hickey 017f592eef AP_HAL: add ConsoleDriver interface 2012-12-20 14:51:24 +11:00
Pat Hickey a3a6482fd3 AP_HAL_AVR: vprintf implementation exists outside of class hierchary.
* Makes it easier to mix into other classes.
2012-12-20 14:51:24 +11:00
Pat Hickey 36154559fc AP_HAL: change txspace from a BetterStream method to a Stream method. 2012-12-20 14:51:24 +11:00
Pat Hickey 72f8667d9c AP_HAL_AVR: AnalogIn implemented 2012-12-20 14:51:23 +11:00
Pat Hickey 01e34825f3 AP_HAL_AVR: Scheduler unit tests 2012-12-20 14:51:22 +11:00
Pat Hickey ba7a596ec3 AP_HAL_AVR: Scheduler extensions implemented 2012-12-20 14:51:22 +11:00
Pat Hickey a1863ec1f5 AP_HAL_AVR ISRRegistry: use AP_HAL::Proc types instead of private typedef 2012-12-20 14:51:22 +11:00
Pat Hickey 229f58412b AP_HAL_AVR Storage: commit test 2012-12-20 14:51:22 +11:00