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

Go to the source code of this file.

Macros

#define CHECK(c)

Functions

static void healthy (fake_regs_t *f)
static void test_init_writes_the_datasheet_configuration (void)
static void test_wrong_identity_is_refused_before_any_write (void)
static void test_dead_bus_reads_ff_and_is_refused (void)
static void test_reset_that_never_finishes_times_out (void)
static void test_register_that_does_not_read_back_fails (void)
static void test_bus_error_is_reported (void)
static void test_read_decodes_the_burst (void)
static void test_missing_arguments_are_refused (void)
int main (void)

Macro Definition Documentation

◆ CHECK

Function Documentation

◆ healthy()

◆ main()

◆ test_bus_error_is_reported()

void test_bus_error_is_reported ( void )
static

Definition at line 76 of file test_ism330dhcx.c.

References CHECK, DEV_ERR_BUS, fake_regs_t::fail_after, fake_regs_bus(), healthy(), and ism330_init().

Referenced by main().

◆ test_dead_bus_reads_ff_and_is_refused()

void test_dead_bus_reads_ff_and_is_refused ( void )
static

Definition at line 50 of file test_ism330dhcx.c.

References CHECK, DEV_ERR_ID, fake_regs_bus(), fake_regs_init(), ism330_init(), and fake_regs_t::regs.

Referenced by main().

◆ test_init_writes_the_datasheet_configuration()

void test_init_writes_the_datasheet_configuration ( void )
static

◆ test_missing_arguments_are_refused()

void test_missing_arguments_are_refused ( void )
static

Definition at line 105 of file test_ism330dhcx.c.

References CHECK, DEV_ERR_PARAM, fake_regs_bus(), healthy(), ism330_init(), ism330_read(), and NULL.

Referenced by main().

◆ test_read_decodes_the_burst()

void test_read_decodes_the_burst ( void )
static

◆ test_register_that_does_not_read_back_fails()

void test_register_that_does_not_read_back_fails ( void )
static

◆ test_reset_that_never_finishes_times_out()

void test_reset_that_never_finishes_times_out ( void )
static

◆ test_wrong_identity_is_refused_before_any_write()

void test_wrong_identity_is_refused_before_any_write ( void )
static

Definition at line 41 of file test_ism330dhcx.c.

References CHECK, DEV_ERR_ID, fake_regs_bus(), healthy(), ism330_init(), fake_regs_t::regs, and fake_regs_t::writes.

Referenced by main().