speeduino-personal/speeduino/utils.h

55 lines
1.1 KiB
C
Raw Normal View History

2015-02-06 18:50:36 -08:00
/*
These are some utility functions and variables used through the main code
2017-07-06 15:47:42 -07:00
*/
2015-02-14 05:11:43 -08:00
#ifndef UTILS_H
#define UTILS_H
2015-02-06 18:50:36 -08:00
#include <Arduino.h>
2017-07-06 15:47:42 -07:00
uint16_t freeRam ();
void setPinMapping(byte boardID);
2018-07-19 00:35:35 -07:00
void initialiseTriggers();
2015-02-14 05:11:43 -08:00
2017-08-27 21:35:49 -07:00
//This is dumb, but it'll do for now to get things compiling
#if defined(CORE_STM32)
//STM32F1/variants/.../board.cpp
#if defined (STM32F4)
#define A0 PA0
#define A1 PA1
#define A2 PA2
#define A3 PA3
#define A4 PA4
#define A5 PA5
#define A6 PA6
#define A7 PA7
#define A8 PB0
#define A9 PB1
#define A10 PC0
#define A11 PC1
#define A12 PC2
#define A13 PC3
#define A14 PC4
#define A15 PC5
#else
#define A0 PB0
#define A1 PA7
#define A2 PA6
#define A3 PA5
#define A4 PA4
#define A5 PA3
#define A6 PA2
#define A7 PA1
#define A8 PA0
//STM32F1 have only 9 12bit adc
#define A9 PB0
#define A10 PA7
#define A11 PA6
#define A12 PA5
#define A13 PA4
#define A14 PA3
#define A15 PA2
#endif
#endif
2015-02-14 05:11:43 -08:00
#endif // UTILS_H