|
| 1 | +#ifndef _CALLIOPE_MINI_V3_ |
| 2 | +#define _CALLIOPE_MINI_V3_ |
| 3 | + |
| 4 | +// Master clock frequency |
| 5 | + |
| 6 | +#define VARIANT_MCK (64000000ul) |
| 7 | + |
| 8 | +#include "WVariant.h" |
| 9 | + |
| 10 | +#ifdef __cplusplus |
| 11 | +extern "C" |
| 12 | +{ |
| 13 | +#endif // __cplusplus |
| 14 | + |
| 15 | +// Number of pins defined in PinDescription array |
| 16 | + |
| 17 | +#define PINS_COUNT (41) |
| 18 | +#define NUM_DIGITAL_PINS (41) |
| 19 | +#define NUM_ANALOG_INPUTS (7) |
| 20 | +#define NUM_ANALOG_OUTPUTS (0) |
| 21 | + |
| 22 | +// LEDs |
| 23 | + |
| 24 | +#define PIN_LED (13) // This goes to Calliope mini header C12 (not a built in LED) |
| 25 | +#define LED_BUILTIN PIN_LED |
| 26 | + |
| 27 | +// Buttons |
| 28 | + |
| 29 | +#define PIN_BUTTON_A (5) |
| 30 | +#define PIN_BUTTON_B (11) |
| 31 | + |
| 32 | +// Analog pins |
| 33 | + |
| 34 | +#define PIN_A0 (0) |
| 35 | +#define PIN_A1 (1) |
| 36 | +#define PIN_A2 (2) |
| 37 | +#define PIN_A3 (3) |
| 38 | +#define PIN_A4 (4) |
| 39 | +#define PIN_A5 (10) |
| 40 | +#define PIN_A6 (29) |
| 41 | + |
| 42 | +#define ADC_RESOLUTION 10 |
| 43 | +static const uint8_t A0 = PIN_A0; |
| 44 | +static const uint8_t A1 = PIN_A1; |
| 45 | +static const uint8_t A2 = PIN_A2; |
| 46 | +static const uint8_t A3 = PIN_A3; |
| 47 | +static const uint8_t A4 = PIN_A4; |
| 48 | +static const uint8_t A5 = PIN_A5; |
| 49 | +static const uint8_t A6 = PIN_A6; |
| 50 | + |
| 51 | +// Serial |
| 52 | + |
| 53 | +#define PIN_SERIAL_RX (33) |
| 54 | +#define PIN_SERIAL_TX (34) |
| 55 | + |
| 56 | +// SPI |
| 57 | + |
| 58 | +#define SPI_INTERFACES_COUNT 1 |
| 59 | + |
| 60 | +#define PIN_SPI_MISO (14) |
| 61 | +#define PIN_SPI_MOSI (15) |
| 62 | +#define PIN_SPI_SCK (13) |
| 63 | + |
| 64 | +// Wire Interfaces (external and internal) |
| 65 | + |
| 66 | +#define WIRE_INTERFACES_COUNT 2 |
| 67 | + |
| 68 | +#define PIN_WIRE_SDA (20) |
| 69 | +#define PIN_WIRE_SCL (19) |
| 70 | + |
| 71 | +#define PIN_WIRE1_SDA (30) |
| 72 | +#define PIN_WIRE1_SCL (31) |
| 73 | + |
| 74 | +#ifdef __cplusplus |
| 75 | + |
| 76 | +// Calliope internal pins |
| 77 | +#define PIN_RGB (35) |
| 78 | +#define PIN_M_MODE (36) |
| 79 | +#define PIN_M0_DIR (37) |
| 80 | +#define PIN_M0_SPEED (38) |
| 81 | +#define PIN_M1_DIR (39) |
| 82 | +#define PIN_M1_SPEED (40) |
| 83 | +} |
| 84 | +#endif // __cplusplus |
| 85 | + |
| 86 | +#endif |
0 commit comments