aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/wirish_analog.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Final stm32_pin_info design candidate; ADC3 support on Native.Marti Bolivar2011-03-251-4/+5
| | | | | | | | | | | | | | | | | | | | 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.
* [WIP] GPIO refactor: seems ok, ready for reviewMarti Bolivar2011-03-111-0/+41