666 Commits

Author SHA1 Message Date
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
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
b6f7fa5715 Add missing .PHONY target. 2009-07-16 15:54:41 +02:00
Uwe Hermann
3a2c63129e Use a Linux kernel style build output printing.
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-16 15:15:26 +02:00
Uwe Hermann
f0661cb343 Make default build silent, use 'make V=1' for verbose build. 2009-07-16 14:55:22 +02:00
Uwe Hermann
0efee48451 Add first example project (framework) using libopenstm32.
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-16 14:29:00 +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
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