123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- #ifndef _UNIT_TEST_H_
- #define _UNIT_TEST_H_
- #define HAVE_INTTYPES_H @HAVE_INTTYPES_H@
- #define HAVE_STDINT_H @HAVE_STDINT_H@
- #ifdef HAVE_INTTYPES_H
- #include <inttypes.h>
- #endif
- #ifdef HAVE_STDINT_H
- # ifndef _MSC_VER
- # include <stdint.h>
- # else
- # include "stdint.h"
- # endif
- #endif
- #define SERVER_ID 17
- #define INVALID_SERVER_ID 18
- const uint16_t UT_BITS_ADDRESS = 0x130;
- const uint16_t UT_BITS_NB = 0x25;
- const uint8_t UT_BITS_TAB[] = { 0xCD, 0x6B, 0xB2, 0x0E, 0x1B };
- const uint16_t UT_INPUT_BITS_ADDRESS = 0x1C4;
- const uint16_t UT_INPUT_BITS_NB = 0x16;
- const uint8_t UT_INPUT_BITS_TAB[] = { 0xAC, 0xDB, 0x35 };
- const uint16_t UT_REGISTERS_ADDRESS = 0x160;
- const uint16_t UT_REGISTERS_NB = 0x3;
- const uint16_t UT_REGISTERS_NB_MAX = 0x20;
- const uint16_t UT_REGISTERS_TAB[] = { 0x022B, 0x0001, 0x0064 };
- const uint16_t UT_REGISTERS_ADDRESS_SPECIAL = 0x170;
- const uint16_t UT_REGISTERS_ADDRESS_INVALID_TID_OR_SLAVE = 0x171;
- const uint16_t UT_REGISTERS_ADDRESS_SLEEP_500_MS = 0x172;
- const uint16_t UT_REGISTERS_ADDRESS_BYTE_SLEEP_5_MS = 0x173;
- const uint16_t UT_REGISTERS_NB_SPECIAL = 0x2;
- const uint16_t UT_INPUT_REGISTERS_ADDRESS = 0x108;
- const uint16_t UT_INPUT_REGISTERS_NB = 0x1;
- const uint16_t UT_INPUT_REGISTERS_TAB[] = { 0x000A };
- const float UT_REAL = 123456.00;
- const uint8_t UT_IREAL_ABCD_SET[] = {0x47, 0xF1, 0x20, 0x00};
- const uint16_t UT_IREAL_ABCD_GET[] = {0x47F1, 0x2000};
- const uint8_t UT_IREAL_DCBA_SET[] = {0x00, 0x20, 0xF1, 0x47};
- const uint16_t UT_IREAL_DCBA_GET[] = {0x0020, 0xF147};
- const uint8_t UT_IREAL_BADC_SET[] = {0xF1, 0x47, 0x00, 0x20};
- const uint16_t UT_IREAL_BADC_GET[] = {0xF147, 0x0020};
- const uint8_t UT_IREAL_CDAB_SET[] = {0x20, 0x00, 0x47, 0xF1};
- const uint16_t UT_IREAL_CDAB_GET[] = {0x2000, 0x47F1};
- #endif
|