1
0
mirror of https://github.com/meekrosoft/fff synced 2026-01-28 02:34:28 +01:00

Add example for the weak linking

This commit is contained in:
Pauli Salmenrinne
2019-01-22 15:11:10 +02:00
parent 647737304d
commit 0a7fbeceec
25 changed files with 414 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
#include "sensor.fake.h"
DEFINE_FAKE_VALUE_FUNC( bool, sensor_init );
DEFINE_FAKE_VALUE_FUNC( float, sensor_read );
void TEST_sensor_generate_data( char* buffer, float value )
{
buffer[0] = 0x10;
buffer[1] = (int)(value);
buffer[2] = (value - buffer[1])*255;
}