Move T (tool change) to cpp

This commit is contained in:
Scott Lahteine
2017-09-18 01:05:44 -05:00
parent 927524af6b
commit 07cf75883f
6 changed files with 24 additions and 20 deletions

View File

@ -84,6 +84,15 @@
#if ENABLED(PARKING_EXTRUDER)
void pe_magnet_init() {
for (uint8_t n = 0; n <= 1; ++n)
#if ENABLED(PARKING_EXTRUDER_SOLENOIDS_INVERT)
pe_activate_magnet(n);
#else
pe_deactivate_magnet(n);
#endif
}
void pe_set_magnet(const uint8_t extruder_num, const uint8_t state) {
switch (extruder_num) {
case 1: OUT_WRITE(SOL1_PIN, state); break;

View File

@ -46,6 +46,8 @@
inline void pe_activate_magnet(const uint8_t extruder_num) { pe_set_magnet(extruder_num, PE_MAGNET_ON_STATE); }
inline void pe_deactivate_magnet(const uint8_t extruder_num) { pe_set_magnet(extruder_num, !PE_MAGNET_ON_STATE); }
void pe_magnet_init();
#endif // PARKING_EXTRUDER
/**