Updated the documentation

copy past from Marlin_main.cpp doxygen documentation d-codes
This commit is contained in:
3d-gussner 2020-03-25 17:33:10 +01:00
parent 0d00db1c33
commit 4c518545f1
2 changed files with 155 additions and 125 deletions

View File

@ -100,16 +100,22 @@ void print_mem(uint32_t address, uint16_t count, uint8_t type, uint8_t countperl
#ifdef DEBUG_DCODE3 #ifdef DEBUG_DCODE3
#define EEPROM_SIZE 0x1000 #define EEPROM_SIZE 0x1000
/*! /*!
*
### D3 - Read/Write EEPROM <a href="https://reprap.org/wiki/G-code#D3:_Read.2FWrite_EEPROM">D3: Read/Write EEPROM</a> ### D3 - Read/Write EEPROM <a href="https://reprap.org/wiki/G-code#D3:_Read.2FWrite_EEPROM">D3: Read/Write EEPROM</a>
This command can be used without any additional parameters. It will read the entire eeprom. This command can be used without any additional parameters. It will read the entire eeprom.
#### Usage
D3 [ A | C | X ] D3 [ A | C | X ]
- `A` - Address (0x0000-0x0fff) #### Parameters
- `C` - Count (0x0001-0x1000) - `A` - Address (x0000-x0fff)
- `X` - Data - `C` - Count (1-4096)
* - `X` - Data (hex)
#### Notes
- The hex address needs to be lowercase without the 0 before the x
- Count is decimal
- The hex data needs to be lowercase
*/ */
void dcode_3() void dcode_3()
{ {
@ -206,13 +212,13 @@ void dcode__1()
#ifdef DEBUG_DCODES #ifdef DEBUG_DCODES
/*! /*!
*
### D0 - Reset <a href="https://reprap.org/wiki/G-code#D0:_Reset">D0: Reset</a> ### D0 - Reset <a href="https://reprap.org/wiki/G-code#D0:_Reset">D0: Reset</a>
#### Usage
D0 [ B ] D0 [ B ]
#### Parameters
- `B` - Bootloader - `B` - Bootloader
*
*/ */
void dcode_0() void dcode_0()
{ {
@ -251,16 +257,22 @@ void dcode_1()
} }
/*! /*!
* ### D2 - Read/Write RAM <a href="https://reprap.org/wiki/G-code#D2:_Read.2FWrite_RAM">D3: Read/Write RAM</a>
### D2 - Read/Write RAM <a href="https://reprap.org/wiki/G-code#D2:_Read.2FWrite_RAM">D2: Read/Write RAM</a>
This command can be used without any additional parameters. It will read the entire RAM. This command can be used without any additional parameters. It will read the entire RAM.
#### Usage
D2 [ A | C | X ] D2 [ A | C | X ]
- `A` - Address (0x0000-0x1fff) #### Parameters
- `C` - Count (0x0001-0x2000) - `A` - Address (x0000-x1fff)
- `C` - Count (1-8192)
- `X` - Data - `X` - Data
*
#### Notes
- The hex address needs to be lowercase without the 0 before the x
- Count is decimal
- The hex data needs to be lowercase
*/ */
void dcode_2() void dcode_2()
{ {
@ -306,17 +318,17 @@ void dcode_2()
} }
/*! /*!
*
### D4 - Read/Write PIN <a href="https://reprap.org/wiki/G-code#D4:_Read.2FWrite_PIN">D4: Read/Write PIN</a>
### D4 - Read/Write PIN <a href="https://reprap.org/wiki/G-code#D4:_Read.2FWrite_PIN">D4: Read/Write PIN</a>
To read the digital value of a pin you need only to define the pin number. To read the digital value of a pin you need only to define the pin number.
#### Usage
D4 [ P | F | V ] D4 [ P | F | V ]
#### Parameters
- `P` - Pin (0-255) - `P` - Pin (0-255)
- `F` - Function in/out (0/1) - `F` - Function in/out (0/1)
- `V` - Value (0/1) - `V` - Value (0/1)
*
*/ */
void dcode_4() void dcode_4()
{ {
@ -351,17 +363,23 @@ void dcode_4()
#ifdef DEBUG_DCODE5 #ifdef DEBUG_DCODE5
/*! /*!
*
### D5 - Read/Write FLASH <a href="https://reprap.org/wiki/G-code#D5:_Read.2FWrite_FLASH">D5: Read/Write Flash</a> ### D5 - Read/Write FLASH <a href="https://reprap.org/wiki/G-code#D5:_Read.2FWrite_FLASH">D5: Read/Write Flash</a>
This command can be used without any additional parameters. It will read the 1kb FLASH. This command can be used without any additional parameters. It will read the 1kb FLASH.
#### Usage
D5 [ A | C | X | E ] D5 [ A | C | X | E ]
- `A` - Address (0x00000-0x3ffff) #### Parameters
- `C` - Count (0x0001-0x2000) - `A` - Address (x00000-x3ffff)
- `C` - Count (1-8192)
- `X` - Data - `X` - Data
- `E` - Erase - `E` - Erase
*
#### Notes
- The hex address needs to be lowercase without the 0 before the x
- Count is decimal
- The hex data needs to be lowercase
*/ */
void dcode_5() void dcode_5()
{ {
@ -427,11 +445,8 @@ void dcode_5()
#ifdef DEBUG_DCODES #ifdef DEBUG_DCODES
/*! /*!
*
### D6 - Read/Write external FLASH <a href="https://reprap.org/wiki/G-code#D6:_Read.2FWrite_external_FLASH">D6: Read/Write external Flash</a> ### D6 - Read/Write external FLASH <a href="https://reprap.org/wiki/G-code#D6:_Read.2FWrite_external_FLASH">D6: Read/Write external Flash</a>
Reserved Reserved
*
*/ */
void dcode_6() void dcode_6()
{ {
@ -439,11 +454,8 @@ void dcode_6()
} }
/*! /*!
*
### D7 - Read/Write Bootloader <a href="https://reprap.org/wiki/G-code#D7:_Read.2FWrite_Bootloader">D7: Read/Write Bootloader</a> ### D7 - Read/Write Bootloader <a href="https://reprap.org/wiki/G-code#D7:_Read.2FWrite_Bootloader">D7: Read/Write Bootloader</a>
Reserved Reserved
*
*/ */
void dcode_7() void dcode_7()
{ {
@ -461,16 +473,16 @@ void dcode_7()
} }
/*! /*!
*
### D8 - Read/Write PINDA <a href="https://reprap.org/wiki/G-code#D8:_Read.2FWrite_PINDA">D8: Read/Write PINDA</a> ### D8 - Read/Write PINDA <a href="https://reprap.org/wiki/G-code#D8:_Read.2FWrite_PINDA">D8: Read/Write PINDA</a>
#### Usage
D8 [ ? | ! | P | Z ] D8 [ ? | ! | P | Z ]
#### Parameters
- `?` - Read PINDA temperature shift values - `?` - Read PINDA temperature shift values
- `!` - Reset PINDA temperature shift values to default - `!` - Reset PINDA temperature shift values to default
- `P` - Pinda temperature [C] - `P` - Pinda temperature [C]
- `Z` - Z Offset [mm] - `Z` - Z Offset [mm]
*
*/ */
void dcode_8() void dcode_8()
{ {
@ -514,11 +526,12 @@ void dcode_8()
} }
/*! /*!
*
### D9 - Read ADC <a href="https://reprap.org/wiki/G-code#D9:_Read.2FWrite_ADC">D9: Read ADC</a> ### D9 - Read ADC <a href="https://reprap.org/wiki/G-code#D9:_Read.2FWrite_ADC">D9: Read ADC</a>
#### Usage
D9 [ I | V ] D9 [ I | V ]
#### Parameters
- `I` - ADC channel index - `I` - ADC channel index
- `0` - Heater 0 temperature - `0` - Heater 0 temperature
- `1` - Heater 1 temperature - `1` - Heater 1 temperature
@ -528,7 +541,6 @@ void dcode_8()
- `5` - Ambient temperature - `5` - Ambient temperature
- `6` - BED voltage - `6` - BED voltage
- `V` Value to be written as simulated - `V` Value to be written as simulated
*
*/ */
const char* dcode_9_ADC_name(uint8_t i) const char* dcode_9_ADC_name(uint8_t i)
{ {
@ -604,10 +616,7 @@ void dcode_9()
} }
/*! /*!
*
### D10 - Set XYZ calibration = OK <a href="https://reprap.org/wiki/G-code#D10:_Set_XYZ_calibration_.3D_OK">D10: Set XYZ calibration = OK</a> ### D10 - Set XYZ calibration = OK <a href="https://reprap.org/wiki/G-code#D10:_Set_XYZ_calibration_.3D_OK">D10: Set XYZ calibration = OK</a>
*
*/ */
void dcode_10() void dcode_10()
{//Tell the printer that XYZ calibration went OK {//Tell the printer that XYZ calibration went OK
@ -616,11 +625,10 @@ void dcode_10()
} }
/*! /*!
*
### D12 - Time <a href="https://reprap.org/wiki/G-code#D12:_Time">D12: Time</a> ### D12 - Time <a href="https://reprap.org/wiki/G-code#D12:_Time">D12: Time</a>
Writes the actual time in the log file.
*
*/ */
void dcode_12() void dcode_12()
{//Time {//Time
LOG("D12 - Time\n"); LOG("D12 - Time\n");
@ -632,37 +640,60 @@ void dcode_12()
#include "planner.h" #include "planner.h"
#include "tmc2130.h" #include "tmc2130.h"
extern void st_synchronize(); extern void st_synchronize();
/** /*!
* @brief D2130 Trinamic stepper controller ### D2130 - Trinamic stepper controller <a href="https://reprap.org/wiki/G-code#D2130:_Trinamic_stepper_controller">D2130: Trinamic stepper controller</a>
* D2130<axis><command>[subcommand][value] @todo Please review by owner of the code. RepRap Wiki Gcode needs to be updated after review of owner as well.
* * Axis
* * * 'X' #### Usage
* * * 'Y'
* * * 'Z' D2130 [ Axis | Command | Subcommand | Value ]
* * * 'E'
* * command #### Parameters
* * * '0' current off - Axis
* * * '1' current on - `X` - X stepper driver
* * * '+' single step - `Y` - Y stepper driver
* * * * value sereval steps - `Z` - Z stepper driver
* * * '-' dtto oposite direction - `E` - Extruder stepper driver
* * * '?' read register - Commands
* * * * "mres" - `0` - Current off
* * * * "step" - `1` - Current on
* * * * "mscnt" - `+` - Single step
* * * * "mscuract" - `-` - Single step oposite direction
* * * * "wave" - `NNN` - Value sereval steps
* * * '!' set register - `?` - Read register
* * * * "mres" - Subcommands for read register
* * * * "step" - `mres` - Micro step resolution. More information in datasheet '5.5.2 CHOPCONF Chopper Configuration'
* * * * "wave" - `step` - Step
* * * * *0, 180..250 meaning: off, 0.9..1.25, recommended value is 1.1 - `mscnt` - Microstep counter. More information in datasheet '5.5 Motor Driver Registers'
* * * '@' home calibrate axis - `mscuract` - Actual microstep current for motor. More information in datasheet '5.5 Motor Driver Registers'
- `wave` - Microstep linearity compensation curve
- `!` - Set register
- Subcommands for set register
- `mres` - Micro step resolution
- `step` - Step
- `wave` - Microstep linearity compensation curve
- Values for set register
- `0, 180 --> 250` - Off
- `0.9 --> 1.25` - Valid values (recommended is 1.1)
- `@` - Home calibrate axis
Examples:
D2130E?wave
Print extruder microstep linearity compensation curve
D2130E!wave0
Disable extruder linearity compensation curve, (sine curve is used)
D2130E!wave220
(sin(x))^1.1 extruder microstep compensation curve used
Notes:
For more information see https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2130_datasheet.pdf
* *
* Example:
* D2130E?wave //print extruder microstep linearity compensation curve
* D2130E!wave0 //disable extruder linearity compensation curve, (sine curve is used)
* D2130E!wave220 // (sin(x))^1.1 extruder microstep compensation curve used
*/ */
void dcode_2130() void dcode_2130()
{ {
@ -767,18 +798,18 @@ void dcode_2130()
#ifdef PAT9125 #ifdef PAT9125
/*! /*!
*
### D9125 - PAT9125 filament sensor <a href="https://reprap.org/wiki/G-code#D9:_Read.2FWrite_ADC">D9125: PAT9125 filament sensor</a> ### D9125 - PAT9125 filament sensor <a href="https://reprap.org/wiki/G-code#D9:_Read.2FWrite_ADC">D9125: PAT9125 filament sensor</a>
#### Usage
D9125 [ ? | ! | R | X | Y | L ] D9125 [ ? | ! | R | X | Y | L ]
#### Parameters
- `?` - Print values - `?` - Print values
- `!` - Print values - `!` - Print values
- `R` - Resolution. Not active in code - `R` - Resolution. Not active in code
- `X` - X values - `X` - X values
- `Y` - Y values - `Y` - Y values
- `L` - Activate filament sensor log - `L` - Activate filament sensor log
*
*/ */
void dcode_9125() void dcode_9125()
{ {

View File

@ -9105,7 +9105,6 @@ Sigma_Exit:
For more information see https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2130_datasheet.pdf For more information see https://www.trinamic.com/fileadmin/assets/Products/ICs_Documents/TMC2130_datasheet.pdf
* *
*/ */
case 2130: case 2130:
dcode_2130(); break; dcode_2130(); break;
#endif //TMC2130 #endif //TMC2130