Uwe Hermann
6db6d5b49c
Add initial framework for USART support. So far only some #defines.
2009-07-22 14:02:21 +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
5df3d0a23d
Add RCC_AHBRSTR and RCC_CFGR2 bit definitions.
2009-07-22 01:16:34 +02:00
Uwe Hermann
6ec84bf10e
Reorder RCC bits, add missing bits for STM32 connectivity line.
2009-07-22 00:58:54 +02:00
Uwe Hermann
839748ad3d
Add RCC_APB1RSTR bit definitions.
2009-07-21 20:36:44 +02:00
Uwe Hermann
6f0070991c
Add RCC_APB2RSTR bit definitions.
2009-07-21 20:25:00 +02:00
Piotr Esden-Tempski
446de38728
Changed all includes to use <foo.h> notation.
2009-07-20 17:54:33 +02:00
Uwe Hermann
07b6ca3a90
Add RCC_CSR bit definitions and a osc_t enum.
2009-07-20 15:28:41 +02:00
Uwe Hermann
3eb5397d8d
Add RCC_BDCR bit definitions.
2009-07-20 15:15:22 +02:00
Uwe Hermann
df399e248b
Add RCC_APB1ENR bit definitions.
2009-07-20 15:15:02 +02:00
Uwe Hermann
af9302d2b0
Merge some more RCC related #defines contributed by Federico Ruiz-Ugalde.
...
Addition of remaining (mostly "connectivity line" STMs related) #defines
was done by me.
2009-07-19 01:34:27 +02:00
Uwe Hermann
b888530345
Whitespace fixes.
2009-07-19 01:12:45 +02:00
Uwe Hermann
2c1fa8bd67
Partial merge of RCC support work contributed by Federico Ruiz-Ugalde.
...
For now, this adds a bunch of #defines, double-checked against the
datasheet by me (added a few missing values for "connectivity line" STM32s).
2009-07-18 22:27:17 +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
Uwe Hermann
3262983d27
Add initial GPIO API implementation.
...
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-18 16:20:32 +02:00
Uwe Hermann
355701525e
Add initial minimal rcc.h implementation (not complete).
2009-07-18 05:34:38 +02:00
Uwe Hermann
3b6809413b
Remove one layer of indirection by killing unneeded #defines.
2009-07-18 02:51:22 +02:00
Uwe Hermann
015b046c1e
Merge stdint.h contents into common.h so we don't conflict with libc.
2009-07-18 01:39:30 +02:00
Uwe Hermann
f3d7eda380
Add convenience GPIOx #defines and MMIO GPIO register #defines.
2009-07-17 23:09:47 +02:00
Uwe Hermann
d6611f62dd
Add all base addresses for peripherals as per datasheet.
2009-07-17 23:05:01 +02:00
Uwe Hermann
f3ac624f22
Add common.h, currently containing MMIO accessor functions.
2009-07-17 19:01:45 +02:00
Uwe Hermann
c62ca6143d
Make gpio number argument 'unsigned int', there are no negative GPIOs.
2009-07-16 14:23:25 +02:00
Uwe Hermann
0fa4cbbdad
Add some more GPIO related #defines.
...
This includes GPIO port base addresses, MODE[1:0] values, and CNF[1:0]
values.
2009-07-16 14:22:46 +02:00
Uwe Hermann
e7567c835c
Add memorymap.h with some peripheral base addresses.
2009-07-16 14:20:18 +02:00
Uwe Hermann
0a8135395a
Add dummy gpio.c implementation and final Makefile.
...
The whole lib should now build and install fine. It's not yet tested
on hardware, though.
2009-07-16 03:27:05 +02:00
Uwe Hermann
1b2f6456bf
Add some initial gpio.h #defines.
2009-07-16 03:20:12 +02:00
Uwe Hermann
75bb51fadf
Add top-level include file intended for lib users.
2009-07-16 02:40:10 +02:00
Uwe Hermann
ae6f321816
Add a stdint.h include file for u16, u32, etc.
2009-07-16 02:14:17 +02:00