Add most of the rcc functions.

(Add the forgotten gpio.c file from before)
This commit is contained in:
Karl Palsson
2012-07-22 21:58:09 +00:00
parent 9aed64a19d
commit e4f84278f2
5 changed files with 511 additions and 5 deletions

View File

@@ -29,9 +29,9 @@ void gpio_setup(void)
{
/* Enable GPIOB clock. */
/* Manually: */
RCC_AHBENR |= RCC_AHBENR_GPIOBEN;
//RCC_AHBENR |= RCC_AHBENR_GPIOBEN;
/* Using API functions: */
//rcc_peripheral_enable_clock(&RCC_AHBENR, RCC_AHBENR_IOPBEN);
rcc_peripheral_enable_clock(&RCC_AHBENR, RCC_AHBENR_GPIOBEN);
/* Set GPIO6 (in GPIO port B) to 'output push-pull'. */
/* Using API functions: */