2013-11-30

SPI testing notes




























SPI testing notes

.END


// ***********************************************************************
// test050.h 2013nov29hkt0952
// ***********************************************************************

#include "led050.h"
#include "key050.h"
#include "adc050.h"
#include "eeprom050.h"
#include "spi080.h"
#include "mled080.h"

#define DEBUG 1
#define NO_DEBUG 0

void testMax7219DisplayEightDigitV093()
{
       while (1)
       {
      // *** SPI 0,0 to 0,8 ***
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_0, SLAVE_SELECT_0, WuyinsSpi0SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 0, 0, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_0, SLAVE_SELECT_1, WuyinsSpi0SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 0, 1, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_0, SLAVE_SELECT_2, WuyinsSpi0SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 0, 2, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_0, SLAVE_SELECT_3, WuyinsSpi0SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 0, 3, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_0, SLAVE_SELECT_4, WuyinsSpi0SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 0, 4, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_0, SLAVE_SELECT_5, WuyinsSpi0SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 0, 4, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_0, SLAVE_SELECT_6, WuyinsSpi0SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 0, 6, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_0, SLAVE_SELECT_7, WuyinsSpi0SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 0, 7, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_0, SLAVE_SELECT_8, WuyinsSpi0SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 0, 8, NO_DEBUG);

      // *** SPI 1,0 to 1,8 ***
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_1, SLAVE_SELECT_0, WuyinsSpi1SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 1, 0, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_1, SLAVE_SELECT_1, WuyinsSpi1SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 1, 1, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_1, SLAVE_SELECT_2, WuyinsSpi1SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 1, 2, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_1, SLAVE_SELECT_3, WuyinsSpi1SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 1, 3, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_1, SLAVE_SELECT_4, WuyinsSpi1SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 1, 4, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_1, SLAVE_SELECT_5, WuyinsSpi1SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 1, 5, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_1, SLAVE_SELECT_6, WuyinsSpi1SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 1, 6, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_1, SLAVE_SELECT_7, WuyinsSpi1SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 1, 7, NO_DEBUG);
      Max7219DisplayEightDigitV0903(SPI_CHANNEL_1, SLAVE_SELECT_8, WuyinsSpi1SselPortPinArrayPointerArrayV092, \
                                               5, 14, 1, 15, 15, 15, 1, 8, NO_DEBUG);
       }

}

// ***************************************************************************
// End
// ***************************************************************************

.END2

No comments:

Post a Comment