Skip to content

Commit

Permalink
Fixed pin assignments "bug".
Browse files Browse the repository at this point in the history
  • Loading branch information
terjeio committed Jun 6, 2023
1 parent ae4c6c1 commit 813a968
Showing 1 changed file with 34 additions and 33 deletions.
67 changes: 34 additions & 33 deletions main/bdring_i2s_6_axis_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define BOARD_NAME "BDRING 6-axis I2S"

#define USE_I2S_OUT
#define I2S_OUT_PIN_BASE 64

// timer definitions
#define STEP_TIMER_GROUP TIMER_GROUP_0
Expand All @@ -34,57 +35,57 @@
// Pin mapping when using SPI mode.
// With this mapping, SD card can be used both in SPI and 1-line SD mode.
// Note that a pull-up on CS line is required in SD mode.
#define PIN_NUM_MISO 19
#define PIN_NUM_MOSI 23
#define PIN_NUM_CLK 18
#define PIN_NUM_CS 5
#define PIN_NUM_MISO 19
#define PIN_NUM_MOSI 23
#define PIN_NUM_CLK 18
#define PIN_NUM_CS 5

#endif // SDCARD_ENABLE

#define I2S_OUT_BCK GPIO_NUM_22
#define I2S_OUT_WS GPIO_NUM_17
#define I2S_OUT_DATA GPIO_NUM_21
#define I2S_OUT_BCK GPIO_NUM_22
#define I2S_OUT_WS GPIO_NUM_17
#define I2S_OUT_DATA GPIO_NUM_21

#define X_STEP_PIN 2
#define X_DIRECTION_PIN 1
#define X_ENABLE_PIN 0
#define X_LIMIT_PIN GPIO_NUM_36
#define X_STEP_PIN I2SO(2)
#define X_DIRECTION_PIN I2SO(1)
#define X_ENABLE_PIN I2SO(0)
#define X_LIMIT_PIN GPIO_NUM_36

#define Y_STEP_PIN 5
#define Y_DIRECTION_PIN 4
#define Y_ENABLE_PIN 7
#define Y_LIMIT_PIN GPIO_NUM_39
#define Y_STEP_PIN I2SO(5)
#define Y_DIRECTION_PIN I2SO(4)
#define Y_ENABLE_PIN I2SO(7)
#define Y_LIMIT_PIN GPIO_NUM_39

#define Z_STEP_PIN 10
#define Z_DIRECTION_PIN 9
#define Z_ENABLE_PIN 8
#define Z_LIMIT_PIN GPIO_NUM_34
#define Z_STEP_PIN I2SO(10)
#define Z_DIRECTION_PIN I2SO(9)
#define Z_ENABLE_PIN I2SO(8)
#define Z_LIMIT_PIN GPIO_NUM_34

// Define ganged axis or A axis step pulse and step direction output pins.
#if N_ABC_MOTORS >= 1
#define M3_AVAILABLE
#define M3_STEP_PIN 13
#define M3_DIRECTION_PIN 12
#define M3_ENABLE_PIN 15
#define M3_LIMIT_PIN GPIO_NUM_35
#define M3_STEP_PIN I2SO(13)
#define M3_DIRECTION_PIN I2SO(12)
#define M3_ENABLE_PIN I2SO(15)
#define M3_LIMIT_PIN GPIO_NUM_35
#endif

// Define ganged axis or B axis step pulse and step direction output pins.
#if N_ABC_MOTORS >= 2
#define M4_AVAILABLE
#define M4_STEP_PIN 18
#define M4_DIRECTION_PIN 17
#define M4_ENABLE_PIN 16
#define M4_LIMIT_PIN GPIO_NUM_32
#define M4_STEP_PIN I2SO(18)
#define M4_DIRECTION_PIN I2SO(17)
#define M4_ENABLE_PIN I2SO(16)
#define M4_LIMIT_PIN GPIO_NUM_32
#endif

// Define ganged axis or B axis step pulse and step direction output pins.
#if N_ABC_MOTORS == 3
#define M5_AVAILABLE
#define M5_STEP_PIN 21
#define M5_DIRECTION_PIN 20
#define M5_ENABLE_PIN 23
#define M5_LIMIT_PIN GPIO_NUM_33
#define M5_STEP_PIN I2SO(21)
#define M5_DIRECTION_PIN I2SO(20)
#define M5_ENABLE_PIN I2SO(23)
#define M5_LIMIT_PIN GPIO_NUM_33
#endif

// Define spindle enable and spindle direction output pins.
Expand All @@ -95,7 +96,7 @@

// Define flood and mist coolant enable output pins.

#define COOLANT_MIST_PIN GPIO_NUM_26
#define COOLANT_MIST_PIN GPIO_NUM_2

// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.

Expand All @@ -111,7 +112,7 @@

// Define probe switch input pin.
#if PROBE_ENABLE
#define PROBE_PIN GPIO_NUM_25
#define PROBE_PIN GPIO_NUM_25
#endif

#if KEYPAD_ENABLE
Expand Down

0 comments on commit 813a968

Please sign in to comment.