29 lines
558 B
C
29 lines
558 B
C
#include <stdint.h>
|
|
#include <math.h>
|
|
#include <string.h> // do memset
|
|
|
|
// Definicje typów z tdefs.h
|
|
typedef uint8_t u8;
|
|
typedef uint16_t u16;
|
|
typedef uint32_t u32;
|
|
|
|
// Prosta struktura dla sygnałów binarnych (wejścia/wyjścia logiczne)
|
|
struct binary_io
|
|
{
|
|
int val; // 0 lub 1
|
|
};
|
|
|
|
// Struktury parametrów analogowych (np. przekładniki)
|
|
struct param_I_struct
|
|
{
|
|
float znam_wtor; // np. 1.0 lub 5.0 A
|
|
float znam_pierw; // np. 400.0 A
|
|
};
|
|
|
|
struct param_U_struct
|
|
{
|
|
float znam_wtor; // np. 100.0 V
|
|
float znam_pierw; // np. 110000.0 V
|
|
};
|
|
|