aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2010-03-05Add some more ADC support.Uwe Hermann
Also: - Fix a few typos (e.g. s/ADC1_BSAE/ADC1_BASE/). - adc.h: Use common SUBSYSTEMNAME_REGISTERNAME_FOO #define format.
2010-03-05gpio: Fix some issues with gpio_set_mode().Uwe Hermann
This patch, a slightly modified version of a patch from Thomas Otto, should fix the following two issues: - It generally sets the submited config to the mentioned GPIO pins but kills configs for other pins on the same GPIO port. So if we want to set PB6 and PB7 to push-pull and I2C2 SDA and SCL (PB10 and PB11) to open drain it's simply impossible, because the second config try kills the first. - The floating-bit thing isn't working correctly. If we enable a config for PB6 for instance, the same config will also apply to all following pins of that port (i.e. PB7-PB15). That's because the shifting isn't only done if a pin isn't to configure, if you are hitting a matching bit the shiftig is missing. I think shifting isn't nessessary for a separate variable. We have the counting index from the for statement. Both issues should now be fixed.
2010-03-04Use direct #includes instead of libopenstm32.h.Uwe Hermann
2010-03-04Trivial quickfix for some compiler warnings.Uwe Hermann
2010-03-04Added standard clock setup routines.Piotr Esden-Tempski
Thanks to Thomas Otto for pointing out problems with the clock code in examples and his clock routine implementations. Based on that the most common clock combination routines were added to the library and all routines in examples setting up the clock replaced with calls to that functions.
2010-03-01Add initial set of I2C functions.Uwe Hermann
Thomas Otto has tested the code by successfully talking to a temperature sensor from ST in master tranciever mode. Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-01-25Added all handlers to the vector table.Piotr Esden-Tempski
All handlers are weak symbols pointing to a null handler (doing nothing) or blocking handler (running an infinite loop). This means you can define a function with the name in the list and the linker will use your definition instead of the default one. This makes it easy to implement your own handlers without touching the library code.
2010-01-25Moved vector_table to the library.Piotr Esden-Tempski
2010-01-22Add initial (unfinished, untested) RTC support.Uwe Hermann
2010-01-19rcc: Add a few functions to set prescalers.Uwe Hermann
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-01-19Add empty lib/nvic.c to make libopenstm32 compile.Uwe Hermann
2010-01-16Added basic NVIC register defs and functions.Piotr Esden-Tempski
2010-01-15Add flash.o to list of objects to build.Uwe Hermann
2010-01-15Prefix all flash related stuff with FLASH_.Uwe Hermann
2010-01-15Add initial flash memory register support.Uwe Hermann
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-01-15Added USART_ prefix to bit definitions.Piotr Esden-Tempski
This matches the new convention used throughout libopenstm32.
2010-01-14Fix logic bugs in rcc_wait_for_osc_ready().Uwe Hermann
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-01-14Configure SPI as master in spi_init_master().Uwe Hermann
2009-12-30Add first version of spi_enable()/spi_disable().Uwe Hermann
2009-12-30Add initial SPI code.Uwe Hermann
For now, add the following basic SPI functions: - spi_init_master() - spi_write() - spi_read() This is incomplete and untested, yet. Also, add some more SPI bit definition macros and comments.
2009-09-04ADC #defines, contributed by Edward Cheeseman <ed@landcrab.co.nz>.Uwe Hermann
2009-08-31Add rcc_peripheral_{reset,clear_reset} functions.Uwe Hermann
Also, rename two other functions for consistency.
2009-07-25Initial implementation of USART API functions.Uwe Hermann
The usart_set_baudrate() function is currently hardcoded to certain settings, that needs to be fixed later.
2009-07-25Fix comment.Uwe Hermann
2009-07-25Add mini ld scripts in the example which include the global one.Uwe Hermann
2009-07-24Install the ld script upon 'make install'.Uwe Hermann
2009-07-24Factor out ld scripts into one common script in the lib.Uwe Hermann
2009-07-22Add initial framework for USART support. So far only some #defines.Uwe Hermann
2009-07-22Add -Wstrict-prototypes to CFLAGS for more strict checking.Uwe Hermann
2009-07-22Add more RCC related API functions and their prototypes.Uwe Hermann
This includes: - rcc_set_sysclk_source() - rcc_set_pll_multiplication_factor() - rcc_set_pll_source() - rcc_set_pllxtpre()
2009-07-22Add rcc_enable_peripheral_clock() et al, and respective prototypes.Uwe Hermann
2009-07-22Turn rcc_osc_ready() into rcc_wait_for_osc_ready(), more useful.Uwe Hermann
2009-07-20Changed all includes to use <foo.h> notation.Piotr Esden-Tempski
2009-07-20Fix some compiler warnings.Uwe Hermann
2009-07-20Add slightly modified rcc.c file, contributed by Federico Ruiz-Ugalde.Uwe Hermann
2009-07-18Add gpio_get() API function.Uwe Hermann
2009-07-18Switch the license to GPL, version 3 or later.Uwe Hermann
2009-07-18Add initial GPIO API implementation.Uwe Hermann
This currently includes a number of basic functions. Example usage: gpio_set_mode(GPIOC, GPIO_MODE_OUTPUT_2_MHZ, GPIO_CNF_OUTPUT_PUSHPULL, GPIO12); gpio_set(GPIOB, GPIO4); gpio_clear(GPIOG, GPIO2 | GPIO9); gpio_toggle(GPIOA, GPIO7); reg16 = gpio_port_read(GPIOD); gpio_port_write(GPIOF, 0xc8fe);
2009-07-16Add missing .PHONY target.Uwe Hermann
2009-07-16Use a Linux kernel style build output printing.Uwe Hermann
Example: $ make install BUILD lib CC gpio.o AR libopenstm32.a BUILD example CC blink.o LD blink INSTALL headers INSTALL lib $ make clean CLEAN blink.o CLEAN blink CLEAN gpio.o CLEAN libopenstm32.a
2009-07-16Make default build silent, use 'make V=1' for verbose build.Uwe Hermann
2009-07-16Add first example project (framework) using libopenstm32.Uwe Hermann
This is intended as a small blink example for the Olimex STM32-H103 board. It doesn't do anything useful (yet), but it builds fine. There's a sample Makefile and a preliminary ld script (which probably needs some more work).
2009-07-16Make gpio number argument 'unsigned int', there are no negative GPIOs.Uwe Hermann
2009-07-16Add dummy gpio.c implementation and final Makefile.Uwe Hermann
The whole lib should now build and install fine. It's not yet tested on hardware, though.