STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
test_sd_spi.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "sd_spi.h"
Include dependency graph for test_sd_spi.c:

Go to the source code of this file.

Macros

#define CHECK(condition)

Functions

static void test_command_frames (void)
static void test_r1 (void)
static void test_r7 (void)
static void test_cid (void)
int main (void)

Macro Definition Documentation

◆ CHECK

#define CHECK ( condition)
Value:
do { \
if (!(condition)) { \
fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, #condition); \
exit(1); \
} \
} while (0)

Definition at line 7 of file test_sd_spi.c.

Referenced by test_cid(), test_command_frames(), test_r1(), and test_r7().

Function Documentation

◆ main()

int main ( void )

Definition at line 77 of file test_sd_spi.c.

References test_cid(), test_command_frames(), test_r1(), and test_r7().

◆ test_cid()

void test_cid ( void )
static

Definition at line 57 of file test_sd_spi.c.

References CHECK, and sd_cid_ok().

Referenced by main().

◆ test_command_frames()

void test_command_frames ( void )
static

◆ test_r1()

void test_r1 ( void )
static

Definition at line 41 of file test_sd_spi.c.

References CHECK, sd_is_r1(), SD_R1_IDLE, and SD_R1_ILLEGAL_COMMAND.

Referenced by main().

◆ test_r7()

void test_r7 ( void )
static

Definition at line 48 of file test_sd_spi.c.

References CHECK, and sd_r7_ok().

Referenced by main().