Bläddra i källkod

cleanup and adjust pin numbers

Thomas Buck 9 månader sedan
förälder
incheckning
00ed8b4002
10 ändrade filer med 27 tillägg och 26 borttagningar
  1. Binär
      .DS_Store
  2. 1
    0
      .gitignore
  3. 17
    15
      README.md
  4. Binär
      pcb/.DS_Store
  5. 0
    1
      pcb/~drumkit.kicad_pcb.lck
  6. 0
    1
      pcb/~drumkit.kicad_sch.lck
  7. 5
    5
      src/buttons.c
  8. 1
    1
      src/encoder.c
  9. 1
    1
      src/lcd.c
  10. 2
    2
      src/led.c

Binär
.DS_Store Visa fil


+ 1
- 0
.gitignore Visa fil

@@ -1,2 +1,3 @@
1 1
 build
2 2
 .directory
3
+.DS_Store

+ 17
- 15
README.md Visa fil

@@ -23,25 +23,27 @@ Flash as usual using the mass storage bootloader (hold BOOTSEL while pluggin in
23 23
 
24 24
 ## Hardware Connections
25 25
 
26
-    Pin 1    GP0    I2C SDA
27
-    Pin 2    GP1    I2C SCL
26
+    Pin 1    GP0    I2C0 SDA
27
+    Pin 2    GP1    I2C0 SCL
28 28
 
29
-    Pin 4    GP22    Output Channel A
30
-    Pin 5    GP26    Output Channel B
31
-    Pin 6    GP27    Output Channel C
29
+    Pin 29   GP22   Output Channel A
30
+    Pin 31   GP26   Output Channel B
31
+    Pin 32   GP27   Output Channel C
32 32
 
33
-    Pin 7    GP8    Button 1
34
-    Pin 9    GP9    Button 2
35
-    Pin 10   GP12    Button 3
36
-    Pin 11   GP14    Button 4
33
+    Pin 34   GP28   Vbat (ADC2)
37 34
 
38
-    Pin 12   GP17    Encoder A
39
-    Pin 14   GP18   Encoder B
40
-    Pin 15   GP16   Encoder Click
35
+    Pin 11   GP8    Button 1
36
+    Pin 12   GP9    Button 2
37
+    Pin 16   GP12   Button 3
38
+    Pin 19   GP14   Button 4
41 39
 
42
-    Pin 16   GP10   LED 1
43
-    Pin 17   GP11   LED 2
44
-    Pin 19   GP13   LED 3
40
+    Pin 22   GP17   Encoder A
41
+    Pin 24   GP18   Encoder B
42
+    Pin 21   GP16   Encoder Click
43
+
44
+    Pin 14   GP10   LED 1
45
+    Pin 15   GP11   LED 2
46
+    Pin 17   GP13   LED 3
45 47
     Pin 20   GP15   LED 4
46 48
 
47 49
 ## License

Binär
pcb/.DS_Store Visa fil


+ 0
- 1
pcb/~drumkit.kicad_pcb.lck Visa fil

@@ -1 +0,0 @@
1
-{"hostname":"air2015","username":"kauzerei"}

+ 0
- 1
pcb/~drumkit.kicad_sch.lck Visa fil

@@ -1 +0,0 @@
1
-{"hostname":"air2015","username":"kauzerei"}

+ 5
- 5
src/buttons.c Visa fil

@@ -24,11 +24,11 @@
24 24
 #define DEBOUNCE_DELAY_MS 50
25 25
 
26 26
 static const uint gpio_num[NUM_BTNS] = {
27
-    5, // BTN_A
28
-    6, // BTN_B
29
-    7, // BTN_C
30
-    8, // BTN_REC
31
-    11, // BTN_CLICK
27
+    8, // BTN_A
28
+    9, // BTN_B
29
+    12, // BTN_C
30
+    14, // BTN_REC
31
+    16, // BTN_CLICK
32 32
 };
33 33
 
34 34
 struct button_state {

+ 1
- 1
src/encoder.c Visa fil

@@ -25,7 +25,7 @@
25 25
 #define ENCODER_MODE TWO03
26 26
 
27 27
 static const uint gpio_num[2] = {
28
-    9, 10
28
+    17, 18
29 29
 };
30 30
 
31 31
 static const int8_t KNOBDIR[] = {

+ 1
- 1
src/lcd.c Visa fil

@@ -25,7 +25,7 @@
25 25
 #include "ssd1306.h"
26 26
 #include "lcd.h"
27 27
 
28
-#define LCD_I2C i2c1
28
+#define LCD_I2C i2c0
29 29
 static const uint gpio_num[2] = { 0, 1 };
30 30
 #define LCD_ADDR 0x3C
31 31
 

+ 2
- 2
src/led.c Visa fil

@@ -22,11 +22,11 @@
22 22
 #include "led.h"
23 23
 
24 24
 static const uint led_gpio_num[LED_COUNT] = {
25
-    12, 13, 14, 15,
25
+    10, 11, 13, 15,
26 26
 };
27 27
 
28 28
 static const uint ch_gpio_num[NUM_CHANNELS] = {
29
-    2, 3, 4,
29
+    22, 26, 27,
30 30
 };
31 31
 
32 32
 void led_init(void) {

Laddar…
Avbryt
Spara