The sendCommand() function sends two bytes to the MAX7221. First is the command (or register address, really) and second is the value to be placed in that register. Both can be coded as decimal or hex values. The following are equivalent.
// prepare the 7221 to display 7-segment data - see data sheet
sendCommand(12, 1); // normal mode (default is shutdown mode);
sendCommand(15, 0); // Display test off
sendCommand(10, 8); // set medium intensity (range is 0-15)
sendCommand(11, numberOfDigits); // 7221 digit scan limit command
sendCommand(9, 255); // decode command, use standard 7-segment digits
// prepare the 7221 to display 7-segment data - see data sheet
sendCommand(0x0C, 1); // normal mode (default is shutdown mode);
sendCommand(0x0F, 0); // Display test off
sendCommand(0x0A, 8); // set medium intensity (range is 0-15)
sendCommand(0x0B, numberOfDigits); // 7221 digit scan limit command
sendCommand(0x09, 0xFF); // decode command, use standard 7-segment digits
Edit: This may be more readable. I've left most of the comments but they are perhaps less necessary, since cryptic numeric values that don't mean a whole lot are replaced by readable symbols that give a clue what they're about.
#define MAX72_DECODE 0x09
#define MAX72_INTENSITY 0x0A
#define MAX72_SCANLIMIT 0x0B
#define MAX72_ENABLE 0x0C
#define MAX72_DISPLAYTEST 0x0F
// prepare the 7221 to display 7-segment data - see data sheet
sendCommand(MAX72_ENABLE, 1); //chip/display enabled
sendCommand(MAX72_DISPLAYTEST, 0); //display test off
sendCommand(MAX72_INTENSITY, 8); //medium intensity (range is 0-15)
sendCommand(MAX72_SCANLIMIT, numberOfDigits);
sendCommand(MAX72_DECODE, 0xFF); //standard 7-segment decoding