64 lines
1.5 KiB
C
64 lines
1.5 KiB
C
/*
|
||
* my_defs.h
|
||
*
|
||
* Created on: 2 февр. 2022 г.
|
||
* Author: fedorenko
|
||
*/
|
||
|
||
#ifndef INC_MY_DEFS_H_
|
||
#define INC_MY_DEFS_H_
|
||
|
||
|
||
/* ------------------------
|
||
* Configuration
|
||
* ------------------------ */
|
||
#define COM_MES_MODE_NORMAL 0
|
||
#define COM_MES_MODE_FACTORY 1
|
||
|
||
#ifndef COM_MES_MODE
|
||
#define COM_MES_MODE COM_MES_MODE_NORMAL /* Mode selection */
|
||
#endif
|
||
|
||
#define COM_MES_CBIT_DISABLED 0
|
||
#define COM_MES_CBIT_ENABLED 1
|
||
|
||
#ifndef COM_MES_CBIT
|
||
#define COM_MES_CBIT COM_MES_CBIT_DISABLED /* CBIT selection */
|
||
#endif
|
||
|
||
#define COM_MES_RATE_RANGE_INT 0
|
||
#define COM_MES_RATE_RANGE_SPI 1
|
||
|
||
#ifndef COM_MES_RATE_RANGE
|
||
#define COM_MES_RATE_RANGE COM_MES_RATE_RANGE_INT /* Rate range selection */
|
||
#endif
|
||
|
||
#define COM_MES_RATE_RANGE_900 0u
|
||
#define COM_MES_RATE_RANGE_300 1u
|
||
#define COM_MES_RATE_RANGE_150 2u
|
||
#define COM_MES_RATE_RANGE_75 3u
|
||
|
||
#ifndef COM_MES_RATE_RANGE_VAL
|
||
#define COM_MES_RATE_RANGE_VAL COM_MES_RATE_RANGE_900 /* Rate range value selection */
|
||
#endif
|
||
|
||
#define SCALE_RATE_RANGE_900 8u
|
||
#define SCALE_RATE_RANGE_300 24u
|
||
#define SCALE_RATE_RANGE_150 48u
|
||
#define SCALE_RATE_RANGE_75 96u
|
||
|
||
/* ------------------------
|
||
* Errors
|
||
* ------------------------ */
|
||
|
||
#define ERROR_SIZE_SMALL 1
|
||
#define ERROR_CRC 2
|
||
#define ERROR_FAIL 3
|
||
#define ERROR_IDENTIFIER 4
|
||
#define ERROR_INVALID 5
|
||
#define ERROR_CBIT 6
|
||
#define ERROR_NORM 7
|
||
#define ERROR_RATE 8
|
||
|
||
#endif /* INC_MY_DEFS_H_ */
|