void Write_Max7219(uchar address1,uchar dat1,uchar address2,uchar dat2) { bcm2835_gpio_write(Max7219_pinCS,LOW); Write_Max7219_byte(address1); Write_Max7219_byte(dat1); Write_Max7219_byte(address2); Write_Max7219_byte(dat2); bcm2835_gpio_write(Max7219_pinCS,HIGH); }
void Initial_comm( unsigned int address,unsigned int dat) { unsigned int i; CS0; //good = LED_N; /* for( ; good > 0; --good ) //Determine which one equipment operation { Write_Max7219_byte(0x00); //Write the address, that is, digital tube number Write_Max7219_byte(0x00); //Write data, that is, digital tube display digital }*/ for( i = 0; i < LED_N ; ++i) { Write_Max7219_byte(address); Write_Max7219_byte(dat); } CS1; }
void Write_Max7219(unsigned int address,unsigned int dat, unsigned int sel)//write data to MAX7219. { unsigned int good; CS0; good = LED_N; for( ; good > 0; --good ) //Determine which one equipment operation { Write_Max7219_byte(0x00); //Write the address, that is, digital tube number Write_Max7219_byte(0x00); //Write data, that is, digital tube display digital } Write_Max7219_byte(address); //Write the address, that is, digital tube number Write_Max7219_byte(dat); //Write data, that is, digital tube display digital good = sel ; for( ; good > 0; --good ) //Determine which one equipment operation { Write_Max7219_byte(0x00); //Write the address, that is, digital tube number Write_Max7219_byte(0x00); //Write data, that is, digital tube display dig } CS1; }