aboutsummaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* Better debug port support.Marti Bolivar2011-04-251-3/+76
| | | | | | | | | | | - gpio.h: afio_mapr_swj_config() renamed afio_cfg_debug_ports() - [new] wirish_debug.h: disableDebugPorts(), enableDebugPorts() - Maple, Maple Native, and Maple RET6 PIN_MAPs are now larger by 5, have mappings for the extra JTAG/SW pins. Documentation was updated appropriately.
* Minor test-session.cpp fixupMarti Bolivar2011-04-251-4/+3
|
* Requiring dac_dev* argument in DAC convenience functions.Marti Bolivar2011-04-211-41/+48
|
* Adding examples/test-print.cpp.Marti Bolivar2011-04-131-0/+181
| | | | | This uses templates, which I don't like, but it's not going into the core library, so I'm okay with it for now.
* DMA checkpoint; dma_attach_interrupt() is broken.Marti Bolivar2011-04-111-0/+127
| | | | | | Simple USART receiver to SRAM buffer demo partially working. Interrupting when buffer is full fails mysteriously. GDB thinks we ended up in an STM32 reserved exception.
* Resolving some FIXMEs.Marti Bolivar2011-04-112-3/+14
|
* Adding button test to examples/test-session.cpp.Marti Bolivar2011-04-111-1/+21
|
* USART refactor.Marti Bolivar2011-04-072-23/+68
|
* SysTick refactor.Marti Bolivar2011-04-051-1/+1
| | | | | | | | For the changelog: * util.h is free of __read(), __write(), etc. macros. * systick_resume() was renamed systick_enable().
* ring_buffer tweaks.Marti Bolivar2011-04-051-0/+114
| | | | | | | Adding basic ring_buffer test (cherry-pick from master). Changing rb_safe_insert()'s type to match that of rb_push_insert(). (Makes it easier to pass around insertion functions.)
* Redid Servo in terms of new timer.h.Marti Bolivar2011-04-011-0/+152
|
* Board-specific values; corresponding QA test generalizations.Marti Bolivar2011-03-302-384/+511
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various board-specific #defines and arrays of pins added. For the changelog (some of this information predates this commit): * wirish/boards.h now declares the following arrays of pin numbers: * boardPWMPins - PWM-capable pins * boardADCPins - ADC-capable pins * boardUsedPins - pins already in use, e.g. BOARD_BUTTON_PIN It also declares a bool boardUsesPin(uint8 pin) function for convenient testing of whether a pin is in use. * wirish/boards/*.h now define: * BOARD_USART1_TX_PIN * BOARD_USART1_RX_PIN * BOARD_USART2_TX_PIN * BOARD_USART2_RX_PIN * BOARD_USART3_TX_PIN * BOARD_USART3_RX_PIN * BOARD_NR_GPIO_PINS (renamed from NR_GPIO_PINS) * BOARD_NR_USARTS (renamed from NR_USARTS) * BOARD_NR_PWM_PINS * BOARD_NR_ADC_PINS * BOARD_NR_USED_PINS * wirish/boards/maple_native.h now defines: * BOARD_UART4_TX_PIN * BOARD_UART4_RX_PIN * BOARD_UART5_TX_PIN * BOARD_UART5_RX_PIN (Unfortunately, wirish/boards/maple_RET6.h cannot, since at least one of the UART4/UART5 pins are used already; this will require layout changes for a wide-release Maple form factor RET6 board). * wirish/boards/*.cpp all include the corresponding array definitions. They all live in flash by default, thanks to the new __FLASH__ macro in wirish/wirish_types.h, which is a synonym for the existing __attr_flash #define in libmaple/libmaple_types.h. The documentation was updated to include this information. It also gained various FIXME/TODO comments related to its generalization across boards. The quality assurance-related examples (examples/qa-slave-shield.cpp and examples/test-session.cpp) now make heavy use of board-specific values to ensure portability.
* Final stm32_pin_info design candidate; ADC3 support on Native.Marti Bolivar2011-03-251-20/+30
| | | | | | | | | | | | | | | | | | | | Added an adc_dev to struct stm32_pin_info. This was necessary to add support for the channels on the Native which are only connected to ADC3, but it does add a bunch of NULLs to the PIN_MAPs. I don't think any other peripherals need representation on a per-pin basis. Each peripheral library will be responsible for keeping track of related GPIO ports and bits, and we can throw #defines in to boards/*.h for other things (e.g. BOARD_SPI1_MISO_PIN). Fleshed out the ADC refactor and brought it more in keeping with the new design as it evolves. A couple of other tweaks. Notably: waitForButtonPress() now takes a default argument meaning "wait forever". Removed Maple-specific documentation from core functions in io.h; this information will need to go into the individual board docs files.
* Adding /wirish/boards/ for easier porting; shrank PIN_MAPs.Marti Bolivar2011-03-241-1/+1
| | | | | | | | | | | | | | | | | /wirish/boards/ contains xxx.h and xxx.cpp (for xxx=maple, maple_native, maple_mini, maple_RET6). The headers contain the board-specific #defines that used to live in boards.h (except BOARD_INIT, which was removed). The CPP files contain the PIN_MAP definitions that used to live in boards.cpp, and a proper boardInit() function to replace the old BOARD_INIT macro. This will make it easier to add new boards in the future. struct PinMapping was renamed struct stm32_pin_info, and was moved into a new wirish_types.h. Its external interrupt field was moved into struct gpio_dev, which saves memory by storing an afio_exti_port per port, rather than one per pin. Also rearranged the stm32_pin_info fields to improve packing. Maple's PIN_MAP is now down to below 500 bytes.
* Initial timer refactor.Marti Bolivar2011-03-242-175/+216
| | | | | | | | | | | | | | | Basic PWM works. Had some problems in testing that might be due to USART bugs. HardwareTimer has been removed from the build for now; I will re-implement it in terms of the new libmaple API, but consider it deprecated. Let's come up with something better. Servo is implemented in terms of HardwareTimer, so it also has been temporarily removed from the build. pwmWrite() likely got a little bit less inefficient due to indirection, but the PIN_MAPs shrank by a pointer per PinMapping.
* FSMC refactor; SRAM test codeMarti Bolivar2011-03-172-98/+326
|
* Maple RET6 edition supportMarti Bolivar2011-03-161-5/+4
|
* [WIP] GPIO refactor: seems ok, ready for reviewMarti Bolivar2011-03-111-14/+14
|
* Brought examples/ up to date; PIN_MAP bugfix for D24.Marti Bolivar2011-03-0413-313/+380
|
* Cleaned out libmaple.h; this had wide-ranging implications.Marti Bolivar2011-02-272-20/+21
| | | | | | | | | | | | | | | | | | | Many of the #defines in libmaple.h were board-specific, not MCU-specific. Most of these were only used by code under libmaple/usb/. These were moved into usb_config.h, and are clearly marked as being terrible hacks. I'm going to treat the USB stack as a black box that we'll deal with later. Further, instead of having a variety of #defines like "How many USARTS do I have?", we decide that based on the density of the chip. This is determined by testing for STM32_MEDIUM_DENSITY or STM32_HIGH_DENSITY defines. libmaple currently doesn't support low-density chips, so that suffices. The Makefile will set these automatically based on the MCU. Other offending #defines are ERROR_LED_PORT and ERROR_LED_PIN; these were made optional, but they're set in the Makefile as a hack to keep things working.
* Refactor DACPerry Hung2011-02-271-3/+3
| | | | | DAC header and source slightly cleaned up. Test on Maple Native prototype. Add flags parameter to allow selective enabling of channels.
* Refactor backup (BKP) and power (PWR) routines.Marti Bolivar2011-02-271-0/+78
|
* workaround to compile test-session.cppPerry Hung2011-02-271-1/+1
|
* Basic DAC functionality (high-density devices only).Marti Bolivar2011-02-181-29/+21
|
* Function examples/test-session.cpp on NativeMarti Bolivar2011-02-101-13/+19
|
* Updated blinky.cpp for portabilityMarti Bolivar2011-02-101-5/+7
|
* Ported examples/test-session.cpp to work on MiniMarti Bolivar2011-01-301-438/+515
|
* systick testing and simplificationbnewbold2010-09-051-0/+60
| | | | | | ripped out marti's SystemTick for the sake of simplicity and added a systick_resume function to libmaple. new example program demonstrates the functionality, also demonstrates micros()/USB bug
* improved timer test programbnewbold2010-09-051-0/+6
|
* fixed Serial crash bugbnewbold2010-09-051-1/+5
|
* Various fixes, working with Maplebnewbold2010-09-012-0/+172
|\
| * Merge maple-native changes into portablebnewbold2010-08-312-50/+7
| |\ | | | | | | | | | This compiles for both maple and maple_native but is untested.
| | * simplified example headersbnewbold2010-08-252-50/+7
| | |
| * | FSMC tweaksbnewbold2010-08-071-8/+2
| | |
| * | basic working dac implementationbnewbold2010-08-071-0/+53
| | |
| * | Partially working!bnewbold2010-08-051-52/+28
| | | | | | | | | | | | | | | Documented; see ./notes/fsmc.txt. Not yet integrated into .ld scripts or fully tested
| * | partial progress on FSMC for SRAMbnewbold2010-08-051-0/+149
| |/
* | added support to enable/disable systick in wirishMarti Bolivar2010-08-311-3/+1
| |
* | simplified example headersbnewbold2010-08-312-50/+7
|/
* updated leaf demobnewbold2010-07-201-62/+116
|
* test of serialN.flush()bnewbold2010-07-201-0/+45
|
* updated vga demos to use SerialUSB.end()bnewbold2010-07-202-0/+9
|
* TMP: test updatesbnewbold2010-07-202-3/+12
|
* wirish implementation of timers plus testbnewbold2010-07-201-3/+133
|
* timers progressbnewbold2010-07-203-259/+50
| | | | examples code cleanup, more descriptive comments, more notes
* awesome vga demos, need vga+systick disabledbnewbold2010-07-202-0/+167
|
* good quality vga leaf logo; usb+systick disabledbnewbold2010-07-202-0/+436
| | | | | refactored timers and added interrupt behavior. see notes and comments... also includes a crude vga hack that doesn't use timers.
* working serialUSB with timeoutbnewbold2010-07-191-0/+135
| | | | | | | | | | | as a temporary workaround for the fact that SerialUSB is often blocking, this crude implementation makes the low-level C usbSendBytes function non-blocking (with a return code of bytes sent) and implements a 2ms timeout in the wirish write() function. also adds begin(), end(), getDTR(), getRTS(), pending(). device is still initialized the old fashioned way during init() so that, eg, autoreset will work. includes a simple multi-test program.
* Call init() before static constructorsPerry Hung2010-06-255-14/+44
| | | | | | | Commit 70a18f96b6d55d23ce58ab40ffb61f172c8f6c73 forces init() to be called before any statically allocated object constructors for the IDE. This adds the change to the examples for users not using the IDE.
* fixed QA test (pulldown)bnewbold2010-06-161-2/+2
|