Добавление флага write в MB_DefineRegistersAddress

И рефакторинг дефайнов размеров сообщения
This commit is contained in:
2025-11-30 21:20:25 +03:00
parent e0ce0e6dbf
commit df3f71cdff
10 changed files with 58 additions and 53 deletions

View File

@@ -24,7 +24,7 @@
4. Инициализировать через RS_Init() и запустить прием RS_Receive_IT()
@section features Особенности:
- Буфер: RS_Buffer[MSG_SIZE_MAX] Общий для приема/передачи
- Буфер: RS_Buffer[RS_MSG_SIZE_MAX] Общий для приема/передачи
- Состояния: отслеживается через флаги в RS_HandleTypeDef
- Таймауты: контролируют максимальное время ожидания фрейма
******************************************************************************/
@@ -36,8 +36,8 @@
/////////////////////////////////////////////////////////////////////
////////////////////////////---DEFINES---////////////////////////////
/* Check that all defines required by RS are defined */
#ifndef MSG_SIZE_MAX
#error Define MSG_SIZE_MAX (Maximum size of message). This is necessary to create buffer for UART.
#ifndef RS_MSG_SIZE_MAX
#error Define RS_MSG_SIZE_MAX (Maximum size of message). This is necessary to create buffer for UART.
#endif
/**
@@ -45,7 +45,7 @@
*/
/* Clear message-uart buffer */
#define RS_Clear_Buff(_buff_) for(int i=0; i<MSG_SIZE_MAX;i++) _buff_[i] = NULL
#define RS_Clear_Buff(_buff_) for(int i=0; i<RS_MSG_SIZE_MAX;i++) _buff_[i] = NULL
/* Set/Reset flags */
#define RS_Set_Free(_hRS_) _hRS_->f.RS_Busy = 0