#include "test_harness.h" #include "dma.h" #include #include #include TEST(dma, smoke) { dma_t* dma = &DMA1; memset(dma, sizeof(dma), 0); dma->is_bf.tcif1 = 1; ASSERT_EQ(dma->is_r, 2); dma->is_bf.htif7 = 1; ASSERT_EQ(dma->is_r, 67108866); } TEST(dma, correct_align) { dma_t dma; // Assert the DMA registers are aligned with what the spec says. ASSERT_EQ((long)(&dma.csel_r) - (long)(&dma), 0xA8); return 0; }