607 Commits

Author SHA1 Message Date
Thomas Otto
9d2e074b3d Cosmetic fixes. 2010-03-28 15:19:32 +02:00
Thomas Otto
561ce37809 Changed address setting in dma.c+h. 2010-03-26 17:36:15 +01:00
Thomas Otto
0f710dd8fa Fixed settings of groups in adc.c. 2010-03-26 17:35:15 +01:00
Thomas Otto
3518301870 Integrated systick into build system. 2010-03-25 13:13:01 +01:00
Thomas Otto
feb3f187fe Added systick.h definitions. 2010-03-25 13:11:59 +01:00
Thomas Otto
d96b318795 Added some address setting functions to dma. 2010-03-24 22:51:43 +01:00
Thomas Otto
cdf93fedfa Small correction in isr table. 2010-03-23 21:05:37 +01:00
Thomas Otto
426d6a45fc added some SCB defs. Added some NVIC functions. 2010-03-22 22:01:44 +01:00
Thomas Otto
e4788f67b6 added dma.h and basic functions 2010-03-22 21:52:49 +01:00
Thomas Otto
561c9a1d3e added basic adc funktions 2010-03-22 21:40:08 +01:00
Uwe Hermann
a6342d4968 Cosmetic fixes. 2010-03-06 15:22:09 +01:00
Uwe Hermann
e6c72d5cfc Fix bug: PLLMUL_PLL_CLK_MUL9 is correct. 2010-03-06 15:07:21 +01:00
Uwe Hermann
4390abfd95 Cosmetic and coding style changes. 2010-03-06 14:49:59 +01:00
Uwe Hermann
f514162134 Add some more ADC support.
Also:

 - Fix a few typos (e.g. s/ADC1_BSAE/ADC1_BASE/).

 - adc.h: Use common SUBSYSTEMNAME_REGISTERNAME_FOO #define format.
2010-03-05 20:59:07 +01:00
Uwe Hermann
f1a6e56f5c gpio: Fix some issues with gpio_set_mode().
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-05 19:46:57 +01:00
Uwe Hermann
e7cadf0822 Use direct #includes instead of libopenstm32.h. 2010-03-04 21:25:25 +01:00
Uwe Hermann
92194abda4 Trivial quickfix for some compiler warnings. 2010-03-04 21:08:36 +01:00
Piotr Esden-Tempski
d7489ebfbd Added standard clock setup routines.
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-04 20:37:04 +01:00
Uwe Hermann
742c595114 Add initial set of I2C functions.
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-03-01 21:47:14 +01:00
Piotr Esden-Tempski
bc46b3118e Added all handlers to the vector table.
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-25 17:32:33 +01:00
Piotr Esden-Tempski
4935a0ddd8 Moved vector_table to the library. 2010-01-25 17:29:06 +01:00
Uwe Hermann
1f9479e673 Add initial (unfinished, untested) RTC support. 2010-01-22 01:48:02 +01:00
Uwe Hermann
3e29876d98 rcc: Add a few functions to set prescalers.
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-01-19 19:57:38 +01:00
Uwe Hermann
92dc4c361e Add empty lib/nvic.c to make libopenstm32 compile. 2010-01-19 19:53:20 +01:00
Piotr Esden-Tempski
a38fc2c3a2 Added basic NVIC register defs and functions. 2010-01-16 04:12:53 +01:00
Uwe Hermann
8d1c464961 Add flash.o to list of objects to build. 2010-01-15 01:43:51 +01:00
Uwe Hermann
d7d851e579 Prefix all flash related stuff with FLASH_. 2010-01-15 01:21:40 +01:00
Uwe Hermann
4fdb7f08fd Add initial flash memory register support.
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-01-15 01:05:22 +01:00
Piotr Esden-Tempski
667f32bd45 Added USART_ prefix to bit definitions.
This matches the new convention used throughout libopenstm32.
2010-01-15 00:03:29 +01:00
Uwe Hermann
312db1a301 Fix logic bugs in rcc_wait_for_osc_ready().
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-01-14 19:34:30 +01:00
Uwe Hermann
977f0ef6a0 Configure SPI as master in spi_init_master(). 2010-01-14 19:20:23 +01:00
Uwe Hermann
98997691d3 Add first version of spi_enable()/spi_disable(). 2009-12-30 23:28:40 +01:00
Uwe Hermann
a7a3770d51 Add initial SPI code.
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-12-30 23:09:14 +01:00
Uwe Hermann
88f35a4a7e ADC #defines, contributed by Edward Cheeseman <ed@landcrab.co.nz>. 2009-09-04 15:47:38 +02:00
Uwe Hermann
25a003b076 Add rcc_peripheral_{reset,clear_reset} functions.
Also, rename two other functions for consistency.
2009-08-31 14:47:07 +02:00
Uwe Hermann
c6ec621b1a Initial implementation of USART API functions.
The usart_set_baudrate() function is currently hardcoded to certain
settings, that needs to be fixed later.
2009-07-25 03:24:08 +02:00
Uwe Hermann
1f07553863 Fix comment. 2009-07-25 00:28:07 +02:00
Uwe Hermann
cfd87f6b9d Add mini ld scripts in the example which include the global one. 2009-07-25 00:05:06 +02:00
Uwe Hermann
428e328b7e Install the ld script upon 'make install'. 2009-07-24 23:30:36 +02:00
Uwe Hermann
50ba77bea9 Factor out ld scripts into one common script in the lib. 2009-07-24 23:19:44 +02:00
Uwe Hermann
6db6d5b49c Add initial framework for USART support. So far only some #defines. 2009-07-22 14:02:21 +02:00
Uwe Hermann
574f77f6df Add -Wstrict-prototypes to CFLAGS for more strict checking. 2009-07-22 03:28:58 +02:00
Uwe Hermann
9fd3064cb2 Add more RCC related API functions and their prototypes.
This includes:
 - rcc_set_sysclk_source()
 - rcc_set_pll_multiplication_factor()
 - rcc_set_pll_source()
 - rcc_set_pllxtpre()
2009-07-22 03:25:14 +02:00
Uwe Hermann
a5a9648144 Add rcc_enable_peripheral_clock() et al, and respective prototypes. 2009-07-22 02:56:04 +02:00
Uwe Hermann
97440d8406 Turn rcc_osc_ready() into rcc_wait_for_osc_ready(), more useful. 2009-07-22 02:38:31 +02:00
Piotr Esden-Tempski
446de38728 Changed all includes to use <foo.h> notation. 2009-07-20 17:54:33 +02:00
Uwe Hermann
4f43d8c622 Fix some compiler warnings. 2009-07-20 15:32:28 +02:00
Uwe Hermann
50b1b50676 Add slightly modified rcc.c file, contributed by Federico Ruiz-Ugalde. 2009-07-20 15:29:43 +02:00
Uwe Hermann
3bef8767f9 Add gpio_get() API function. 2009-07-18 17:41:31 +02:00
Uwe Hermann
83f5c58eb9 Switch the license to GPL, version 3 or later. 2009-07-18 16:27:47 +02:00