Microchip® Advanced Software Framework

conf_test.h File Reference

Unit test configuration.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

Macros

Unit test configuration
#define CONF_TEST_SPI   SPI
 SPI instance to perform unit tests on. More...
 
#define CONF_TEST_SPI_ID   SPI_IRQn
 SPI ID for test. More...
 
#define CONF_TEST_SPI_NPCS   1
 NPCS used for test. More...
 
#define CONF_TEST_SPI_HANDLER   SPI_Handler
 SPI handler for vector table. More...
 
#define CONF_TEST_DF
 Defined to enable on-board dataflash test. More...
 
#define CONF_TEST_DF_NPCS   2
 NPCS used for SPI to communicate with DataFlash. More...
 
#define CONF_TEST_DF_ID   0x0000481F
 DataFlash ID expected. More...
 
#define CONF_TEST_DF_PAGE_SIZE   256
 Page size for the DataFlash. More...
 
#define CONF_TEST_DF_ADDRESS   (4*1024*1024-4*1024)
 DataFlash address used for Erase-Write-Read test. More...
 
#define CONF_TEST_USART   USART2
 USART to redirect STDIO to. More...
 
#define CONF_TEST_BAUDRATE   115200
 Baudrate of USART. More...
 
#define CONF_TEST_CHARLENGTH   US_MR_CHRL_8_BIT
 Character length (bits) of USART. More...
 
#define CONF_TEST_PARITY   US_MR_PAR_NO
 Parity mode of USART. More...
 
#define CONF_TEST_STOPBITS   US_MR_NBSTOP_1_BIT
 Stopbit configuration of USART. More...
 

#define CONF_TEST_BAUDRATE   115200

Baudrate of USART.

Baudrate setting : 115200.

Referenced by main().

#define CONF_TEST_CHARLENGTH   US_MR_CHRL_8_BIT

Character length (bits) of USART.

Char setting : 8-bit character length (don't care for UART)

Referenced by main().

#define CONF_TEST_DF

Defined to enable on-board dataflash test.

SPI DataFlash settings.

Note
DataFlash test will use the previously defined Base and ID of SPI.
The following *_DF_* is used only when CONF_TEST_DF is defined.

Define CONF_TEST_DF to enable DataFlash test.DataFlash test enable

#define CONF_TEST_DF_ADDRESS   (4*1024*1024-4*1024)

DataFlash address used for Erase-Write-Read test.

DataFlash address to test (last block)

Referenced by run_spi_dataflash_test().

#define CONF_TEST_DF_ID   0x0000481F

DataFlash ID expected.

DataFlash ID expected (AT25DF641A)

Referenced by run_spi_dataflash_test().

#define CONF_TEST_DF_NPCS   2

NPCS used for SPI to communicate with DataFlash.

DataFlash NPCS (using CONF_TEST_SPI for SPI)

Referenced by run_spi_dataflash_test().

#define CONF_TEST_DF_PAGE_SIZE   256

Page size for the DataFlash.

DataFlash Page Size.

Referenced by run_spi_dataflash_test().

#define CONF_TEST_PARITY   US_MR_PAR_NO

Parity mode of USART.

Parity setting : No parity check.

Referenced by main().

#define CONF_TEST_SPI   SPI

SPI instance to perform unit tests on.

Perform unit tests using SPI.

SPI base for test.

Referenced by CONF_TEST_SPI_HANDLER(), run_spi_ctrl_test(), run_spi_dataflash_test(), run_spi_trans_test(), run_spi_writeprotect_test(), and spi_send_cmd().

#define CONF_TEST_SPI_HANDLER   SPI_Handler

SPI handler for vector table.

Unit test SPI handler in vector table.

See Also
exceptions.h
#define CONF_TEST_SPI_ID   SPI_IRQn

SPI ID for test.

Unit test SPI ID.

Referenced by run_spi_trans_test().

#define CONF_TEST_SPI_NPCS   1

NPCS used for test.

Unit test SPI NPCS.

Referenced by run_spi_trans_test(), and run_spi_writeprotect_test().

#define CONF_TEST_STOPBITS   US_MR_NBSTOP_1_BIT

Stopbit configuration of USART.

Stopbit setting : No extra stopbit, i.e., use 1 (don't care for UART)

Referenced by main().

#define CONF_TEST_USART   USART2

USART to redirect STDIO to.

USART Interface : Console UART.

Referenced by main().