ARM_minimal.
|
Definice použitých periferií. ...
#include <stdint.h>
#include <stddef.h>
#include "core_cm0.h"
Zobrazit zdrojový text tohoto souboru.
Třídy | |
class | RCC_Type |
class | GPIO_Type |
Definice maker | |
#define | __IO volatile |
Takhle je to použito v ST library. | |
#define | PERIPH_BASE ((uint32_t) 0x40000000) |
#define | AHBPERIPH_BASE (PERIPH_BASE + 0x00020000) |
#define | AHB2PERIPH_BASE (PERIPH_BASE + 0x08000000) |
#define | RCC_BASE (AHBPERIPH_BASE + 0x00001000) |
#define | GPIOC_BASE (AHB2PERIPH_BASE + 0x00000800) |
#define | RCC_AHBENR_GPIOCEN ((uint32_t)0x00080000) |
#define | LEDPORT_BASE GPIOC_BASE |
#define | LEDCLK_GPIOEN RCC_AHBENR_GPIOCEN |
#define | LEDPIN 8 |
#define | DELAY_TIME 0x40000 |
#define | DELAY_SYST 4000000 |
#define | __CM0_REV 0 |
#define | __MPU_PRESENT 0 |
#define | __NVIC_PRIO_BITS 2 |
#define | __Vendor_SysTickConfig 0 |
#define | NAKED __attribute__((naked)) |
Případně můžeme funkci svléci, pokud ukládá na zásobník automaticky (handler) nebo se nevrací. | |
Definice typů | |
typedef struct RCC_Type | RCC_TypeDef |
přetypování v C pro RCC_Type | |
typedef struct GPIO_Type | GPIO_TypeDef |
přetypování v C pro GPIO_Type | |
Výčty | |
enum | IRQn_Type { NonMaskableInt_IRQn = -14, HardFault_IRQn = -13, SVC_IRQn = -5, PendSV_IRQn = -2, SysTick_IRQn = -1, WWDG_IRQn = 0, PVD_IRQn = 1, RTC_IRQn = 2, FLASH_IRQn = 3, RCC_IRQn = 4, EXTI0_1_IRQn = 5, EXTI2_3_IRQn = 6, EXTI4_15_IRQn = 7, TSC_IRQn = 8, DMA1_Channel1_IRQn = 9, DMA1_Channel2_3_IRQn = 10, DMA1_Channel4_5_IRQn = 11, ADC1_COMP_IRQn = 12, TIM1_BRK_UP_TRG_COM_IRQn = 13, TIM1_CC_IRQn = 14, TIM2_IRQn = 15, TIM3_IRQn = 16, TIM6_DAC_IRQn = 17, TIM14_IRQn = 19, TIM15_IRQn = 20, TIM16_IRQn = 21, TIM17_IRQn = 22, I2C1_IRQn = 23, I2C2_IRQn = 24, SPI1_IRQn = 25, SPI2_IRQn = 26, USART1_IRQn = 27, USART2_IRQn = 28, CEC_CAN_IRQn = 30 } |
Interrupt Numbers. ... | |
Funkce | |
static void | fillram (void) |
Debug stack only. | |
Definice použitých periferií.
#define __CM0_REV 0 |
Core Revision r0p0
#define __MPU_PRESENT 0 |
STM32F0xx do not provide MPU
#define __NVIC_PRIO_BITS 2 |
STM32F0xx uses 2 Bits for the Priority Levels
#define __Vendor_SysTickConfig 0 |
Set to 1 if different SysTick Config is used
#define AHB2PERIPH_BASE (PERIPH_BASE + 0x08000000) |
AHB2 address
#define AHBPERIPH_BASE (PERIPH_BASE + 0x00020000) |
AHB address
#define DELAY_SYST 4000000 |
Delay pro SysTick, při SystemCoreClock = 8 000 000 Mhz dává přerušení po 0.5 s
#define DELAY_TIME 0x40000 |
Delay ticks
#define GPIOC_BASE (AHB2PERIPH_BASE + 0x00000800) |
used GPIO address
#define LEDCLK_GPIOEN RCC_AHBENR_GPIOCEN |
renamed RCC_AHBENR_GPIOCEN
#define LEDPIN 8 |
LED pin no
#define LEDPORT_BASE GPIOC_BASE |
renamed GPIOC_BASE
#define PERIPH_BASE ((uint32_t) 0x40000000) |
Peripheral base address in the alias region
#define RCC_AHBENR_GPIOCEN ((uint32_t)0x00080000) |
GPIOC clock enable
#define RCC_BASE (AHBPERIPH_BASE + 0x00001000) |
RCC address
enum IRQn_Type |
Interrupt Numbers.