Prusa MINI Firmware overview
hex_print_routines.cpp File Reference

Functions

char * hex_byte (const uint8_t b)
 
void _hex_word (const uint16_t w)
 
char * hex_word (const uint16_t w)
 
char * hex_address (const void *const w)
 
void print_hex_nybble (const uint8_t n)
 
void print_hex_byte (const uint8_t b)
 
void print_hex_word (const uint16_t w)
 
void print_hex_address (const void *const w)
 
void print_hex_long (const uint32_t w, const char delimiter)
 

Variables

constexpr int byte_start = 0
 
static char _hex [] = "0x0000"
 

Function Documentation

◆ hex_byte()

char* hex_byte ( const uint8_t  b)
38  {
39  _hex[byte_start + 4] = hex_nybble(b >> 4);
40  _hex[byte_start + 5] = hex_nybble(b);
41  return &_hex[byte_start + 4];
42  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _hex_word()

void _hex_word ( const uint16_t  w)
44  {
45  _hex[byte_start + 2] = hex_nybble(w >> 12);
46  _hex[byte_start + 3] = hex_nybble(w >> 8);
47  _hex[byte_start + 4] = hex_nybble(w >> 4);
48  _hex[byte_start + 5] = hex_nybble(w);
49  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hex_word()

char* hex_word ( const uint16_t  w)
51  {
52  _hex_word(w);
53  return &_hex[byte_start + 2];
54  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ hex_address()

char* hex_address ( const void *const  w)
67  {
68  #ifdef CPU_32_BIT
69  (void)hex_long((ptr_int_t)w);
70  #else
71  (void)hex_word((ptr_int_t)w);
72  #endif
73  return _hex;
74  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_hex_nybble()

void print_hex_nybble ( const uint8_t  n)
76 { SERIAL_CHAR(hex_nybble(n)); }
Here is the call graph for this function:

◆ print_hex_byte()

void print_hex_byte ( const uint8_t  b)
77 { SERIAL_ECHO(hex_byte(b)); }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ print_hex_word()

void print_hex_word ( const uint16_t  w)
78 { SERIAL_ECHO(hex_word(w)); }
Here is the call graph for this function:

◆ print_hex_address()

void print_hex_address ( const void *const  w)
79 { SERIAL_ECHO(hex_address(w)); }
Here is the call graph for this function:

◆ print_hex_long()

void print_hex_long ( const uint32_t  w,
const char  delimiter 
)
81  {
82  SERIAL_ECHOPGM("0x");
83  for (int B = 24; B >= 8; B -= 8){
84  print_hex_byte(w >> B);
85  SERIAL_CHAR(delimiter);
86  }
87  print_hex_byte(w);
88  }
Here is the call graph for this function:

Variable Documentation

◆ byte_start

constexpr int byte_start = 0
constexpr

Marlin 3D Printer Firmware Copyright (c) 2019 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]

Based on Sprinter and grbl. Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

◆ _hex

char _hex[] = "0x0000"
static
SERIAL_CHAR
#define SERIAL_CHAR(x)
Definition: serial.h:69
SERIAL_ECHO
#define SERIAL_ECHO(x)
Definition: serial.h:70
ptr_int_t
uint16_t ptr_int_t
Definition: hex_print_routines.h:46
_hex_word
void _hex_word(const uint16_t w)
Definition: hex_print_routines.cpp:44
hex_nybble
FORCE_INLINE char hex_nybble(const uint8_t n)
Definition: hex_print_routines.h:30
print_hex_byte
void print_hex_byte(const uint8_t b)
Definition: hex_print_routines.cpp:77
_hex
static char _hex[]
Definition: hex_print_routines.cpp:35
hex_word
char * hex_word(const uint16_t w)
Definition: hex_print_routines.cpp:51
void
void
Definition: png.h:1083
SERIAL_ECHOPGM
#define SERIAL_ECHOPGM(S)
Definition: serial.h:173
hex_byte
char * hex_byte(const uint8_t b)
Definition: hex_print_routines.cpp:38
byte_start
constexpr int byte_start
Definition: hex_print_routines.cpp:34
hex_address
char * hex_address(const void *const w)
Definition: hex_print_routines.cpp:67
createSpeedLookupTable.b
list b
Definition: createSpeedLookupTable.py:30