ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
Loading...
Searching...
No Matches
main.c File Reference

Test application for the MB85RC1MT FRAM driver on TockOS. More...

#include <libents/storage/fifo.h>
#include <stdio.h>
#include <string.h>
#include <unity.h>

Go to the source code of this file.

Functions

void setUp (void)
 
void tearDown (void)
 
void test_fifo_put_ValidData (void)
 
void test_fifo_put_Sequential (void)
 
void test_fifo_put_Sequential_BufferFull (void)
 
void test_fifo_BufferEmpty (void)
 
void test_fifo_ValidData (void)
 
void test_fifo_Sequential (void)
 
void test_fifo_Sequential_BufferFull (void)
 
void test_fifo_buffer_len (void)
 
void test_fifo_buffer_clear (void)
 
void test_fifo_wraparound (void)
 
void test_fifo_load_buffer_state (void)
 
void test_fifo_peek (void)
 
void test_fifo_drop (void)
 
int main (void)
 

Detailed Description

Test application for the MB85RC1MT FRAM driver on TockOS.

Exercises basic FRAM read/write operations and boundary checks using the Unity testing framework.

Based on stm32/test/test_fram/test_fram.c from ENTS-node-firmware.

Author
Pritish Mahato
Date
2026-02-25

Copyright (c) 2026 jLab, UCSC

Definition in file main.c.

Function Documentation

◆ main()

◆ setUp()

void setUp ( void  )

Definition at line 24 of file main.c.

References fifo_buffer_clear().

◆ tearDown()

void tearDown ( void  )

Definition at line 26 of file main.c.

◆ test_fifo_buffer_clear()

void test_fifo_buffer_clear ( void  )

Definition at line 189 of file main.c.

References data, fifo_buffer_clear(), fifo_buffer_len(), fifo_put(), and FRAM_OK.

Referenced by main().

◆ test_fifo_buffer_len()

void test_fifo_buffer_len ( void  )

Definition at line 177 of file main.c.

References data, fifo_buffer_len(), and fifo_put().

Referenced by main().

◆ test_fifo_BufferEmpty()

void test_fifo_BufferEmpty ( void  )

Definition at line 71 of file main.c.

References data, data_len, fifo_get(), and FRAM_BUFFER_EMPTY.

Referenced by main().

◆ test_fifo_drop()

void test_fifo_drop ( void  )

Definition at line 333 of file main.c.

References fifo_buffer_clear(), fifo_buffer_len(), fifo_drop(), fifo_get(), fifo_put(), FRAM_BUFFER_EMPTY, FRAM_OK, and i.

Referenced by main().

◆ test_fifo_load_buffer_state()

void test_fifo_load_buffer_state ( void  )

Definition at line 281 of file main.c.

References fifo_buffer_clear(), fifo_get(), fifo_load_buffer_state(), fifo_put(), FRAM_OK, and i.

Referenced by main().

◆ test_fifo_peek()

void test_fifo_peek ( void  )

Definition at line 308 of file main.c.

References fifo_buffer_clear(), fifo_buffer_len(), fifo_peek(), fifo_put(), FRAM_OK, and i.

Referenced by main().

◆ test_fifo_put_Sequential()

void test_fifo_put_Sequential ( void  )

Definition at line 37 of file main.c.

References data, fifo_put(), FRAM_OK, and i.

Referenced by main().

◆ test_fifo_put_Sequential_BufferFull()

void test_fifo_put_Sequential_BufferFull ( void  )

Definition at line 55 of file main.c.

References data, fifo_put(), fifo_size(), FRAM_BUFFER_FULL, FRAM_OK, and i.

Referenced by main().

◆ test_fifo_put_ValidData()

void test_fifo_put_ValidData ( void  )

Definition at line 28 of file main.c.

References data, fifo_buffer_len(), fifo_put(), and FRAM_OK.

Referenced by main().

◆ test_fifo_Sequential()

void test_fifo_Sequential ( void  )

Definition at line 93 of file main.c.

References fifo_get(), fifo_put(), FRAM_OK, and i.

Referenced by main().

◆ test_fifo_Sequential_BufferFull()

void test_fifo_Sequential_BufferFull ( void  )

Definition at line 133 of file main.c.

References data, fifo_get(), fifo_put(), fifo_size(), FRAM_BUFFER_FULL, FRAM_OK, and i.

Referenced by main().

◆ test_fifo_ValidData()

void test_fifo_ValidData ( void  )

Definition at line 80 of file main.c.

References fifo_get(), fifo_put(), and FRAM_OK.

Referenced by main().

◆ test_fifo_wraparound()

void test_fifo_wraparound ( void  )