firmware  v0.1.2
Chromation Spectrometer Dev-Kit
test_Spi.c
Go to the documentation of this file.
1 
5 #include "unity.h"
6 #include "test_Spi.h"
7 #include "Spi.h"
8 #include "ReadWriteBits.h"
9 
10 /* =====[ ClearSpiInterruptFlag ]===== */
11 void ClearSpiInterruptFlag_first_reads_SPI_status_register(void)
12 {
13  TEST_PASS();
14 }
15 void ClearSpiInterruptFlag_then_reads_SPI_data_register(void)
16 {
17  TEST_PASS();
18 }
19 
20 /* =====[ _SpiTransferIsDone ]===== */
21 void SpiTransferIsDone_returns_true_if_the_SPI_Interrupt_Flag_is_set(void)
22 {
23  /* =====[ Setup ]===== */
24  SetBit(Spi_SPSR, Spi_InterruptFlag);
25  /* =====[ Operate and Test ]===== */
26  TEST_ASSERT_TRUE(_SpiTransferIsDone());
27 }
28 void SpiTransferIsDone_returns_false_if_the_SPI_Interrupt_Flag_is_clear(void)
29 {
30  /* =====[ Setup ]===== */
31  ClearBit(Spi_SPSR, Spi_InterruptFlag);
32  /* =====[ Operate and Test ]===== */
33  TEST_ASSERT_FALSE(_SpiTransferIsDone());
34 }
35 
spi_ptr Spi_SPSR
SPI Status Register.
Spi.h declares SPI hardware types and variables common to the SPI Master and SPI Slave.
bool _SpiTransferIsDone(void)
Definition: Spi.h:88