mirror of
https://github.com/eddyem/stm32samples.git
synced 2026-02-28 11:54:30 +03:00
add (not checked) pre-pre-pre-pre...-alpha version of Multistepper
This commit is contained in:
@@ -23,10 +23,12 @@
|
||||
#define __STM32F3_H__
|
||||
|
||||
#include "vector.h"
|
||||
#ifdef STM32F303xb
|
||||
#if defined STM32F303xb || defined STM32F303xc
|
||||
#include "stm32f303xc.h"
|
||||
#elif defined STM32F303xd || defined STM32F303xe
|
||||
#include "stm32f303xe.h"
|
||||
#else
|
||||
#error "Define STM32F303xb"
|
||||
#error "Define STM32F303xX"
|
||||
#endif
|
||||
#include "common_macros.h"
|
||||
|
||||
@@ -256,6 +258,18 @@ TRUE_INLINE int StartHSE(){ // system bus 72MHz from PLL
|
||||
#define MODER_O(n) (1<<(n*2))
|
||||
#define MODER_AF(n) (2<<(n*2))
|
||||
#define MODER_AI(n) (3<<(n*2))
|
||||
// OSPEED: low, medium, high
|
||||
#define OSPEED_CLR(n) (~(3<<(n*2)))
|
||||
#define OSPEED_LO(n) (0)
|
||||
#define OSPEED_MED(n) (1<<(n*2))
|
||||
#define OSPEED_HI(n) (3<<(n*2))
|
||||
// PUPD: pull up/down
|
||||
#define PUPD_CLR(n) (~(3<<(n*2)))
|
||||
#define PUPD_PU(n) (1<<(n*2))
|
||||
#define PUPD_PD(n) (2<<(n*2))
|
||||
// OTYPER: bit==1 for OD
|
||||
#define OTYPER_PP(n) 0
|
||||
#define OTYPER_OD(n) (1<<n)
|
||||
|
||||
// AFR field: afr - AFR number, pin - pin (0..15)
|
||||
TRUE_INLINE uint32_t AFRf(uint8_t afr, uint8_t pin){
|
||||
|
||||
15340
F3:F303/inc/Fx/stm32f303xe.h
Normal file
15340
F3:F303/inc/Fx/stm32f303xe.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,28 +1,6 @@
|
||||
/*
|
||||
* This file is part of the libopencm3 project.
|
||||
*
|
||||
* Copyright (C) 2012 Karl Palsson <karlp@tweak.net.au>
|
||||
*
|
||||
* This library is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* Linker script for STM32F100x4, 16K flash, 4K RAM. */
|
||||
|
||||
/* Define memory regions. */
|
||||
MEMORY
|
||||
{
|
||||
rom (rx) : ORIGIN = 0x08000000, LENGTH = 256K
|
||||
rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K
|
||||
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 40K
|
||||
ccmram (rwx) : ORIGIN = 0x10000000, LENGTH = 8K
|
||||
}
|
||||
|
||||
9
F3:F303/inc/ld/stm32f303xD.ld
Normal file
9
F3:F303/inc/ld/stm32f303xD.ld
Normal file
@@ -0,0 +1,9 @@
|
||||
MEMORY
|
||||
{
|
||||
rom (rx) : ORIGIN = 0x08000000, LENGTH = 384K
|
||||
ram (rwx) : ORIGIN = 0x20000000, LENGTH = 64K
|
||||
ccmram (rwx) : ORIGIN = 0x10000000, LENGTH = 16K
|
||||
}
|
||||
|
||||
/* Include the common ld script. */
|
||||
INCLUDE stm32f3.ld
|
||||
Reference in New Issue
Block a user