Skip to content

Commit f496672

Browse files
committed
m5stack atom-s3u pindefs
as per https://docs.m5stack.com/en/core/AtomS3U
1 parent 15e71a6 commit f496672

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#ifndef Pins_Arduino_h
2+
#define Pins_Arduino_h
3+
4+
#include <stdint.h>
5+
#include "soc/soc_caps.h"
6+
7+
#define USB_VID 0x303a
8+
#define USB_PID 0x1001
9+
10+
// WS2812 RGB LED on pin 7
11+
#define PIN_RGB_LED 35
12+
// BUILTIN_LED can be used in new Arduino API digitalWrite() like in Blink.ino
13+
static const uint8_t LED_BUILTIN = SOC_GPIO_PIN_COUNT + PIN_RGB_LED;
14+
#define BUILTIN_LED LED_BUILTIN // backward compatibility
15+
#define LED_BUILTIN LED_BUILTIN // allow testing #ifdef LED_BUILTIN
16+
// RGB_BUILTIN and RGB_BRIGHTNESS can be used in new Arduino API rgbLedWrite()
17+
#define RGB_BUILTIN LED_BUILTIN
18+
#define RGB_BRIGHTNESS 64
19+
20+
// https://docs.m5stack.com/en/core/AtomS3U
21+
22+
static const uint8_t IR_TX = 12;
23+
static const uint8_t BUTTON = 41;
24+
25+
// grove port
26+
static const uint8_t SDA = 1;
27+
static const uint8_t SCL = 2;
28+
29+
// grove port aliases
30+
static const uint8_t TCH1 = 1;
31+
static const uint8_t TCH2 = 2;
32+
static const uint8_t ACH0 = 1;
33+
static const uint8_t ACH1 = 2;
34+
35+
// gpio
36+
static const uint8_t G14 = 14;
37+
static const uint8_t G17 = 17;
38+
static const uint8_t G40 = 40;
39+
static const uint8_t G42 = 42;
40+
41+
// gpio aliases
42+
static const uint8_t A2CH3 = 14;
43+
static const uint8_t TCH14 = 14;
44+
static const uint8_t A2CH6 = 17;
45+
static const uint8_t CLK_OUT2 = 40;
46+
47+
// i2s mic
48+
static const uint8_t MIC_CLK = 38;
49+
static const uint8_t MIC_DATA = 39;
50+
51+
52+
53+
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)