Commit Graph

3009 Commits

Author SHA1 Message Date
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 54dfb91996 Add missing spi.h #include. 2010-03-04 21:35:59 +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
Piotr Esden-Tempski d84c4030b2 Cleaned up header inclusion.
Now all examples are including only the modules they really need. Also
each header file of the library is including only the necessary headers
making it possible to use these modules in parallel with other
implementations that may collide with the definitions in other modules.
2010-03-04 19:16:24 +01:00
Uwe Hermann 9b4b4b1c83 Add SPI example framework (unfinished). 2010-03-02 10:59:17 +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
Uwe Hermann 5455b0970e Add missing GPIO definitions for I2C1, I2C2, SPI2.
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-02-27 23:21:25 +01:00
Piotr Esden-Tempski cdc1846f5b Added gamma 2.2 and set as default gamma for fade mode. 2010-02-27 20:58:31 +01:00
Uwe Hermann 9928fb0820 Add missing Makefile snippets for pwmleds. 2010-02-24 00:37:10 +01:00
Uwe Hermann c441007867 Drop useless endif markers. 2010-02-24 00:34:18 +01:00
Uwe Hermann 7e1b849feb i2c: Add initial i2c.h header file and registers.
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-02-24 00:32:55 +01:00
Uwe Hermann 75e66f26d7 Revert unintended change. 2010-02-23 23:39:09 +01:00
Uwe Hermann 0a0be96d12 Cosmetics, whitespace, coding style. 2010-02-23 23:38:05 +01:00
Piotr Esden-Tempski 2c404f962a Added KITT mode. 2010-02-22 15:56:49 +01:00
Piotr Esden-Tempski da2b9d94fb Added gamma 2.5 corrected 3.0 table added fade mode.
The fade mode is using one gamma correction table and fades with a time
offset to create a nice moving fade.
2010-02-22 15:06:28 +01:00
Piotr Esden-Tempski c713c02e9d Scaled gamma 1.3 table to cover whole power range.
Now the example shows the difference between different gamma approaches.
2010-02-22 13:59:51 +01:00
Piotr Esden-Tempski 002ec200ad Added proper gamma correction tables. 2010-02-22 12:59:15 +01:00
Piotr Esden-Tempski 18097d9ed0 Added pwmleds example for mb252 board.
It creates a fading pattern on the 4 leds on the eval board, using TIM3
PWM output, and a gamma correction lookup table.
2010-02-22 10:03:56 +01:00
Piotr Esden-Tempski efb510f526 Modified include model of some files.
This model allows using libopenstm32 in parallel with other stm32
firmware libraries. It is not yet complete change to all code but a
start. Only changed parts that I tested.
2010-02-22 10:01:55 +01:00
Uwe Hermann 94ccc164db Use --no-print-directory option of 'make'. 2010-01-26 03:12:23 +01:00
Uwe Hermann 06fa19df3e Cosmetics in build output. 2010-01-26 03:11:27 +01:00
Uwe Hermann da79139560 Fix Makefile to use new directory names. 2010-01-26 03:02:06 +01:00
Uwe Hermann da8d9de6b0 Rename example directory names to all-lowercase. 2010-01-26 03:01:25 +01:00
Piotr Esden-Tempski ed0e46c31e Fixed a cut&paste typo in gpio.h. 2010-01-25 17:32:35 +01:00
Piotr Esden-Tempski 14ec3bdf39 Added bit definitions of AFIO registers. 2010-01-25 17:32:35 +01:00
Piotr Esden-Tempski 6ca739296d Updated example README files. 2010-01-25 17:32:35 +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
Piotr Esden-Tempski a88c1b0ee9 Fixed ROM start address in linker scripts. 2010-01-25 17:22:25 +01:00
Piotr Esden-Tempski 699ec0fb15 Added fancyblink example for the MB525 eval board. 2010-01-25 17:22:11 +01:00
Piotr Esden-Tempski 3a4f36d80f Moved all examples to a board specific folder. 2010-01-22 12:47:35 +01:00
Uwe Hermann d167b6c9e9 Add RCC_AHBENR bit definitions.
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-01-22 01:57:05 +01:00
Uwe Hermann 0308b49b76 Fix typo in TIM3RST #define.
Thanks Thomas Otto <tommi@viadmin.org> for the patch!
2010-01-22 01:54:10 +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
Piotr Esden-Tempski 6fe7e25a8a Added usb descriptor definitions. 2010-01-15 17:07:19 +01:00
Piotr Esden-Tempski cde7d1ce4d Added usb peripheral register definitions. It uses some tool macros defined in tools.h 2010-01-15 17:07:19 +01:00
Piotr Esden-Tempski 0c6b661502 Adapted to the new header style. Added some defs. 2010-01-15 17:00:18 +01:00
Uwe Hermann d173306c31 Add some more generic info to the README. 2010-01-15 13:40:43 +01:00
Uwe Hermann f682aa84b0 Document that the library API is NOT yet stable! 2010-01-15 13:38:02 +01:00
Uwe Hermann 99249672d5 Document the usage of the example projects. 2010-01-15 13:33:58 +01:00
Uwe Hermann 8d1c464961 Add flash.o to list of objects to build. 2010-01-15 01:43:51 +01:00
Uwe Hermann 6c66a41f27 Use FLASH_MEM_INTERFACE_BASE (not FLASH_BASE).
The latter does not exist in the repo.
2010-01-15 01:43:44 +01:00
Uwe Hermann 8d196a2a1f Mention reserved memory map areas in code comments. 2010-01-15 01:41:09 +01:00
Uwe Hermann d7d851e579 Prefix all flash related stuff with FLASH_. 2010-01-15 01:21:40 +01:00