[Grbl_Esp32 PR#346] Introduced Machines directory for pin assignments

未分类 bolang 4个月前 (10-14) 51次浏览

Issue #346 | 状态: 已关闭 | 作者: MitchBradley | 创建时间: 2020-03-05


This PR replaces cpu_map.h with a Machines/ subdirectory containing individual .h files for each machine configuration. To select a configuration file, #include it in machine.h according to the instructions therein. It should not be necessary to modify any other file in the top level directory.

The files in Machines/ were derived by extracting fragments from cpu_map.h and applying modern formatting conventions (spaces instead of tabs, no trailing whitespace).

The name prefix “CPU_MAP” was changed to “MACHINE” for clarity.

custommachinetemplate.cpp was cleaned up and reworded to reflect the new file organization. The prototypes for customization functions were moved to grbl.h since they appear in common code, thus simplifying the include structure for custom machines. my_machine.h need not contain any prototypes, only #defines just like other machine definition files.

This patch has been tested under the Arduino IDE; all machine variants compile without error. Testing with platformIO is proceeding.

If this PR is accepted, I will edit the documentation accordingly.


评论 (1)

#1 – BarbourSmith 于 2020-03-05

This looks fantastic. I don’t have a deep enough knowledge to review, but I just wanted to say thank you for making this so flexible.


原始Issue: https://github.com/bdring/Grbl_Esp32/pull/346

喜欢 (0)