add timer and uart trans reg

This commit is contained in:
2022-02-02 10:53:58 +03:00
parent f1898e778e
commit 13f4055735
9 changed files with 216 additions and 75 deletions

View File

@@ -25,6 +25,7 @@
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "gyro_mes.h"
#include "my_defs.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
@@ -40,55 +41,6 @@
/* USER CODE BEGIN PD */
/* ------------------------
* 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
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/