STM32F411: add cpu-stm32.c
This commit is contained in:
parent
a4083dc360
commit
ab03852750
|
|
@ -210,13 +210,6 @@ void SystemInit(void)
|
||||||
AHB/APBx prescalers and Flash settings */
|
AHB/APBx prescalers and Flash settings */
|
||||||
SetSysClock();
|
SetSysClock();
|
||||||
|
|
||||||
// Enable power and clocking for all GPIO
|
|
||||||
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN | \
|
|
||||||
RCC_AHB1ENR_GPIOBEN | \
|
|
||||||
RCC_AHB1ENR_GPIOCEN | \
|
|
||||||
RCC_AHB1ENR_GPIODEN | \
|
|
||||||
RCC_AHB1ENR_GPIOHEN;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
To be included from cpu.c, for details see there.
|
To be included from cpu.c, for details see there.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined TEACUP_C_INCLUDE && defined __ARMEL__
|
#if defined TEACUP_C_INCLUDE && defined __ARM_LPC1114__
|
||||||
|
|
||||||
#include "config_wrapper.h"
|
#include "config_wrapper.h"
|
||||||
|
|
||||||
|
|
@ -23,4 +23,4 @@ void cpu_init() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* defined TEACUP_C_INCLUDE && defined __ARMEL__ */
|
#endif /* defined TEACUP_C_INCLUDE && defined __ARM_LPC1114__ */
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
|
||||||
|
/** \file
|
||||||
|
\brief CPU initialisation, ARM specific part.
|
||||||
|
|
||||||
|
To be included from cpu.c, for details see there.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined TEACUP_C_INCLUDE && defined __ARM_STM32F411__
|
||||||
|
|
||||||
|
#include "config_wrapper.h"
|
||||||
|
|
||||||
|
void cpu_init() {
|
||||||
|
/**
|
||||||
|
Enable all periphals.
|
||||||
|
*/
|
||||||
|
// Enable power and clocking for all GPIO
|
||||||
|
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN |
|
||||||
|
RCC_AHB1ENR_GPIOBEN |
|
||||||
|
RCC_AHB1ENR_GPIOCEN |
|
||||||
|
RCC_AHB1ENR_GPIODEN |
|
||||||
|
RCC_AHB1ENR_GPIOHEN;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* defined TEACUP_C_INCLUDE && defined __ARM_STM32F411__ */
|
||||||
Loading…
Reference in New Issue