micropython-max7219
                                
                                
                                
                                    micropython-max7219 copied to clipboard
                            
                            
                            
                        Add method to switch to shutdown mode
From datasheet:
The devices include a 150μA low-power shutdown mode.. .. Shutdown Mode When the MAX7219 is in shutdown mode, the scan oscillator is halted, all segment current sources are pulled to ground, and all digit drivers are pulled to V+, thereby blanking the display. The MAX7221 is identical, except the drivers are high-impedance. Data in the digit and control registers remains unaltered. Shutdown can be used to save power or as an alarm to flash the display by successively entering and leaving shutdown mode. For minimum supply current in shutdown mode, logic inputs should be at ground or V+ (CMOS-logic levels).
It is possible to initiate the shutdown mode by calling a private method:
display._write(const(12), 0)
but calling a public method (e. g. display.shutdown) would be nicer.