Merge pull request #2354 from 3d-gussner/MK3-Gcode_documentation
Gcode doxygen documentation
This commit is contained in:
commit
8d3f14c292
@ -99,6 +99,18 @@ void print_mem(uint32_t address, uint16_t count, uint8_t type, uint8_t countperl
|
||||
|
||||
#ifdef DEBUG_DCODE3
|
||||
#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>
|
||||
This command can be used without any additional parameters. It will read the entire eeprom.
|
||||
|
||||
D3 [ A | C | X ]
|
||||
|
||||
- `A` - Address (0x0000-0x0fff)
|
||||
- `C` - Count (0x0001-0x1000)
|
||||
- `X` - Data
|
||||
*
|
||||
*/
|
||||
void dcode_3()
|
||||
{
|
||||
DBG(_N("D3 - Read/Write EEPROM\n"));
|
||||
@ -176,6 +188,14 @@ extern float axis_steps_per_unit[NUM_AXIS];
|
||||
#endif //0
|
||||
#define LOG(args...)
|
||||
|
||||
/*!
|
||||
*
|
||||
### D-1 - Endless Loop <a href="https://reprap.org/wiki/G-code#G28:_Move_to_Origin_.28Home.29">D-1: Endless Loop</a>
|
||||
|
||||
D-1
|
||||
|
||||
*
|
||||
*/
|
||||
void dcode__1()
|
||||
{
|
||||
printf_P(PSTR("D-1 - Endless loop\n"));
|
||||
@ -185,6 +205,15 @@ void dcode__1()
|
||||
|
||||
#ifdef DEBUG_DCODES
|
||||
|
||||
/*!
|
||||
*
|
||||
### D0 - Reset <a href="https://reprap.org/wiki/G-code#D0:_Reset">D0: Reset</a>
|
||||
|
||||
D0 [ B ]
|
||||
|
||||
- `B` - Bootloader
|
||||
*
|
||||
*/
|
||||
void dcode_0()
|
||||
{
|
||||
if (*(strchr_pointer + 1) == 0) return;
|
||||
@ -203,6 +232,14 @@ void dcode_0()
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
*
|
||||
### D1 - Clear EEPROM and RESET <a href="https://reprap.org/wiki/G-code#D1:_Clear_EEPROM_and_RESET">D1: Clear EEPROM and RESET</a>
|
||||
|
||||
D1
|
||||
|
||||
*
|
||||
*/
|
||||
void dcode_1()
|
||||
{
|
||||
LOG("D1 - Clear EEPROM and RESET\n");
|
||||
@ -213,6 +250,18 @@ void dcode_1()
|
||||
while(1);
|
||||
}
|
||||
|
||||
/*!
|
||||
*
|
||||
### D2 - Read/Write RAM <a href="https://reprap.org/wiki/G-code#D2:_Read.2FWrite_RAM">D3: Read/Write RAM</a>
|
||||
This command can be used without any additional parameters. It will read the entire RAM.
|
||||
|
||||
D3 [ A | C | X ]
|
||||
|
||||
- `A` - Address (0x0000-0x1fff)
|
||||
- `C` - Count (0x0001-0x2000)
|
||||
- `X` - Data
|
||||
*
|
||||
*/
|
||||
void dcode_2()
|
||||
{
|
||||
LOG("D2 - Read/Write RAM\n");
|
||||
@ -256,6 +305,19 @@ void dcode_2()
|
||||
}*/
|
||||
}
|
||||
|
||||
/*!
|
||||
*
|
||||
### 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.
|
||||
|
||||
D4 [ P | F | V ]
|
||||
|
||||
- `P` - Pin (0-255)
|
||||
- `F` - Function in/out (0/1)
|
||||
- `V` - Value (0/1)
|
||||
*
|
||||
*/
|
||||
void dcode_4()
|
||||
{
|
||||
LOG("D4 - Read/Write PIN\n");
|
||||
@ -288,6 +350,19 @@ void dcode_4()
|
||||
|
||||
#ifdef DEBUG_DCODE5
|
||||
|
||||
/*!
|
||||
*
|
||||
### 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.
|
||||
|
||||
D3 [ A | C | X | E ]
|
||||
|
||||
- `A` - Address (0x00000-0x3ffff)
|
||||
- `C` - Count (0x0001-0x2000)
|
||||
- `X` - Data
|
||||
- `E` - Erase
|
||||
*
|
||||
*/
|
||||
void dcode_5()
|
||||
{
|
||||
printf_P(PSTR("D5 - Read/Write FLASH\n"));
|
||||
@ -351,11 +426,25 @@ void dcode_5()
|
||||
|
||||
#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>
|
||||
|
||||
Reserved
|
||||
*
|
||||
*/
|
||||
void dcode_6()
|
||||
{
|
||||
LOG("D6 - Read/Write external FLASH\n");
|
||||
}
|
||||
|
||||
/*!
|
||||
*
|
||||
### D7 - Read/Write Bootloader <a href="https://reprap.org/wiki/G-code#D7:_Read.2FWrite_Bootloader">D7: Read/Write Bootloader</a>
|
||||
|
||||
Reserved
|
||||
*
|
||||
*/
|
||||
void dcode_7()
|
||||
{
|
||||
LOG("D7 - Read/Write Bootloader\n");
|
||||
@ -371,6 +460,18 @@ 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 [ ? | ! | P | Z ]
|
||||
|
||||
- `?` - Read PINDA temperature shift values
|
||||
- `!` - Reset PINDA temperature shift values to default
|
||||
- `P` - Pinda temperature [C]
|
||||
- `Z` - Z Offset [mm]
|
||||
*
|
||||
*/
|
||||
void dcode_8()
|
||||
{
|
||||
printf_P(PSTR("D8 - Read/Write PINDA\n"));
|
||||
@ -412,6 +513,23 @@ void dcode_8()
|
||||
printf_P(PSTR("temp_pinda=%d offset_z=%d.%03d\n"), (int)temp_pinda, (int)offset_z, ((int)(1000 * offset_z) % 1000));
|
||||
}
|
||||
|
||||
/*!
|
||||
*
|
||||
### D9 - Read ADC <a href="https://reprap.org/wiki/G-code#D9:_Read.2FWrite_ADC">D9: Read ADC</a>
|
||||
|
||||
D9 [ I | V ]
|
||||
|
||||
- `I` - ADC channel index
|
||||
- `0` - Heater 0 temperature
|
||||
- `1` - Heater 1 temperature
|
||||
- `2` - Bed temperature
|
||||
- `3` - PINDA temperature
|
||||
- `4` - PWR voltage
|
||||
- `5` - Ambient temperature
|
||||
- `6` - BED voltage
|
||||
- `V` Value to be written as simulated
|
||||
*
|
||||
*/
|
||||
const char* dcode_9_ADC_name(uint8_t i)
|
||||
{
|
||||
switch (i)
|
||||
@ -485,12 +603,24 @@ 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>
|
||||
|
||||
*
|
||||
*/
|
||||
void dcode_10()
|
||||
{//Tell the printer that XYZ calibration went OK
|
||||
LOG("D10 - XYZ calibration = OK\n");
|
||||
calibration_status_store(CALIBRATION_STATUS_LIVE_ADJUST);
|
||||
}
|
||||
|
||||
/*!
|
||||
*
|
||||
### D12 - Time <a href="https://reprap.org/wiki/G-code#D12:_Time">D12: Time</a>
|
||||
|
||||
*
|
||||
*/
|
||||
void dcode_12()
|
||||
{//Time
|
||||
LOG("D12 - Time\n");
|
||||
@ -636,6 +766,20 @@ void dcode_2130()
|
||||
#endif //TMC2130
|
||||
|
||||
#ifdef PAT9125
|
||||
/*!
|
||||
*
|
||||
### D9125 - PAT9125 filament sensor <a href="https://reprap.org/wiki/G-code#D9:_Read.2FWrite_ADC">D9125: PAT9125 filament sensor</a>
|
||||
|
||||
D9125 [ ? | ! | R | X | Y | L ]
|
||||
|
||||
- `?` - Print values
|
||||
- `!` - Print values
|
||||
- `R` - Resolution. Not active in code
|
||||
- `X` - X values
|
||||
- `Y` - Y values
|
||||
- `L` - Activate filament sensor log
|
||||
*
|
||||
*/
|
||||
void dcode_9125()
|
||||
{
|
||||
LOG("D9125 - PAT9125\n");
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user