Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add creality_e2p24s4 board #2

Merged
merged 1 commit into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/config/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

#if IS_BOARD(VOXELAB_V101)
#include "boards/voxelab_v101.h"
#elif IS_BOARD(CREALITY_E2P24S4)
#include "boards/creality_e2p24s4.h"
#else
#error "Unknown board"
#endif
2 changes: 1 addition & 1 deletion src/config/boards.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#define BOARD_VOXELAB_V101 1000

#define BOARD_CREALITY_E2P24S4 2000

#define IS_BOARD(board) (BOARD == BOARD_##board)
35 changes: 35 additions & 0 deletions src/config/boards/creality_e2p24s4.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// Creality Ender 2 Pro v2.4.S4_170 (HC32f460KCTA)
//
#pragma once
#include "../../config_options.h"

// Ender 2 Pro uses DOGM screen, so disable screen
#ifndef SCREEN_DRIVER
#define SCREEN_DRIVER SCREEN_NONE
#endif

// Ender 2 Pro uses the HC32F460C variant
#ifndef CHIPID_VARIANT_OVERRIDE
#define CHIPID_VARIANT_OVERRIDE chipid::variant::HC32F460C
#endif

// Serial ports
#ifndef HOST_SERIAL_TX
#define HOST_SERIAL_TX gpio::PA8
#endif

// Beeper pin
#ifndef BEEPER_PIN
#define BEEPER_PIN gpio::PC6
#endif

// SDIO pins
#ifndef SDIO_PINS
#define SDIO_PINS { gpio::PC12, gpio::PD2, gpio::PA10, gpio::PC8, gpio::PC9, gpio::PC10, gpio::PC11 }
#endif

// Ender 2 Pro bootloader disables JTDO, JTDI, and NJTRST
#ifndef COMPAT_DISABLE_DEBUG_PORT
#define COMPAT_DISABLE_DEBUG_PORT (COMPAT_DBG_JTDO | COMPAT_DBG_JTDI | COMPAT_DBG_NJTRST)
#endif