chrismicro / bluepillsound Goto Github PK
View Code? Open in Web Editor NEWusing a STM32F103 ( Blue Pill ) as synthesizer
using a STM32F103 ( Blue Pill ) as synthesizer
Hi, I'm having trouble compiling onto Blue Pill board.
Here's errors I'm getting:
Arduino: 1.6.3 (Windows 8.1), Board: "Generic STM32F103C series, STM32F103C8 (20k RAM. 64k Flash), STLink, 72Mhz (Normal)"
In file included from speakerpin.h:1:0,
from _073_SigmaDeltaTalkie.ino:25:
GPIOport.h:9:23: error: expected class-name before '{' token
public gpio_reg_map {
^
GPIOport.h:11:21: error: 'uint32_t' does not name a type
void high(const uint32_t pin) {
^
GPIOport.h:11:30: error: ISO C++ forbids declaration of 'pin' with no type [-fpermissive]
void high(const uint32_t pin) {
^
GPIOport.h:14:20: error: 'uint32_t' does not name a type
void low(const uint32_t pin) {
^
GPIOport.h:14:29: error: ISO C++ forbids declaration of 'pin' with no type [-fpermissive]
void low(const uint32_t pin) {
^
GPIOport.h:17:24: error: 'uint32_t' does not name a type
void pinMode(const uint32_t pin, gpio_pin_mode mode) {
^
GPIOport.h:17:33: error: ISO C++ forbids declaration of 'pin' with no type [-fpermissive]
void pinMode(const uint32_t pin, gpio_pin_mode mode) {
^
GPIOport.h:17:38: error: 'gpio_pin_mode' has not been declared
void pinMode(const uint32_t pin, gpio_pin_mode mode) {
^
GPIOport.h:31:21: error: 'uint32_t' does not name a type
int value(const uint32_t pin) {
^
GPIOport.h:31:30: error: ISO C++ forbids declaration of 'pin' with no type [-fpermissive]
int value(const uint32_t pin) {
^
GPIOport.h: In member function 'void GPIOPort::high(int)':
GPIOport.h:12:7: error: 'BSRR' was not declared in this scope
BSRR = 1 << pin;
^
GPIOport.h: In member function 'void GPIOPort::low(int)':
GPIOport.h:15:7: error: 'BRR' was not declared in this scope
BRR = 1 << pin;
^
GPIOport.h: In member function 'void GPIOPort::pinMode(int, int)':
GPIOport.h:18:16: error: 'uint32_t' does not name a type
volatile uint32_t *cr = &CRL + (pin >> 3);
^
GPIOport.h:19:7: error: 'uint32_t' was not declared in this scope
uint32_t shift = (pin & 0x7) * 4;
^
GPIOport.h:19:16: error: expected ';' before 'shift'
uint32_t shift = (pin & 0x7) * 4;
^
GPIOport.h:20:16: error: expected ';' before 'tmp'
uint32_t tmp = *cr;
^
GPIOport.h:21:7: error: 'tmp' was not declared in this scope
tmp &= ~(0xF << shift);
^
GPIOport.h:21:23: error: 'shift' was not declared in this scope
tmp &= ~(0xF << shift);
^
GPIOport.h:22:23: error: 'GPIO_INPUT_PU' was not declared in this scope
tmp |= (mode == GPIO_INPUT_PU ? GPIO_INPUT_PD : mode) << shift;
^
GPIOport.h:22:39: error: 'GPIO_INPUT_PD' was not declared in this scope
tmp |= (mode == GPIO_INPUT_PU ? GPIO_INPUT_PD : mode) << shift;
^
GPIOport.h:23:8: error: 'cr' was not declared in this scope
*cr = tmp;
^
GPIOport.h:26:9: error: 'ODR' was not declared in this scope
ODR &= ~(1u << pin);
^
GPIOport.h:28:9: error: 'ODR' was not declared in this scope
ODR |= (1u << pin);
^
GPIOport.h: In member function 'int GPIOPort::value(int)':
GPIOport.h:32:15: error: 'IDR' was not declared in this scope
return (IDR & (1u << pin) ? 1 : 0);
^
GPIOport.h: At global scope:
GPIOport.h:43:16: error: 'uint32_t' does not name a type
template<const uint32_t PIN>
^
GPIOport.h:102:1: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive]
};
^
GPIOport.h:102:2: error: expected '>' before ';' token
};
^
GPIOport.h:102:2: error: expected unqualified-id before ';' token
GPIOport.h:104:9: error: 'GPIOPortBPin' does not name a type
typedef GPIOPortBPin<0> PB_0;
^
GPIOport.h:105:9: error: 'GPIOPortBPin' does not name a type
typedef GPIOPortBPin<1> PB_1;
^
GPIOport.h:106:9: error: 'GPIOPortBPin' does not name a type
typedef GPIOPortBPin<2> PB_2;
^
GPIOport.h:107:9: error: 'GPIOPortBPin' does not name a type
typedef GPIOPortBPin<12> PB_12;
^
GPIOport.h:109:9: error: 'GPIOPortBPin' does not name a type
typedef GPIOPortBPin<11> PB_15;
^
In file included from _073_SigmaDeltaTalkie.ino:25:0:
speakerpin.h:3:3: error: 'PB_0' does not name a type
PB_0 FASTSOUNDPIN;
^
_073_SigmaDeltaTalkie.ino: In function 'void playSound(uint8_t*, uint32_t)':
_073_SigmaDeltaTalkie.ino:45:3: error: 'FASTSOUNDPIN' was not declared in this scope
_073_SigmaDeltaTalkie.ino: In function 'void setup()':
_073_SigmaDeltaTalkie.ino:108:3: error: 'FASTSOUNDPIN' was not declared in this scope
Error compiling.
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Any help is appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.