3-phase PV router
Loading...
Searching...
No Matches
test_main.cpp File Reference

The ROM search of onewire_search.h, on a simulated 1-Wire bus. More...

#include <unity.h>
#include <stdint.h>
#include <string.h>
#include "onewire_search.h"
Include dependency graph for test_main.cpp:

Go to the source code of this file.

Functions

int main ()
 
void setUp ()
 
void tearDown ()
 
void test_codes_differing_in_their_last_bit ()
 
void test_devices_unplugged_between_two_searches ()
 
void test_eight_devices ()
 
void test_four_devices_each_found_once ()
 
void test_no_device ()
 
void test_no_search_after_the_last_device ()
 
void test_one_device ()
 
void test_search_starts_over_after_a_reset_without_presence ()
 
void test_two_devices ()
 

Detailed Description

The ROM search of onewire_search.h, on a simulated 1-Wire bus.

The simulated bus is wired-AND, as the real one: a device sends a 0 by pulling the line low, so the master reads 1 only if every device in the search sends 1. After each bit and its complement, the master writes the branch it takes: the devices with the other bit leave the search until the next reset.

Definition in file test_main.cpp.

Function Documentation

◆ main()

int main ( void )

Definition at line 271 of file test_main.cpp.

Here is the call graph for this function:

◆ setUp()

void setUp ( void )

Definition at line 141 of file test_main.cpp.

◆ tearDown()

void tearDown ( void )

Definition at line 145 of file test_main.cpp.

◆ test_codes_differing_in_their_last_bit()

void test_codes_differing_in_their_last_bit ( )

Definition at line 180 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_devices_unplugged_between_two_searches()

void test_devices_unplugged_between_two_searches ( )

Definition at line 241 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_eight_devices()

void test_eight_devices ( )

Definition at line 208 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_four_devices_each_found_once()

void test_four_devices_each_found_once ( )

Definition at line 192 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_no_device()

void test_no_device ( )

Definition at line 149 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_no_search_after_the_last_device()

void test_no_search_after_the_last_device ( )

Definition at line 228 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_one_device()

void test_one_device ( )

Definition at line 157 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_search_starts_over_after_a_reset_without_presence()

void test_search_starts_over_after_a_reset_without_presence ( )

Definition at line 254 of file test_main.cpp.

Here is the caller graph for this function:

◆ test_two_devices()

void test_two_devices ( )

Definition at line 168 of file test_main.cpp.

Here is the caller graph for this function: