init
864
научка/code/pwm_motor_control/Modbus/Modbus.c
Normal file
@@ -0,0 +1,864 @@
|
||||
/********************************MODBUS*************************************
|
||||
Данный файл содержит базовые функции для реализации MODBUS.
|
||||
//-------------------Функции-------------------//
|
||||
@func user
|
||||
- MB_SetCoil
|
||||
- MB_ResetCoil
|
||||
|
||||
@func process message
|
||||
- MB_DefineRegistersAddress Определение "начального" адреса регистров
|
||||
- MB_DefineCoilsAddress Определение "начального" адреса коилов
|
||||
- MB_Check_Address_For_Arr принадлежит ли адресс Addr конкретному массиву
|
||||
- Modbus_Command_x Обработка команды x
|
||||
|
||||
@func RS functions
|
||||
- Parse_Message/Collect_Message Заполнение структуры сообщения и буфера
|
||||
- RS_Response Ответ на комманду
|
||||
- RS_Define_Size_of_RX_Message Определение размера принимаемых данных
|
||||
- RS_Init Инициализация периферии и modbus handler
|
||||
|
||||
@func initialization
|
||||
- MB_Init Инициализация modbus
|
||||
|
||||
//--------------Данные для модбас--------------//
|
||||
@registers Holding/Input Registers
|
||||
Регистры представляют собой 16-битные числа (слова). В обработке комманд
|
||||
находится адресс "начального" регистра и записывается в указатель. Доступ к
|
||||
остальным регистрам осуществляется через указатель. Таким образом, сами
|
||||
регистры могут представлять собой как массив так и структуру.
|
||||
- sine_log - массив регистров на 500 элементов
|
||||
- sine_log - массив регистров на 500 элементов
|
||||
|
||||
@coils Coils
|
||||
Коилы представляют собой биты, упакованные в 16-битные регистры. В обработке
|
||||
комманд находится адресс "начального" регистра запрашиваемого коила. Доступ к
|
||||
остальным коилам осуществляется через маску и указатель. Таким образом, сами
|
||||
коилы могут представлять собой как массив так и структуру.
|
||||
|
||||
|
||||
@example SLAVE RECEIVE
|
||||
//--------------Настройка модбас--------------//
|
||||
// create handles and settings
|
||||
Create_MODBUS_Handles(modbus1);
|
||||
|
||||
// set up UART for modbus
|
||||
modbus1_suart.huart = &modbus1_huart;
|
||||
modbus1_suart.huart->Instance = USED_MODBUS_UART;
|
||||
modbus1_suart.huart->Init.BaudRate = 38400;
|
||||
modbus1_suart.GPIOx = MODBUS_GPIOX;
|
||||
modbus1_suart.GPIO_PIN_RX = MODBUS_GPIO_PIN_RX;
|
||||
modbus1_suart.GPIO_PIN_TX = MODBUS_GPIO_PIN_TX;
|
||||
|
||||
// set up timeout TIM for modbus
|
||||
modbus1_stim.htim = &modbus1_htim;
|
||||
modbus1_stim.htim.Instance = USED_MODBUS_TIM;
|
||||
modbus1_stim.htim.Init.Prescaler = 36000; // set this to 0.5 ms
|
||||
modbus1_stim.TIM_MODE = TIM_IT_CONF;
|
||||
|
||||
// set up modbus: MB_RX_Size_NotConst and Timeout enable
|
||||
hmodbus1.ID = 1;
|
||||
hmodbus1.sRS_RX_Size_Mode = RS_RX_Size_NotConst;
|
||||
hmodbus1.sRS_Timeout = 100;
|
||||
hmodbus1.sRS_Mode = SLAVE_ALWAYS_WAIT;
|
||||
hmodbus1.RS_STATUS = RS_Init(&hmodbus1, &modbus1_suart, &modbus1_stim, 0);
|
||||
|
||||
//----------------Прием модбас----------------//
|
||||
RS_MsgTypeDef MODBUS_MSG;
|
||||
RS_Receive_IT(&hmodbus1, &MODBUS_MSG);
|
||||
***************************************************************************/
|
||||
#include "rs_message.h"
|
||||
uint32_t dbg_temp, dbg_temp2, dbg_temp3; // for debug
|
||||
uint32_t err_cnt = 0;
|
||||
/* EXTERN MODBUS HANDLES */
|
||||
UART_SettingsTypeDef modbus1_suart;
|
||||
TIM_SettingsTypeDef modbus1_stim;
|
||||
RS_HandleTypeDef hmodbus1;
|
||||
|
||||
/* DEFINE REGISTERS/COILS */
|
||||
uint16_t sine_log[R_SINE_LOG_QNT]; // start from 0x0000
|
||||
uint16_t pwm_log[R_PWM_LOG_QNT]; // start from 500 (0x1F4)
|
||||
uint16_t cnt_log[R_CNT_LOG_QNT]; // start from 100 (0x3E8)
|
||||
uint16_t time_log[R_TIME_LOG_QNT]; // start from 1500 (0x5DC)
|
||||
uint16_t pwm_ctrl[R_PWM_CTRL_QNT]; // start from 2000 (0x7D0)
|
||||
uint16_t log_ctrl[R_PWM_CTRL_QNT]; // start from 2008 (0x7D0)
|
||||
uint16_t uart_ctrl[R_UART_CTRL_QNT];
|
||||
|
||||
uint16_t coils_regs[C_CTRL_COILS_QNT];
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
//-----------------------------FOR USER------------------------------
|
||||
/**
|
||||
* @brief First set up of MODBUS.
|
||||
* @note Первый инит модбас. Заполняет структуры и инициализирует таймер и юарт для общения по модбас.
|
||||
* Скважность ШИМ меняется по закону синусоиды, каждый канал генерирует свой полупериод синуса (от -1 до 0 И от 0 до 1)
|
||||
* ШИМ генерируется на одном канале.
|
||||
* @note This called from main
|
||||
*/
|
||||
void MODBUS_FirstInit(void)
|
||||
{
|
||||
//-----------SETUP MODBUS-------------
|
||||
// set up UART for modbus
|
||||
modbus1_suart.huart.Instance = USED_MODBUS_UART;
|
||||
modbus1_suart.huart.Init.BaudRate = PROJSET.MB_SPEED;
|
||||
modbus1_suart.GPIOx = (GPIO_TypeDef *)PROJSET.MB_GPIOX;
|
||||
modbus1_suart.GPIO_PIN_RX = PROJSET.MB_GPIO_PIN_RX;
|
||||
modbus1_suart.GPIO_PIN_TX = PROJSET.MB_GPIO_PIN_TX;
|
||||
|
||||
// set up timeout TIM for modbus
|
||||
modbus1_stim.htim.Instance = USED_MODBUS_TIM;
|
||||
modbus1_stim.sTimAHBFreqMHz = PROJSET.MB_TIM_AHB_FREQ;
|
||||
modbus1_stim.sTimMode = TIM_IT_CONF;
|
||||
|
||||
// set up modbus: MB_RX_Size_NotConst and Timeout enable
|
||||
hmodbus1.ID = PROJSET.MB_DEVICE_ID;
|
||||
hmodbus1.sRS_Timeout = PROJSET.MB_MAX_TIMEOUT;
|
||||
hmodbus1.sRS_Mode = SLAVE_ALWAYS_WAIT;
|
||||
hmodbus1.sRS_RX_Size_Mode = RS_RX_Size_NotConst;
|
||||
|
||||
// INIT
|
||||
hmodbus1.RS_STATUS = RS_Init(&hmodbus1, &modbus1_suart, &modbus1_stim, 0);
|
||||
}
|
||||
/**
|
||||
* @brief Set or Reset Coil at its global address.
|
||||
* @param Addr - адрес коила.
|
||||
* @param WriteVal - Что записать в коил: 0 или 1.
|
||||
* @return ExceptionCode - Код исключения если коила по адресу не существует, и NO_ERRORS если все ок.
|
||||
*
|
||||
* @note Позволяет обратиться к любому коилу по его глобальному адрессу.
|
||||
Вне зависимости от того как коилы размещены в памяти.
|
||||
*/
|
||||
MB_ExceptionTypeDef MB_Write_Coil_Global(uint16_t Addr, MB_CoilsOpTypeDef WriteVal)
|
||||
{
|
||||
//---------CHECK FOR ERRORS----------
|
||||
MB_ExceptionTypeDef Exception = NO_ERRORS;
|
||||
uint16_t *coils;
|
||||
uint16_t start_shift = 0; // shift in coils register
|
||||
|
||||
//------------WRITE COIL-------------
|
||||
Exception = MB_DefineCoilsAddress(&coils, Addr, 1, &start_shift, 1);
|
||||
if(Exception == NO_ERRORS)
|
||||
{
|
||||
switch(WriteVal)
|
||||
{
|
||||
case SET_COIL:
|
||||
*coils |= (1<<start_shift);
|
||||
break;
|
||||
|
||||
case RESET_COIL:
|
||||
*coils &= ~(1<<start_shift);
|
||||
break;
|
||||
|
||||
case TOOGLE_COIL:
|
||||
*coils ^= (1<<start_shift);
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
return Exception;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Read Coil at its global address.
|
||||
* @param Addr - адрес коила.
|
||||
* @param Exception - Указатель на переменную для кода исключения, в случа неудачи при чтении.
|
||||
* @return uint16_t - Возвращает весь регистр с маской на запрошенном коиле.
|
||||
*
|
||||
* @note Позволяет обратиться к любому коилу по его глобальному адрессу.
|
||||
Вне зависимости от того как коилы размещены в памяти.
|
||||
*/
|
||||
uint16_t MB_Read_Coil_Global(uint16_t Addr, MB_ExceptionTypeDef *Exception)
|
||||
{
|
||||
//---------CHECK FOR ERRORS----------
|
||||
MB_ExceptionTypeDef Exception_tmp;
|
||||
if(Exception == NULL) // if exception is not given to func fill it
|
||||
Exception = &Exception_tmp;
|
||||
|
||||
uint16_t *coils;
|
||||
uint16_t start_shift = 0; // shift in coils register
|
||||
|
||||
//------------READ COIL--------------
|
||||
*Exception = MB_DefineCoilsAddress(&coils, Addr, 1, &start_shift, 0);
|
||||
if(*Exception == NO_ERRORS)
|
||||
{
|
||||
return ((*coils)&(1<<start_shift));
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
//----------------FUNCTIONS FOR PROCESSING MESSAGE-------------------
|
||||
/**
|
||||
* @brief Define Address Origin for Input/Holding Registers
|
||||
* @param pRegs - указатель на указатель регистров.
|
||||
* @param Addr - адрес начального регистра.
|
||||
* @param Qnt - количество запрашиваемых регистров.
|
||||
* @param WriteFlag - флаг регистр нужны для чтения или записи.
|
||||
* @return ExceptionCode - Код исключения если есть, и NO_ERRORS если нет.
|
||||
*
|
||||
* @note Определение адреса начального регистра.
|
||||
* @note WriteFlag пока не используется.
|
||||
*/
|
||||
MB_ExceptionTypeDef MB_DefineRegistersAddress(uint16_t **pRegs, uint16_t Addr, uint16_t Qnt, uint8_t WriteFlag)
|
||||
{
|
||||
/* check quantity error */
|
||||
if (Qnt > 125)
|
||||
{
|
||||
return ILLEGAL_DATA_VALUE; // return exception code
|
||||
}
|
||||
|
||||
// sensors array
|
||||
if(MB_Check_Address_For_Arr(Addr, Qnt, R_SINE_LOG_ADDR, R_SINE_LOG_QNT) == NO_ERRORS)
|
||||
{
|
||||
*pRegs = MB_Set_Register_Ptr(&sine_log, Addr); // начало регистров хранения/входных
|
||||
}
|
||||
// PWM array
|
||||
else if(MB_Check_Address_For_Arr(Addr, Qnt, R_PWM_LOG_ADDR, R_PWM_LOG_QNT) == NO_ERRORS)
|
||||
{
|
||||
*pRegs = MB_Set_Register_Ptr(&pwm_log, Addr - R_PWM_LOG_ADDR); // начало регистров хранения/входных
|
||||
}
|
||||
// counter array
|
||||
else if(MB_Check_Address_For_Arr(Addr, Qnt, R_CNT_LOG_ADDR, R_CNT_LOG_QNT) == NO_ERRORS)
|
||||
{
|
||||
*pRegs = MB_Set_Register_Ptr(&cnt_log, Addr - R_CNT_LOG_ADDR); // начало регистров хранения/входных
|
||||
}
|
||||
// time array
|
||||
else if(MB_Check_Address_For_Arr(Addr, Qnt, R_TIME_LOG_ADDR, R_TIME_LOG_QNT) == NO_ERRORS)
|
||||
{
|
||||
*pRegs = MB_Set_Register_Ptr(&time_log, Addr - R_TIME_LOG_ADDR); // начало регистров хранения/входных
|
||||
}
|
||||
// PWM array
|
||||
else if(MB_Check_Address_For_Arr(Addr, Qnt, R_PWM_CTRL_ADDR, R_PWM_CTRL_QNT) == NO_ERRORS)
|
||||
{
|
||||
*pRegs = MB_Set_Register_Ptr(&pwm_ctrl, Addr - R_PWM_CTRL_ADDR); // начало регистров хранения/входных
|
||||
}
|
||||
// log array
|
||||
else if(MB_Check_Address_For_Arr(Addr, Qnt, R_LOG_CTRL_ADDR, R_LOG_CTRL_QNT) == NO_ERRORS)
|
||||
{
|
||||
*pRegs = MB_Set_Register_Ptr(&log_ctrl, Addr - R_LOG_CTRL_ADDR); // начало регистров хранения/входных
|
||||
}
|
||||
// uart settings array
|
||||
else if(MB_Check_Address_For_Arr(Addr, Qnt, R_UART_CTRL_ADDR, R_UART_CTRL_QNT) == NO_ERRORS)
|
||||
{
|
||||
*pRegs = MB_Set_Register_Ptr(&uart_ctrl, Addr - R_UART_CTRL_ADDR); // начало регистров хранения/входных
|
||||
}
|
||||
// if address doesnt match any array - return illegal data address response
|
||||
else
|
||||
{
|
||||
return ILLEGAL_DATA_ADDRESS;
|
||||
}
|
||||
// if found requeried array return no err
|
||||
return NO_ERRORS; // return no errors
|
||||
}
|
||||
/**
|
||||
* @brief Define Address Origin for coils
|
||||
* @param pCoils - указатель на указатель коилов.
|
||||
* @param Addr - адресс начального коила.
|
||||
* @param Qnt - количество запрашиваемых коилов.
|
||||
* @param start_shift - указатель на переменную содержащую сдвиг внутри регистра для начального коила.
|
||||
* @param WriteFlag - флаг коилы нужны для чтения или записи.
|
||||
* @return ExceptionCode - Код исключения если есть, и NO_ERRORS если нет.
|
||||
*
|
||||
* @note Определение адреса начального регистра запрашиваемых коилов.
|
||||
* @note WriteFlag используется для определния регистров GPIO: ODR или IDR.
|
||||
*/
|
||||
MB_ExceptionTypeDef MB_DefineCoilsAddress(uint16_t **pCoils, uint16_t Addr, uint16_t Qnt, uint16_t *start_shift, uint8_t WriteFlag)
|
||||
{
|
||||
/* check quantity error */
|
||||
if (Qnt > 2000)
|
||||
{
|
||||
return ILLEGAL_DATA_VALUE; // return exception code
|
||||
}
|
||||
|
||||
// gpiod coils
|
||||
if(MB_Check_Address_For_Arr(Addr, Qnt, C_GPIOD_ADDR, C_GPIOD_QNT) == NO_ERRORS)
|
||||
{
|
||||
if(WriteFlag) // if write set odr
|
||||
*pCoils = MB_Set_Coil_Reg_Ptr(&GPIOD->ODR, Addr);
|
||||
else // if read set idr
|
||||
*pCoils = MB_Set_Coil_Reg_Ptr(&GPIOD->IDR, Addr);
|
||||
}
|
||||
// peripheral control coils
|
||||
else if(MB_Check_Address_For_Arr(Addr, Qnt, C_CTRL_COILS_ADDR, C_CTRL_COILS_QNT) == NO_ERRORS)
|
||||
{
|
||||
*pCoils = MB_Set_Coil_Reg_Ptr(&coils_regs, Addr-C_CTRL_COILS_ADDR);
|
||||
}
|
||||
// if address doesnt match any array - return illegal data address response
|
||||
else
|
||||
{
|
||||
return ILLEGAL_DATA_ADDRESS;
|
||||
}
|
||||
|
||||
*start_shift = Addr % 16; // set shift to requested coil
|
||||
// if found requeried array return no err
|
||||
return NO_ERRORS; // return no errors
|
||||
}
|
||||
/**
|
||||
* @brief Check is address valid for certain array.
|
||||
* @param Addr - начальный адресс.
|
||||
* @param Qnt - количество запрашиваемых элементов.
|
||||
* @param R_ARR_ADDR - начальный адресс массива R_ARR.
|
||||
* @param R_ARR_NUMB - количество элементов в массиве R_ARR.
|
||||
* @return ExceptionCode - ILLEGAL DATA ADRESS если адресс недействителен, и NO_ERRORS если все ок.
|
||||
*
|
||||
* @note Позволяет определить, принадлежит ли адресс Addr массиву R_ARR:
|
||||
* Если адресс Addr находится в диапазоне адрессов массива R_ARR, то возвращаем NO_ERROR.
|
||||
* Если адресс Addr находится за пределами адрессов массива R_ARR - ILLEGAL_DATA_ADDRESSю.
|
||||
*/
|
||||
MB_ExceptionTypeDef MB_Check_Address_For_Arr(uint16_t Addr, uint16_t Qnt, uint16_t R_ARR_ADDR, uint16_t R_ARR_NUMB)
|
||||
{
|
||||
// if address from this array
|
||||
if(Addr >= R_ARR_ADDR)
|
||||
{
|
||||
// if quantity too big return error
|
||||
if ((Addr - R_ARR_ADDR) + Qnt > R_ARR_NUMB)
|
||||
{
|
||||
return ILLEGAL_DATA_ADDRESS; // return exception code
|
||||
}
|
||||
// if all ok - return no errors
|
||||
return NO_ERRORS;
|
||||
}
|
||||
// if address isnt from this array return error
|
||||
else
|
||||
return ILLEGAL_DATA_ADDRESS; // return exception code
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Proccess command Read Coils (01 - 0x01).
|
||||
* @param modbus_msg - указатель на структуру собщения modbus.
|
||||
* @return fMessageHandled - статус о результате обработки комманды.
|
||||
* @note Обработка команды Read Coils.
|
||||
*/
|
||||
uint8_t MB_Read_Coils(RS_MsgTypeDef *modbus_msg)
|
||||
{
|
||||
//---------CHECK FOR ERRORS----------
|
||||
uint16_t *coils;
|
||||
uint16_t start_shift = 0; // shift in coils register
|
||||
|
||||
modbus_msg->Except_Code = MB_DefineCoilsAddress(&coils, modbus_msg->Addr, modbus_msg->Qnt, &start_shift, 0);
|
||||
if(modbus_msg->Except_Code != NO_ERRORS)
|
||||
return 0;
|
||||
|
||||
//-----------READING COIL------------
|
||||
// setup output message data size
|
||||
modbus_msg->ByteCnt = Divide_Up(modbus_msg->Qnt, 8);
|
||||
// create mask for coils
|
||||
uint16_t mask_for_coils = 0; // mask for coils that've been chosen
|
||||
uint16_t setted_coils = 0; // value of setted coils
|
||||
uint16_t temp_reg = 0; // temp register for saving coils that hasnt been chosen
|
||||
uint16_t coil_cnt = 0; // counter for processed coils
|
||||
|
||||
// cycle until all registers with requered coils would be processed
|
||||
int shift = start_shift; // set shift to first coil in first register
|
||||
int ind = 0; // index for coils registers and data
|
||||
for(; ind <= Divide_Up(start_shift + modbus_msg->Qnt, 16); ind++)
|
||||
{
|
||||
//----SET MASK FOR COILS REGISTER----
|
||||
mask_for_coils = 0;
|
||||
for(; shift < 0x10; shift++)
|
||||
{
|
||||
mask_for_coils |= 1<<(shift); // choose certain coil
|
||||
if(++coil_cnt >= modbus_msg->Qnt)
|
||||
break;
|
||||
}
|
||||
shift = 0; // set shift to zero for the next step
|
||||
|
||||
//-----------READ COILS--------------
|
||||
modbus_msg->DATA[ind] = (*(coils+ind)&mask_for_coils) >> start_shift;
|
||||
if(ind > 0)
|
||||
modbus_msg->DATA[ind-1] |= ((*(coils+ind)&mask_for_coils) << 16) >> start_shift;
|
||||
|
||||
}
|
||||
// т.к. DATA 16-битная, для 8-битной передачи, надо поменять местами верхний и нижний байты
|
||||
for(; ind >= 0; --ind)
|
||||
modbus_msg->DATA[ind] = ByteSwap16(modbus_msg->DATA[ind]);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Proccess command Read Holding Registers (03 - 0x03).
|
||||
* @param modbus_msg - указатель на структуру собщения modbus.
|
||||
* @return fMessageHandled - статус о результате обработки комманды.
|
||||
* @note Обработка команды Read Holding Registers.
|
||||
*/
|
||||
uint8_t MB_Read_Hold_Regs(RS_MsgTypeDef *modbus_msg)
|
||||
{
|
||||
//---------CHECK FOR ERRORS----------
|
||||
// get origin address for data
|
||||
uint16_t *pHoldRegs;
|
||||
modbus_msg->Except_Code = MB_DefineRegistersAddress(&pHoldRegs, modbus_msg->Addr, modbus_msg->Qnt, NULL); // определение адреса регистров
|
||||
if(modbus_msg->Except_Code != NO_ERRORS)
|
||||
return 0;
|
||||
|
||||
|
||||
//-----------READING REGS------------
|
||||
// setup output message data size
|
||||
modbus_msg->ByteCnt = modbus_msg->Qnt*2; // *2 because we transmit 8 bits, not 16 bits
|
||||
// read data
|
||||
int i;
|
||||
for (i = 0; i<modbus_msg->Qnt; i++)
|
||||
{
|
||||
modbus_msg->DATA[i] = *(pHoldRegs++);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
/**
|
||||
* @brief Proccess command Write Single Coils (05 - 0x05).
|
||||
* @param modbus_msg - указатель на структуру собщения modbus.
|
||||
* @return fMessageHandled - статус о результате обработки комманды.
|
||||
* @note Обработка команды Write Single Coils.
|
||||
*/
|
||||
uint8_t MB_Write_Single_Coil(RS_MsgTypeDef *modbus_msg)
|
||||
{
|
||||
//---------CHECK FOR ERRORS----------
|
||||
if ((modbus_msg->Qnt != 0x0000) && (modbus_msg->Qnt != 0xFF00))
|
||||
{
|
||||
modbus_msg->Except_Code = ILLEGAL_DATA_VALUE;
|
||||
return 0;
|
||||
}
|
||||
// define position of coil
|
||||
uint16_t *coils;
|
||||
uint16_t start_shift = 0; // shift in coils register
|
||||
modbus_msg->Except_Code = MB_DefineCoilsAddress(&coils, modbus_msg->Addr, 0, &start_shift, 1);
|
||||
if(modbus_msg->Except_Code != NO_ERRORS)
|
||||
return 0;
|
||||
|
||||
|
||||
//----------WRITTING COIL------------
|
||||
if(modbus_msg->Qnt == 0xFF00)
|
||||
*(coils) |= 1<<start_shift; // write flags corresponding to received data
|
||||
else
|
||||
*(coils) &= ~(1<<start_shift); // write flags corresponding to received data
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Proccess command Write Single Register (06 - 0x06).
|
||||
* @param modbus_msg - указатель на структуру собщения modbus.
|
||||
* @return fMessageHandled - статус о результате обработки комманды.
|
||||
* @note Обработка команды Write Single Register.
|
||||
*/
|
||||
uint8_t MB_Write_Single_Reg(RS_MsgTypeDef *modbus_msg)
|
||||
{
|
||||
// get origin address for data
|
||||
uint16_t *pInputRegs;
|
||||
modbus_msg->Except_Code = MB_DefineRegistersAddress(&pInputRegs, modbus_msg->Addr, 1, NULL); // определение адреса регистров
|
||||
if(modbus_msg->Except_Code != NO_ERRORS)
|
||||
return 0;
|
||||
|
||||
//-----------WRITTING REG------------
|
||||
*(pInputRegs) = modbus_msg->Qnt;
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Proccess command Write Multiple Coils (15 - 0x0F).
|
||||
* @param modbus_msg - указатель на структуру собщения modbus.
|
||||
* @return fMessageHandled - статус о результате обработки комманды.
|
||||
* @note Обработка команды Write Multiple Coils.
|
||||
*/
|
||||
uint8_t MB_Write_Miltuple_Coils(RS_MsgTypeDef *modbus_msg)
|
||||
{
|
||||
//---------CHECK FOR ERRORS----------
|
||||
if (modbus_msg->ByteCnt != Divide_Up(modbus_msg->Qnt, 8))
|
||||
{ // if quantity too large OR if quantity and bytes count arent match
|
||||
modbus_msg->Except_Code = ILLEGAL_DATA_VALUE;
|
||||
return 0;
|
||||
}
|
||||
// define position of coil
|
||||
uint16_t *coils; // pointer to coils
|
||||
uint16_t start_shift = 0; // shift in coils register
|
||||
modbus_msg->Except_Code = MB_DefineCoilsAddress(&coils, modbus_msg->Addr, modbus_msg->Qnt, &start_shift, 1);
|
||||
if(modbus_msg->Except_Code != NO_ERRORS)
|
||||
return 0;
|
||||
|
||||
//----------WRITTING COILS-----------
|
||||
// create mask for coils
|
||||
uint16_t mask_for_coils = 0; // mask for coils that've been chosen
|
||||
uint32_t setted_coils = 0; // value of setted coils
|
||||
uint16_t temp_reg = 0; // temp register for saving coils that hasnt been chosen
|
||||
uint16_t coil_cnt = 0; // counter for processed coils
|
||||
|
||||
// cycle until all registers with requered coils would be processed
|
||||
int shift = start_shift; // set shift to first coil in first register
|
||||
for(int ind = 0; ind <= Divide_Up(start_shift + modbus_msg->Qnt, 16); ind++)
|
||||
{
|
||||
//----SET MASK FOR COILS REGISTER----
|
||||
mask_for_coils = 0;
|
||||
for(; shift < 0x10; shift++)
|
||||
{
|
||||
mask_for_coils |= 1<<(shift); // choose certain coil
|
||||
if(++coil_cnt >= modbus_msg->Qnt)
|
||||
break;
|
||||
}
|
||||
shift = 0; // set shift to zero for the next step
|
||||
|
||||
|
||||
|
||||
//-----------WRITE COILS-------------
|
||||
// get current coils
|
||||
temp_reg = *(coils+ind);
|
||||
// set coils
|
||||
setted_coils = ByteSwap16(modbus_msg->DATA[ind]) << start_shift;
|
||||
if(ind > 0)
|
||||
{
|
||||
setted_coils |= ((ByteSwap16(modbus_msg->DATA[ind-1]) << start_shift) >> 16);
|
||||
}
|
||||
// write coils
|
||||
|
||||
*(coils+ind) = setted_coils & mask_for_coils;
|
||||
// restore untouched coils
|
||||
*(coils+ind) |= temp_reg&(~mask_for_coils);
|
||||
|
||||
|
||||
if(coil_cnt >= modbus_msg->Qnt) // if all coils written - break cycle
|
||||
break; // *kind of unnecessary
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Proccess command Write Multiple Registers (16 - 0x10).
|
||||
* @param modbus_msg - указатель на структуру собщения modbus.
|
||||
* @return fMessageHandled - статус о результате обработки комманды.
|
||||
* @note Обработка команды Write Multiple Registers.
|
||||
*/
|
||||
uint8_t MB_Write_Miltuple_Regs(RS_MsgTypeDef *modbus_msg)
|
||||
{
|
||||
//---------CHECK FOR ERRORS----------
|
||||
if (modbus_msg->Qnt*2 != modbus_msg->ByteCnt)
|
||||
{ // if quantity and bytes count arent match
|
||||
modbus_msg->Except_Code = 3;
|
||||
return 0;
|
||||
}
|
||||
// get origin address for data
|
||||
uint16_t *pInputRegs;
|
||||
modbus_msg->Except_Code = MB_DefineRegistersAddress(&pInputRegs, modbus_msg->Addr, modbus_msg->Qnt, NULL); // определение адреса регистров
|
||||
if(modbus_msg->Except_Code != NO_ERRORS)
|
||||
return 0;
|
||||
|
||||
//-----------WRITTING REGS-----------
|
||||
for (int i = 0; i<modbus_msg->Qnt; i++)
|
||||
{
|
||||
*(pInputRegs++) = modbus_msg->DATA[i];
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Respond accord to received message.
|
||||
* @param hRS - указатель на хендлер RS.
|
||||
* @param RS_msg - указатель на структуру сообщения.
|
||||
* @return RS_RES - статус о результате ответа на комманду.
|
||||
* @note Обработка принятой комманды и ответ на неё.
|
||||
*/
|
||||
RS_StatusTypeDef RS_Response(RS_HandleTypeDef *hmodbus, RS_MsgTypeDef *modbus_msg)
|
||||
{
|
||||
RS_StatusTypeDef MB_RES = 0;
|
||||
hmodbus->fMessageHandled = 0;
|
||||
hmodbus->fEchoResponse = 0;
|
||||
RS_Reset_TX_Flags(hmodbus); // reset flag for correct transmit
|
||||
|
||||
if(modbus_msg->Func_Code < ERR_VALUES_START)// if no errors after parsing
|
||||
{
|
||||
switch (modbus_msg->Func_Code)
|
||||
{
|
||||
// Read Coils
|
||||
case MB_R_COILS:
|
||||
hmodbus->fMessageHandled = MB_Read_Coils(hmodbus->pMessagePtr);
|
||||
break;
|
||||
// case MB_R_DISC_IN: break;
|
||||
|
||||
// Read Hodling Registers
|
||||
case MB_R_HOLD_REGS:
|
||||
case MB_R_IN_REGS:
|
||||
hmodbus->fMessageHandled = MB_Read_Hold_Regs(hmodbus->pMessagePtr);
|
||||
break;
|
||||
|
||||
|
||||
// Write Single Coils
|
||||
case MB_W_COIL:
|
||||
hmodbus->fMessageHandled = MB_Write_Single_Coil(hmodbus->pMessagePtr);
|
||||
if(hmodbus->fMessageHandled) hmodbus->fEchoResponse = 1; // echo response if write ok
|
||||
break;
|
||||
|
||||
case MB_W_IN_REG:
|
||||
hmodbus->fMessageHandled = MB_Write_Single_Reg(hmodbus->pMessagePtr);
|
||||
if(hmodbus->fMessageHandled) hmodbus->fEchoResponse = 1; // echo response if write ok
|
||||
break;
|
||||
|
||||
// Write Multiple Coils
|
||||
case MB_W_COILS:
|
||||
hmodbus->fMessageHandled = MB_Write_Miltuple_Coils(hmodbus->pMessagePtr);
|
||||
if(hmodbus->fMessageHandled) hmodbus->fEchoResponse = 1; hmodbus->RS_Message_Size = 6; // echo response if write ok (withous data bytes)
|
||||
break;
|
||||
|
||||
// Write Multiple Registers
|
||||
case MB_W_IN_REGS:
|
||||
hmodbus->fMessageHandled = MB_Write_Miltuple_Regs(hmodbus->pMessagePtr);
|
||||
if(hmodbus->fMessageHandled) hmodbus->fEchoResponse = 1; hmodbus->RS_Message_Size = 6; // echo response if write ok (withous data bytes)
|
||||
break;
|
||||
|
||||
/* unknown func code */
|
||||
default: modbus_msg->Except_Code = 0x01; /* set exception code: illegal function */
|
||||
}
|
||||
|
||||
if(hmodbus->fMessageHandled == 0)
|
||||
modbus_msg->Func_Code += ERR_VALUES_START;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// if we need response - check that transmit isnt busy
|
||||
if( RS_Is_TX_Busy(hmodbus) )
|
||||
RS_Abort(hmodbus, ABORT_TX); // if tx busy - set it free
|
||||
|
||||
// Transmit right there, or sets (fDeferredResponse) to transmit response in main code
|
||||
MB_RES = RS_Handle_Transmit_Start(hmodbus, modbus_msg);
|
||||
|
||||
hmodbus->RS_STATUS = MB_RES;
|
||||
return MB_RES;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Collect message in buffer to transmit it.
|
||||
* @param hRS - указатель на хендлер RS.
|
||||
* @param RS_msg - указатель на структуру сообщения.
|
||||
* @param msg_uart_buff - указатель на буффер UART.
|
||||
* @return RS_RES - статус о результате заполнения буфера.
|
||||
* @note Заполнение буффера UART из структуры сообщения.
|
||||
*/
|
||||
RS_StatusTypeDef Collect_Message(RS_HandleTypeDef *hmodbus, RS_MsgTypeDef *modbus_msg, uint8_t *modbus_uart_buff)
|
||||
{
|
||||
int ind = 0; // ind for modbus-uart buffer
|
||||
|
||||
if(hmodbus->fEchoResponse && hmodbus->fMessageHandled) // if echo response need
|
||||
ind = hmodbus->RS_Message_Size;
|
||||
else
|
||||
{
|
||||
//------INFO ABOUT DATA/MESSAGE------
|
||||
//-----------[first bytes]-----------
|
||||
// set ID of message/user
|
||||
modbus_uart_buff[ind++] = modbus_msg->MbAddr;
|
||||
|
||||
// set dat or err response
|
||||
modbus_uart_buff[ind++] = modbus_msg->Func_Code;
|
||||
|
||||
if (modbus_msg->Func_Code < ERR_VALUES_START) // if no error occur
|
||||
{
|
||||
// set size of received data
|
||||
if (modbus_msg->ByteCnt <= DATA_SIZE*2) // if ByteCnt less than DATA_SIZE
|
||||
modbus_uart_buff[ind++] = modbus_msg->ByteCnt;
|
||||
else // otherwise return data_size err
|
||||
return RS_COLLECT_MSG_ERR;
|
||||
|
||||
//---------------DATA----------------
|
||||
//-----------[data bytes]------------
|
||||
uint16_t *tmp_data_addr = (uint16_t *)modbus_msg->DATA;
|
||||
for(int i = 0; i < modbus_msg->ByteCnt; i++) // filling buffer with data
|
||||
{ // set data
|
||||
if (i%2 == 0) // HI byte
|
||||
modbus_uart_buff[ind++] = (*tmp_data_addr)>>8;
|
||||
else // LO byte
|
||||
{
|
||||
modbus_uart_buff[ind++] = *tmp_data_addr;
|
||||
tmp_data_addr++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else // if some error occur
|
||||
{ // send expection code
|
||||
modbus_uart_buff[ind++] = modbus_msg->Except_Code;
|
||||
}
|
||||
}
|
||||
//---------------CRC----------------
|
||||
//---------[last 16 bytes]----------
|
||||
// calc crc of received data
|
||||
uint16_t CRC_VALUE = crc16(modbus_uart_buff, ind);
|
||||
// write crc to message structure and modbus-uart buffer
|
||||
modbus_msg->MB_CRC = CRC_VALUE;
|
||||
modbus_uart_buff[ind++] = CRC_VALUE;
|
||||
modbus_uart_buff[ind++] = CRC_VALUE >> 8;
|
||||
|
||||
hmodbus->RS_Message_Size = ind;
|
||||
|
||||
return RS_OK; // returns ok
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Parse message from buffer to process it.
|
||||
* @param hRS - указатель на хендлер RS.
|
||||
* @param RS_msg - указатель на структуру сообщения.
|
||||
* @param msg_uart_buff - указатель на буффер UART.
|
||||
* @return RS_RES - статус о результате заполнения структуры.
|
||||
* @note Заполнение структуры сообщения из буффера UART.
|
||||
*/
|
||||
RS_StatusTypeDef Parse_Message(RS_HandleTypeDef *hmodbus, RS_MsgTypeDef *modbus_msg, uint8_t *modbus_uart_buff)
|
||||
{
|
||||
uint32_t check_empty_buff;
|
||||
int ind = 0; // ind for modbus-uart buffer
|
||||
//-----INFO ABOUT DATA/MESSAGE-------
|
||||
//-----------[first bits]------------
|
||||
// get ID of message/user
|
||||
modbus_msg->MbAddr = modbus_uart_buff[ind++];
|
||||
if(modbus_msg->MbAddr != hmodbus->ID)
|
||||
return RS_SKIP;
|
||||
|
||||
// get dat or err response
|
||||
modbus_msg->Func_Code = modbus_uart_buff[ind++];
|
||||
|
||||
// get address from CMD
|
||||
modbus_msg->Addr = modbus_uart_buff[ind++] << 8;
|
||||
modbus_msg->Addr |= modbus_uart_buff[ind++];
|
||||
|
||||
// get address from CMD
|
||||
modbus_msg->Qnt = modbus_uart_buff[ind++] << 8;
|
||||
modbus_msg->Qnt |= modbus_uart_buff[ind++];
|
||||
|
||||
if(hmodbus->fRX_Half == 0) // if all message received
|
||||
{
|
||||
//---------------DATA----------------
|
||||
// (optional)
|
||||
if (modbus_msg->ByteCnt != 0)
|
||||
{
|
||||
ind++; // increment ind for data_size byte
|
||||
//check that data size is correct
|
||||
if (modbus_msg->ByteCnt > DATA_SIZE)
|
||||
{
|
||||
// hmodbus->MB_RESPONSE = MB_DATA_SIZE_ERR; // set func code - error data size more than maximumif yes, set func code - error about empty message
|
||||
modbus_msg->Func_Code += ERR_VALUES_START;
|
||||
return RS_PARSE_MSG_ERR;
|
||||
}
|
||||
uint16_t *tmp_data_addr = (uint16_t *)modbus_msg->DATA;
|
||||
for(int i = 0; i < modbus_msg->ByteCnt; i++) // /2 because we transmit 8 bits, not 16 bits
|
||||
{ // set data
|
||||
if (i%2 == 0)
|
||||
*tmp_data_addr = ((uint16_t)modbus_uart_buff[ind++] << 8);
|
||||
else
|
||||
{
|
||||
*tmp_data_addr |= modbus_uart_buff[ind++];
|
||||
tmp_data_addr++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//---------------CRC----------------
|
||||
//----------[last 16 bits]----------
|
||||
// calc crc of received data
|
||||
uint16_t CRC_VALUE = crc16(modbus_uart_buff, ind);
|
||||
// get crc of received data
|
||||
modbus_msg->MB_CRC = modbus_uart_buff[ind++];
|
||||
modbus_msg->MB_CRC |= modbus_uart_buff[ind++] << 8;
|
||||
// compare crc
|
||||
if (modbus_msg->MB_CRC != CRC_VALUE)
|
||||
modbus_msg->Func_Code += ERR_VALUES_START;
|
||||
// hmodbus->MB_RESPONSE = MB_CRC_ERR; // set func code - error about wrong crc
|
||||
|
||||
// check is buffer empty
|
||||
check_empty_buff = 0;
|
||||
for(int i=0; i<ind;i++)
|
||||
check_empty_buff += modbus_uart_buff[i];
|
||||
// if(check_empty_buff == 0)
|
||||
// hmodbus->MB_RESPONSE = MB_EMPTY_MSG; //
|
||||
}
|
||||
|
||||
return RS_OK;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Define size of RX Message that need to be received.
|
||||
* @param hRS - указатель на хендлер RS.
|
||||
* @param rx_data_size - указатель на переменную для записи кол-ва байт для принятия.
|
||||
* @return RS_RES - статус о корректности рассчета кол-ва байт для принятия.
|
||||
* @note Определение сколько байтов надо принять по протоколу.
|
||||
*/
|
||||
RS_StatusTypeDef RS_Define_Size_of_RX_Message(RS_HandleTypeDef *hmodbus, uint32_t *rx_data_size)
|
||||
{
|
||||
RS_StatusTypeDef MB_RES = 0;
|
||||
|
||||
MB_RES = Parse_Message(hmodbus, hmodbus->pMessagePtr, hmodbus->pBufferPtr);
|
||||
if(MB_RES == RS_SKIP) // if message not for us
|
||||
return MB_RES; // return
|
||||
|
||||
if ((hmodbus->pMessagePtr->Func_Code & ~ERR_VALUES_START) < 0x0F)
|
||||
{
|
||||
hmodbus->pMessagePtr->ByteCnt = 0;
|
||||
*rx_data_size = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
hmodbus->pMessagePtr->ByteCnt = hmodbus->pBufferPtr[RX_FIRST_PART_SIZE-1]; // get numb of data in command
|
||||
// +1 because that defines is size, not ind.
|
||||
*rx_data_size = hmodbus->pMessagePtr->ByteCnt + 2;
|
||||
}
|
||||
hmodbus->RS_Message_Size = RX_FIRST_PART_SIZE + *rx_data_size; // size of whole message
|
||||
return RS_OK;
|
||||
}
|
||||
|
||||
//-----------------------------FOR USER------------------------------
|
||||
//-------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
//-------------------------HANDLERS FUNCTION-------------------------
|
||||
#if (MODBUS_UART_NUMB == 1) // choose handler for UART
|
||||
void USART1_IRQHandler(void)
|
||||
#elif (MODBUS_UART_NUMB == 2)
|
||||
void USART2_IRQHandler(void)
|
||||
#elif (MODBUS_UART_NUMB == 3)
|
||||
void USART3_IRQHandler(void)
|
||||
#elif (MODBUS_UART_NUMB == 4)
|
||||
void USART4_IRQHandler(void)
|
||||
#elif (MODBUS_UART_NUMB == 5)
|
||||
void USART5_IRQHandler(void)
|
||||
#elif (MODBUS_UART_NUMB == 6)
|
||||
void USART6_IRQHandler(void)
|
||||
#endif
|
||||
{
|
||||
Trace_MB_UART_Enter();
|
||||
RS_UART_Handler(&hmodbus1);
|
||||
Trace_MB_UART_Exit();
|
||||
}
|
||||
#if (MODBUS_TIM_NUMB == 1) || (MODBUS_TIM_NUMB == 10) // choose handler for TIM
|
||||
void TIM1_UP_TIM10_IRQHandler(void)
|
||||
#elif (MODBUS_TIM_NUMB == 2)
|
||||
void TIM2_IRQHandler(void)
|
||||
#elif (MODBUS_TIM_NUMB == 3)
|
||||
void TIM3_IRQHandler(void)
|
||||
#elif (MODBUS_TIM_NUMB == 4)
|
||||
void TIM4_IRQHandler(void)
|
||||
#elif (MODBUS_TIM_NUMB == 5)
|
||||
void TIM5_IRQHandler(void)
|
||||
#elif (MODBUS_TIM_NUMB == 6)
|
||||
void TIM6_DAC_IRQHandler(void)
|
||||
#elif (MODBUS_TIM_NUMB == 7)
|
||||
void TIM7_IRQHandler(void)
|
||||
#elif (MODBUS_TIM_NUMB == 8) || (MODBUS_TIM_NUMB == 13)
|
||||
void TIM8_UP_TIM13_IRQHandler(void)
|
||||
#elif (MODBUS_TIM_NUMB == 1) || (MODBUS_TIM_NUMB == 9)
|
||||
void TIM1_BRK_TIM9_IRQHandler(void)
|
||||
#elif (MODBUS_TIM_NUMB == 1) || (MODBUS_TIM_NUMB == 11)
|
||||
void TIM1_TRG_COM_TIM11_IRQHandler(void)
|
||||
#elif (MODBUS_TIM_NUMB == 8) || (MODBUS_TIM_NUMB == 12)
|
||||
void TIM8_BRK_TIM12_IRQHandler(void)
|
||||
#elif (MODBUS_TIM_NUMB == 8) || (MODBUS_TIM_NUMB == 14)
|
||||
void TIM8_TRG_COM_TIM14_IRQHandler(void)
|
||||
#endif
|
||||
{
|
||||
Trace_MB_TIM_Enter();
|
||||
RS_TIM_Handler(&hmodbus1);
|
||||
Trace_MB_TIM_Exit();
|
||||
}
|
||||
|
||||
//-------------------------HANDLERS FUNCTION-------------------------
|
||||
//-------------------------------------------------------------------
|
||||
419
научка/code/pwm_motor_control/Modbus/Modbus.h
Normal file
@@ -0,0 +1,419 @@
|
||||
/********************************MODBUS*************************************
|
||||
Данный файл содержит объявления базовых функции и дефайны для реализации
|
||||
MODBUS.
|
||||
Данный файл необходимо подключить в rs_message.h. После подключать rs_message.h
|
||||
к основному проекту.
|
||||
***************************************************************************/
|
||||
#ifndef __MODBUS_H_
|
||||
#define __MODBUS_H_
|
||||
|
||||
#include "stm32f4xx_hal.h"
|
||||
#include "modbus_data.h"
|
||||
#include "settings.h" // for modbus settings
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//////////////////////////---SETTINGS---/////////////////////////////
|
||||
|
||||
////----------DEFINES FOR MODBUS SETTING--------------
|
||||
//#define MODBUS_UART_NUMB 3 // number of used uart
|
||||
//#define MODBUS_SPEED 115200
|
||||
//#define MODBUS_GPIOX GPIOB
|
||||
//#define MODBUS_GPIO_PIN_RX GPIO_PIN_11
|
||||
//#define MODBUS_GPIO_PIN_TX GPIO_PIN_10
|
||||
///* accord to this define sets define USED_MB_UART = USARTx */
|
||||
//#define MODBUS_TIM_NUMB 7 // number of used uart
|
||||
//#define MODBUS_TIM_AHB_FREQ 72
|
||||
///* accord to this define sets define USED_MB_TIM = TIMx */
|
||||
|
||||
///* defines for modbus behaviour */
|
||||
//#define MODBUS_DEVICE_ID 1 // number of used uart
|
||||
//#define MODBUS_MAX_TIMEOUT 5000 // is ms
|
||||
//// custom define for size of receive message
|
||||
////--------------------------------------------------
|
||||
|
||||
//---------------MODBUS DEVICE DATA-----------------
|
||||
/* EXTERN REGISTERS/COILS */
|
||||
|
||||
extern uint16_t sine_log[R_SINE_LOG_QNT]; // start from 0x0000
|
||||
extern uint16_t pwm_log[R_PWM_LOG_QNT]; // start from 500 (0x1F4)
|
||||
extern uint16_t cnt_log[R_CNT_LOG_QNT]; // start from 100 (0x3E8)
|
||||
extern uint16_t time_log[R_TIME_LOG_QNT]; // start from 1500 (0x5DC)
|
||||
|
||||
extern uint16_t pwm_ctrl[R_PWM_CTRL_QNT]; // start from 2000 (0x7D0)
|
||||
extern uint16_t log_ctrl[R_LOG_CTRL_QNT]; // start from 2008 (0x7D0)
|
||||
|
||||
|
||||
extern uint16_t uart_ctrl[R_UART_CTRL_QNT];
|
||||
|
||||
extern uint16_t coils_regs[C_CTRL_COILS_QNT]; // start from 0x0001 (16th bit)
|
||||
|
||||
//--------------------------------------------------
|
||||
//////////////////////////---SETTINGS---/////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
/////////////////////---USER MESSAGE DEFINES---//////////////////////
|
||||
//-------------DEFINES FOR STRUCTURE----------------
|
||||
/* defines for structure of modbus message */
|
||||
#define MbAddr_SIZE 1 // size of (MbAddr)
|
||||
#define Func_Code_SIZE 1 // size of (Func_Code)
|
||||
#define Addr_SIZE 2 // size of (Addr)
|
||||
#define Qnt_SIZE 2 // size of (Qnt)
|
||||
#define ByteCnt_SIZE 1 // size of (ByteCnt)
|
||||
#define DATA_SIZE 125 // maximum number of data: DWORD (NOT MESSAGE SIZE)
|
||||
#define CRC_SIZE 2 // size of (MB_CRC) in bytes
|
||||
|
||||
/* size of info */
|
||||
#define INFO_SIZE_MAX (MbAddr_SIZE+Func_Code_SIZE+Addr_SIZE+Qnt_SIZE+ByteCnt_SIZE)
|
||||
|
||||
/* size of first part of message that will be received
|
||||
first receive info part of message, than defines size of rest message*/
|
||||
#define RX_FIRST_PART_SIZE INFO_SIZE_MAX
|
||||
|
||||
/* size of buffer: max size of whole message */
|
||||
#define MSG_SIZE_MAX (INFO_SIZE_MAX + DATA_SIZE*2 + CRC_SIZE) // max possible size of message
|
||||
|
||||
/* Structure for modbus exception codes */
|
||||
typedef enum //MB_ExceptionTypeDef
|
||||
{
|
||||
// reading
|
||||
NO_ERRORS = 0x00, // no errors
|
||||
ILLEGAL_FUNCTION = 0x01, // function cannot be processed
|
||||
ILLEGAL_DATA_ADDRESS = 0x02, // data at this address is not available
|
||||
ILLEGAL_DATA_VALUE = 0x03, // uncorrect data value (quantity too big and cannot be returned or value for coil is incorrect)
|
||||
SLAVE_DEVICE_FAILURE = 0x04, // idk
|
||||
ACKNOWLEDGE = 0x05, // idk
|
||||
SLAVE_DEVICE_BUSY = 0x06, // idk
|
||||
MEMORY_PARITY_ERROR = 0x08, // idk
|
||||
}MB_ExceptionTypeDef;
|
||||
|
||||
/* Structure for modbus func codes */
|
||||
typedef enum //MB_FunctonTypeDef
|
||||
{
|
||||
// reading
|
||||
MB_R_COILS = 0x01,
|
||||
MB_R_DISC_IN = 0x02,
|
||||
MB_R_IN_REGS = 0x03,
|
||||
MB_R_HOLD_REGS = 0x04,
|
||||
|
||||
// writting
|
||||
MB_W_COIL = 0x05,
|
||||
MB_W_IN_REG = 0x06,
|
||||
MB_W_COILS = 0x0F,
|
||||
MB_W_IN_REGS = 0x10,
|
||||
}MB_FunctonTypeDef;
|
||||
#define ERR_VALUES_START 0x80U // from this value starts error func codes
|
||||
|
||||
/* Structure for modbus messsage */
|
||||
typedef struct // RS_MsgTypeDef
|
||||
{
|
||||
uint8_t MbAddr;
|
||||
MB_FunctonTypeDef Func_Code;
|
||||
uint16_t Addr;
|
||||
uint16_t Qnt;
|
||||
uint8_t ByteCnt;
|
||||
|
||||
uint16_t DATA[DATA_SIZE];
|
||||
MB_ExceptionTypeDef Except_Code;
|
||||
|
||||
uint16_t MB_CRC;
|
||||
}RS_MsgTypeDef;
|
||||
//--------------------------------------------------
|
||||
/////////////////////---USER MESSAGE DEFINES---//////////////////////
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
/////////////////////---GENERAL MODBUS STUFF---//////////////////////
|
||||
/* Structure for coils operation */
|
||||
typedef enum
|
||||
{
|
||||
// READ_COIL,
|
||||
SET_COIL,
|
||||
RESET_COIL,
|
||||
TOOGLE_COIL,
|
||||
}MB_CoilsOpTypeDef;
|
||||
|
||||
//------------DEFINES FOR PROCESS DATA--------------
|
||||
/**
|
||||
* @brief Calc dividing including remainder
|
||||
* @param _val_ - делимое.
|
||||
* @param _div_ - делитель.
|
||||
* @note Если результат деления без остатка: он возвращается как есть
|
||||
Если с остатком - округляется вверх
|
||||
*/
|
||||
//#define Divide_Up(_val_, _div_) (((_val_)%(_div_))? (_val_)/(_div_)+1 : (_val_)/_div_) /* через тернарный оператор */
|
||||
#define Divide_Up(_val_, _div_) ((_val_ - 1) / _div_) + 1 /* через мат выражение */
|
||||
|
||||
/**
|
||||
* @brief Swap between Little Endian and Big Endian
|
||||
* @param v - Переменная для свапа.
|
||||
* @return v (new) - Свапнутая переменная.
|
||||
* @note Переключения между двумя типами хранения слова: HI-LO байты и LO-HI байты.
|
||||
*/
|
||||
#define ByteSwap16(v) (((v&0xFF00) >> (8)) | ((v&0x00FF) << (8)))
|
||||
//--------------------------------------------------
|
||||
|
||||
|
||||
//-----------DEFINES FOR ACCESS TO DATA-------------
|
||||
/**
|
||||
* @brief Macros to set pointer to 16-bit array
|
||||
* @param _arr_ - массив слов (16-бит).
|
||||
*/
|
||||
#define MB_Set_Arr16_Ptr(_arr_) ((uint16_t*)(&(_arr_)))
|
||||
/**
|
||||
* @brief Macros to set pointer to register
|
||||
* @param _parr_ - массив регистров.
|
||||
* @param _addr_ - Номер регистра (его индекс) от начала массива _arr_.
|
||||
*/
|
||||
#define MB_Set_Register_Ptr(_parr_, _addr_) ((uint16_t *)(_parr_)+(_addr_))
|
||||
|
||||
/**
|
||||
* @brief Macros to set pointer to a certain register that contains certain coil
|
||||
* @param _parr_ - массив коилов.
|
||||
* @param _coil_ - Номер коила от начала массива _arr_.
|
||||
* @note Пояснение выражений
|
||||
* (_coil_/16) - get index (address shift) of register that contain certain coil
|
||||
* (16*(_coil_/16) - how many coils we need to skip. e.g. (16*30/16) - skip 16 coils from first register
|
||||
* _coil_-(16*(_coil_/16)) - shift to certain coil in certain register
|
||||
* e.g. Coil(30) gets in register[1] (30/16 = 1) coil №14 (30 - (16*30/16) = 30 - 16 = 14)
|
||||
*
|
||||
* Visual explanation:
|
||||
* xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxCx
|
||||
* |register[0]----| |register[1]----|
|
||||
* |skip this------| |get this-------|
|
||||
* |shift to 14 bit|
|
||||
*/
|
||||
#define MB_Set_Coil_Reg_Ptr(_parr_, _coil_) ((uint16_t *)(_parr_)+((_coil_)/16))
|
||||
#define MB_Set_Coil_Mask(_coil_) (1 << ( _coil_ - (16*((_coil_)/16)) ))
|
||||
|
||||
/**
|
||||
* @brief Read Coil at its local address.
|
||||
* @param _parr_ - массив коилов.
|
||||
* @param _coil_ - Номер коила от начала массива _arr_.
|
||||
* @return uint16_t - Возвращает запрошенный коил на 0м бите.
|
||||
*
|
||||
* @note Позволяет обратиться к коилу по адресу относительно _arr_.
|
||||
*/
|
||||
#define MB_Read_Coil_Local(_parr_, _coil_) (( *MB_Set_Coil_Reg_Ptr(_parr_, _coil_) & MB_Set_Coil_Mask(_coil_) ) >> (_coil_))
|
||||
/**
|
||||
* @brief Set Coil at its local address.
|
||||
* @param _parr_ - указатель на массив коилов.
|
||||
* @param _coil_ - Номер коила от начала массива _arr_.
|
||||
*
|
||||
* @note Позволяет обратиться к коилу по адресу относительно _arr_.
|
||||
*/
|
||||
#define MB_Set_Coil_Local(_parr_, _coil_) *MB_Set_Coil_Reg_Ptr(_parr_, _coil_) |= MB_Set_Coil_Mask(_coil_)
|
||||
/**
|
||||
* @brief Reset Coil at its local address.
|
||||
* @param _parr_ - указатель на массив коилов.
|
||||
* @param _coil_ - Номер коила от начала массива _arr_.
|
||||
*
|
||||
* @note Позволяет обратиться к коилу по адресу относительно _arr_.
|
||||
*/
|
||||
#define MB_Reset_Coil_Local(_parr_, _coil_) *MB_Set_Coil_Reg_Ptr(_parr_, _coil_) &= ~(MB_Set_Coil_Mask(_coil_))
|
||||
/**
|
||||
* @brief Set Coil at its local address.
|
||||
* @param _parr_ - указатель на массив коилов.
|
||||
* @param _coil_ - Номер коила от начала массива _arr_.
|
||||
*
|
||||
* @note Позволяет обратиться к коилу по адресу относительно _arr_.
|
||||
*/
|
||||
#define MB_Toogle_Coil_Local(_parr_, _coil_) *MB_Set_Coil_Reg_Ptr(_parr_, _coil_) ^= MB_Set_Coil_Mask(_coil_)
|
||||
//--------------------------------------------------
|
||||
|
||||
|
||||
//------------------OTHER DEFINES-------------------
|
||||
// create hadnles and settings for uart, tim, rs with _modbus_ name
|
||||
#define CONCAT(a,b) a##b
|
||||
#define Create_MODBUS_Handles(_modbus_) \
|
||||
UART_SettingsTypeDef CONCAT(_modbus_, _suart); \
|
||||
UART_HandleTypeDef CONCAT(_modbus_, _huart); \
|
||||
TIM_SettingsTypeDef CONCAT(_modbus_, _stim); \
|
||||
TIM_HandleTypeDef CONCAT(_modbus_, _htim); \
|
||||
RS_HandleTypeDef CONCAT(h, _modbus_)
|
||||
//--------------------------------------------------
|
||||
///////////////////---MODBUS & MESSAGE DEFINES---////////////////////
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
////////////////////---FUNCTIONS FOR USER---/////////////////////////
|
||||
/**
|
||||
* @brief First set up of MODBUS.
|
||||
* @note Первый инит модбас. Заполняет структуры и инициализирует таймер и юарт для общения по модбас.
|
||||
* Скважность ШИМ меняется по закону синусоиды, каждый канал генерирует свой полупериод синуса (от -1 до 0 И от 0 до 1)
|
||||
* ШИМ генерируется на одном канале.
|
||||
* @note This called from main
|
||||
*/
|
||||
void MODBUS_FirstInit(void);
|
||||
/**
|
||||
* @brief Set or Reset Coil at its global address.
|
||||
* @param Addr - адрес коила.
|
||||
* @param WriteVal - Что записать в коил: 0 или 1.
|
||||
* @return ExceptionCode - Код исключения если коила по адресу не существует, и NO_ERRORS если все ок.
|
||||
*
|
||||
* @note Позволяет обратиться к любому коилу по его глобальному адрессу.
|
||||
Вне зависимости от того как коилы размещены в памяти.
|
||||
*/
|
||||
MB_ExceptionTypeDef MB_Write_Coil_Global(uint16_t Addr, MB_CoilsOpTypeDef WriteVal);
|
||||
/**
|
||||
* @brief Read Coil at its global address.
|
||||
* @param Addr - адрес коила.
|
||||
* @param Exception - Указатель на переменную для кода исключения, в случа неудачи при чтении.
|
||||
* @return uint16_t - Возвращает весь регистр с маской на запрошенном коиле.
|
||||
*
|
||||
* @note Позволяет обратиться к любому коилу по его глобальному адрессу.
|
||||
Вне зависимости от того как коилы размещены в памяти.
|
||||
*/
|
||||
uint16_t MB_Read_Coil_Global(uint16_t Addr, MB_ExceptionTypeDef *Exception);
|
||||
////////////////////---FUNCTIONS FOR USER---/////////////////////////
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
/////////////---PROCESS MODBUS COMMAND FUNCTIONS---//////////////////
|
||||
/**
|
||||
* @brief Check is address valid for certain array.
|
||||
* @param Addr - начальный адресс.
|
||||
* @param Qnt - количество запрашиваемых элементов.
|
||||
* @param R_ARR_ADDR - начальный адресс массива R_ARR.
|
||||
* @param R_ARR_NUMB - количество элементов в массиве R_ARR.
|
||||
* @return ExceptionCode - ILLEGAL DATA ADRESS если адресс недействителен, и NO_ERRORS если все ок.
|
||||
*
|
||||
* @note Позволяет определить, брать ли данные по адрессу Addr из массива R_ARR.
|
||||
* Если адресс Addr находится в диапазоне адрессов массива R_ARR, то возвращаем NO_ERROR.
|
||||
* Если адресс Addr находится за пределами адрессов массива R_ARR - ILLEGAL_DATA_ADDRESSю.
|
||||
*/
|
||||
MB_ExceptionTypeDef MB_Check_Address_For_Arr(uint16_t Addr, uint16_t Qnt, uint16_t R_ARR_ADDR, uint16_t R_ARR_NUMB);
|
||||
/**
|
||||
* @brief Define Address Origin for Input/Holding Registers
|
||||
* @param pRegs - указатель на указатель регистров.
|
||||
* @param Addr - адрес начального регистра.
|
||||
* @param Qnt - количество запрашиваемых регистров.
|
||||
* @param WriteFlag - флаг регистр нужны для чтения или записи.
|
||||
* @return ExceptionCode - Код исключения если есть, и NO_ERRORS если нет.
|
||||
*
|
||||
* @note Определение адреса начального регистра.
|
||||
* @note WriteFlag пока не используется.
|
||||
*/
|
||||
MB_ExceptionTypeDef MB_DefineRegistersAddress(uint16_t **pRegs, uint16_t Addr, uint16_t Qnt, uint8_t WriteFlag);
|
||||
/**
|
||||
* @brief Define Address Origin for coils
|
||||
* @param pCoils - указатель на указатель коилов.
|
||||
* @param Addr - адресс начального коила.
|
||||
* @param Qnt - количество запрашиваемых коилов.
|
||||
* @param start_shift - указатель на переменную содержащую сдвиг внутри регистра для начального коила.
|
||||
* @param WriteFlag - флаг коилы нужны для чтения или записи.
|
||||
* @return ExceptionCode - Код исключения если есть, и NO_ERRORS если нет.
|
||||
*
|
||||
* @note Определение адреса начального регистра запрашиваемых коилов.
|
||||
* @note WriteFlag используется для определния регистров GPIO: ODR или IDR.
|
||||
*/
|
||||
MB_ExceptionTypeDef MB_DefineCoilsAddress(uint16_t **pCoils, uint16_t Addr, uint16_t Qnt, uint16_t *start_shift, uint8_t WriteFlag);
|
||||
/**
|
||||
* @brief Proccess command Read Coils (01 - 0x01).
|
||||
* @param modbus_msg - указатель на структуру собщения modbus.
|
||||
* @return fMessageHandled - статус о результате обработки комманды.
|
||||
* @note Обработка команды Read Coils.
|
||||
*/
|
||||
uint8_t MB_Read_Coils(RS_MsgTypeDef *modbus_msg);
|
||||
/**
|
||||
* @brief Proccess command Read Holding Registers (03 - 0x03).
|
||||
* @param modbus_msg - указатель на структуру собщения modbus.
|
||||
* @return fMessageHandled - статус о результате обработки комманды.
|
||||
* @note Обработка команды Read Holding Registers.
|
||||
*/
|
||||
uint8_t MB_Read_Hold_Regs(RS_MsgTypeDef *modbus_msg);
|
||||
/**
|
||||
* @brief Proccess command Write Single Coils (05 - 0x05).
|
||||
* @param modbus_msg - указатель на структуру собщения modbus.
|
||||
* @return fMessageHandled - статус о результате обработки комманды.
|
||||
* @note Обработка команды Write Single Coils.
|
||||
*/
|
||||
uint8_t MB_Write_Single_Coil(RS_MsgTypeDef *modbus_msg);
|
||||
/**
|
||||
* @brief Proccess command Write Multiple Coils (15 - 0x0F).
|
||||
* @param modbus_msg - указатель на структуру собщения modbus.
|
||||
* @return fMessageHandled - статус о результате обработки комманды.
|
||||
* @note Обработка команды Write Multiple Coils.
|
||||
*/
|
||||
uint8_t MB_Write_Miltuple_Coils(RS_MsgTypeDef *modbus_msg);
|
||||
/**
|
||||
* @brief Proccess command Write Multiple Register (16 - 0x10).
|
||||
* @param modbus_msg - указатель на структуру собщения modbus.
|
||||
* @return fMessageHandled - статус о результате обработки комманды.
|
||||
* @note Обработка команды Write Multiple Register.
|
||||
*/
|
||||
uint8_t MB_Write_Miltuple_Regs(RS_MsgTypeDef *modbus_msg);
|
||||
/////////////---PROCESS MODBUS COMMAND FUNCTIONS---//////////////////
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////---CALC DEFINES---//////////////////////////
|
||||
|
||||
/* set USART_TypeDef for choosen numb of usart */
|
||||
#if (MODBUS_UART_NUMB == 1)
|
||||
#define USED_MODBUS_UART USART1
|
||||
#define USE_USART1
|
||||
#elif (MODBUS_UART_NUMB == 2)
|
||||
#define USED_MODBUS_UART USART2
|
||||
#define USE_USART2
|
||||
#elif (MODBUS_UART_NUMB == 3)
|
||||
#define USED_MODBUS_UART USART3
|
||||
#define USE_USART3
|
||||
#elif (MODBUS_UART_NUMB == 4)
|
||||
#define USED_MODBUS_UART UART4
|
||||
#define USE_UART4
|
||||
#elif (MODBUS_UART_NUMB == 5)
|
||||
#define USED_MODBUS_UART UART5
|
||||
#define USE_UART6
|
||||
#elif (MODBUS_UART_NUMB == 6)
|
||||
#define USED_MODBUS_UART USART6
|
||||
#define USE_USART6
|
||||
#endif
|
||||
|
||||
#if (MODBUS_TIM_NUMB == 1)
|
||||
#define USED_MODBUS_TIM TIM1
|
||||
#define USE_TIM1
|
||||
#elif (MODBUS_TIM_NUMB == 2)
|
||||
#define USED_MODBUS_TIM TIM2
|
||||
#define USE_TIM2
|
||||
#elif (MODBUS_TIM_NUMB == 3)
|
||||
#define USED_MODBUS_TIM TIM3
|
||||
#define USE_TIM3
|
||||
#elif (MODBUS_TIM_NUMB == 4)
|
||||
#define USED_MODBUS_TIM TIM4
|
||||
#define USE_TIM4
|
||||
#elif (MODBUS_TIM_NUMB == 5)
|
||||
#define USED_MODBUS_TIM TIM5
|
||||
#define USE_TIM5
|
||||
#elif (MODBUS_TIM_NUMB == 6)
|
||||
#define USED_MODBUS_TIM TIM6
|
||||
#define USE_TIM6
|
||||
#elif (MODBUS_TIM_NUMB == 7)
|
||||
#define USED_MODBUS_TIM TIM7
|
||||
#define USE_TIM7
|
||||
#elif (MODBUS_TIM_NUMB == 8)
|
||||
#define USED_MODBUS_TIM TIM8
|
||||
#define USE_TIM8
|
||||
#elif (MODBUS_TIM_NUMB == 9)
|
||||
#define USED_MODBUS_TIM TIM9
|
||||
#define USE_TIM9
|
||||
#elif (MODBUS_TIM_NUMB == 10)
|
||||
#define USED_MODBUS_TIM TIM10
|
||||
#define USE_TIM10
|
||||
#elif (MODBUS_TIM_NUMB == 11)
|
||||
#define USED_MODBUS_TIM TIM11
|
||||
#define USE_TIM11
|
||||
#elif (MODBUS_TIM_NUMB == 12)
|
||||
#define USED_MODBUS_TIM TIM12
|
||||
#define USE_TIM12
|
||||
#elif (MODBUS_TIM_NUMB == 13)
|
||||
#define USED_MODBUS_TIM TIM13
|
||||
#define USE_TIM13
|
||||
#elif (MODBUS_TIM_NUMB == 14)
|
||||
#define USED_MODBUS_TIM TIM14
|
||||
#define USE_TIM14
|
||||
#endif
|
||||
|
||||
|
||||
#endif //__MODBUS_H_
|
||||
116
научка/code/pwm_motor_control/Modbus/crc_algs.c
Normal file
@@ -0,0 +1,116 @@
|
||||
#include "crc_algs.h"
|
||||
|
||||
|
||||
uint32_t CRC_calc;
|
||||
uint32_t CRC_ref;
|
||||
|
||||
//uint16_t CRC_calc;
|
||||
//uint16_t CRC_ref;
|
||||
|
||||
|
||||
// left this global for debug
|
||||
uint8_t uchCRCHi = 0xFF;
|
||||
uint8_t uchCRCLo = 0xFF;
|
||||
unsigned uIndex;
|
||||
|
||||
|
||||
uint32_t crc32(uint8_t *data, uint32_t data_size)
|
||||
{
|
||||
static const unsigned int crc32_table[] =
|
||||
{
|
||||
0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
|
||||
0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
|
||||
0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
|
||||
0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
|
||||
0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
|
||||
0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
|
||||
0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
|
||||
0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
|
||||
0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
|
||||
0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
|
||||
0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
|
||||
0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
|
||||
0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
|
||||
0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
|
||||
0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
|
||||
0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
|
||||
0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
|
||||
0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
|
||||
0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
|
||||
0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
|
||||
0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
|
||||
0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
|
||||
0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
|
||||
0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
|
||||
0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
|
||||
0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
|
||||
0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
|
||||
0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
|
||||
0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
|
||||
0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
|
||||
0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
|
||||
0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
|
||||
};
|
||||
unsigned int crc = 0xFFFFFFFF;
|
||||
while (data_size--)
|
||||
{
|
||||
crc = (crc >> 8) ^ crc32_table[(crc ^ *data) & 255];
|
||||
data++;
|
||||
}
|
||||
return crc^0xFFFFFFFF;
|
||||
}
|
||||
|
||||
|
||||
uint16_t crc16(uint8_t *data, uint32_t data_size)
|
||||
{
|
||||
/*Table of CRC values for high order byte*/
|
||||
static unsigned char auchCRCHi[]=
|
||||
{
|
||||
0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,
|
||||
0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,
|
||||
0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,
|
||||
0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,
|
||||
0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,
|
||||
0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,
|
||||
0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,
|
||||
0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,
|
||||
0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,
|
||||
0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,
|
||||
0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,
|
||||
0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,
|
||||
0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,
|
||||
0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,
|
||||
0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,
|
||||
0x00,0xC1,0x81,0x40,0x01,0xC0,0x80,0x41,0x01,0xC0,0x80,0x41,0x00,0xC1,0x81,0x40,
|
||||
};
|
||||
/*Table of CRC values for low order byte*/
|
||||
static char auchCRCLo[] =
|
||||
{
|
||||
0x00,0xC0,0xC1,0x01,0xC3,0x03,0x02,0xC2,0xC6,0x06,0x07,0xC7,0x05,0xC5,0xC4,0x04,
|
||||
0xCC,0x0C,0x0D,0xCD,0x0F,0xCF,0xCE,0x0E,0x0A,0xCA,0xCB,0x0B,0xC9,0x09,0x08,0xC8,
|
||||
0xD8,0x18,0x19,0xD9,0x1B,0xDB,0xDA,0x1A,0x1E,0xDE,0xDF,0x1F,0xDD,0x1D,0x1C,0xDC,
|
||||
0x14,0xD4,0xD5,0x15,0xD7,0x17,0x16,0xD6,0xD2,0x12,0x13,0xD3,0x11,0xD1,0xD0,0x10,
|
||||
0xF0,0x30,0x31,0xF1,0x33,0xF3,0xF2,0x32,0x36,0xF6,0xF7,0x37,0xF5,0x35,0x34,0xF4,
|
||||
0x3C,0xFC,0xFD,0x3D,0xFF,0x3F,0x3E,0xFE,0xFA,0x3A,0x3B,0xFB,0x39,0xF9,0xF8,0x38,
|
||||
0x28,0xE8,0xE9,0x29,0xEB,0x2B,0x2A,0xEA,0xEE,0x2E,0x2F,0xEF,0x2D,0xED,0xEC,0x2C,
|
||||
0xE4,0x24,0x25,0xE5,0x27,0xE7,0xE6,0x26,0x22,0xE2,0xE3,0x23,0xE1,0x21,0x20,0xE0,
|
||||
0xA0,0x60,0x61,0xA1,0x63,0xA3,0xA2,0x62,0x66,0xA6,0xA7,0x67,0xA5,0x65,0x64,0xA4,
|
||||
0x6C,0xAC,0xAD,0x6D,0xAF,0x6F,0x6E,0xAE,0xAA,0x6A,0x6B,0xAB,0x69,0xA9,0xA8,0x68,
|
||||
0x78,0xB8,0xB9,0x79,0xBB,0x7B,0x7A,0xBA,0xBE,0x7E,0x7F,0xBF,0x7D,0xBD,0xBC,0x7C,
|
||||
0xB4,0x74,0x75,0xB5,0x77,0xB7,0xB6,0x76,0x72,0xB2,0xB3,0x73,0xB1,0x71,0x70,0xB0,
|
||||
0x50,0x90,0x91,0x51,0x93,0x53,0x52,0x92,0x96,0x56,0x57,0x97,0x55,0x95,0x94,0x54,
|
||||
0x9C,0x5C,0x5D,0x9D,0x5F,0x9F,0x9E,0x5E,0x5A,0x9A,0x9B,0x5B,0x99,0x59,0x58,0x98,
|
||||
0x88,0x48,0x49,0x89,0x4B,0x8B,0x8A,0x4A,0x4E,0x8E,0x8F,0x4F,0x8D,0x4D,0x4C,0x8C,
|
||||
0x44,0x84,0x85,0x45,0x87,0x47,0x46,0x86,0x82,0x42,0x43,0x83,0x41,0x81,0x80,0x40,
|
||||
};
|
||||
uchCRCHi = 0xFF;
|
||||
uchCRCLo = 0xFF;
|
||||
/* CRC Generation Function */
|
||||
while( data_size--) /* pass through message buffer */
|
||||
{
|
||||
uIndex = uchCRCHi ^ *data++; /* calculate the CRC */
|
||||
uchCRCHi = uchCRCLo ^ auchCRCHi[uIndex];
|
||||
uchCRCLo = auchCRCLo[uIndex];
|
||||
}
|
||||
return uchCRCHi | uchCRCLo<<8;
|
||||
}
|
||||
9
научка/code/pwm_motor_control/Modbus/crc_algs.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#include "main.h"
|
||||
|
||||
// extern here to use in bootloader.c
|
||||
extern uint32_t CRC_calc;
|
||||
extern uint32_t CRC_ref;
|
||||
|
||||
|
||||
uint16_t crc16(uint8_t *data, uint32_t data_size);
|
||||
uint32_t crc32(uint8_t *data, uint32_t data_size);
|
||||
91
научка/code/pwm_motor_control/Modbus/html/annotated.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.10.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>My Project: Data Structures</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<script type="text/javascript" src="clipboard.js"></script>
|
||||
<script type="text/javascript" src="cookie.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">My Project<span id="projectnumber"> 1.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.10.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">Data Structures</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here are the data structures with brief descriptions:</div><div class="directory">
|
||||
<table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_r_s___handle_type_def.html" target="_self">RS_HandleTypeDef</a></td><td class="desc">Handle for RS communication </td></tr>
|
||||
<tr id="row_1_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_r_s___msg_type_def.html" target="_self">RS_MsgTypeDef</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_t_i_m___settings_type_def.html" target="_self">TIM_SettingsTypeDef</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_3_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span class="icona"><span class="icon">C</span></span><a class="el" href="struct_u_a_r_t___settings_type_def.html" target="_self">UART_SettingsTypeDef</a></td><td class="desc"></td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
научка/code/pwm_motor_control/Modbus/html/bc_s.png
Normal file
|
After Width: | Height: | Size: 676 B |
BIN
научка/code/pwm_motor_control/Modbus/html/bc_sd.png
Normal file
|
After Width: | Height: | Size: 635 B |
95
научка/code/pwm_motor_control/Modbus/html/classes.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.10.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>My Project: Data Structure Index</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<script type="text/javascript" src="clipboard.js"></script>
|
||||
<script type="text/javascript" src="cookie.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">My Project<span id="projectnumber"> 1.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.10.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">Data Structure Index</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="qindex"><a class="qindex" href="#letter_R">R</a> | <a class="qindex" href="#letter_T">T</a> | <a class="qindex" href="#letter_U">U</a></div>
|
||||
<div class="classindex">
|
||||
<dl class="classindex even">
|
||||
<dt class="alphachar"><a id="letter_R" name="letter_R">R</a></dt>
|
||||
<dd><a class="el" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a></dd><dd><a class="el" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a></dd></dl>
|
||||
<dl class="classindex odd">
|
||||
<dt class="alphachar"><a id="letter_T" name="letter_T">T</a></dt>
|
||||
<dd><a class="el" href="struct_t_i_m___settings_type_def.html">TIM_SettingsTypeDef</a></dd></dl>
|
||||
<dl class="classindex even">
|
||||
<dt class="alphachar"><a id="letter_U" name="letter_U">U</a></dt>
|
||||
<dd><a class="el" href="struct_u_a_r_t___settings_type_def.html">UART_SettingsTypeDef</a></dd></dl>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
61
научка/code/pwm_motor_control/Modbus/html/clipboard.js
Normal file
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
|
||||
The code below is based on the Doxygen Awesome project, see
|
||||
https://github.com/jothepro/doxygen-awesome-css
|
||||
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 - 2022 jothepro
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
*/
|
||||
|
||||
let clipboard_title = "Copy to clipboard"
|
||||
let clipboard_icon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>`
|
||||
let clipboard_successIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>`
|
||||
let clipboard_successDuration = 1000
|
||||
|
||||
$(function() {
|
||||
if(navigator.clipboard) {
|
||||
const fragments = document.getElementsByClassName("fragment")
|
||||
for(const fragment of fragments) {
|
||||
const clipboard_div = document.createElement("div")
|
||||
clipboard_div.classList.add("clipboard")
|
||||
clipboard_div.innerHTML = clipboard_icon
|
||||
clipboard_div.title = clipboard_title
|
||||
$(clipboard_div).click(function() {
|
||||
const content = this.parentNode.cloneNode(true)
|
||||
// filter out line number and folded fragments from file listings
|
||||
content.querySelectorAll(".lineno, .ttc, .foldclosed").forEach((node) => { node.remove() })
|
||||
let text = content.textContent
|
||||
// remove trailing newlines and trailing spaces from empty lines
|
||||
text = text.replace(/^\s*\n/gm,'\n').replace(/\n*$/,'')
|
||||
navigator.clipboard.writeText(text);
|
||||
this.classList.add("success")
|
||||
this.innerHTML = clipboard_successIcon
|
||||
window.setTimeout(() => { // switch back to normal icon after timeout
|
||||
this.classList.remove("success")
|
||||
this.innerHTML = clipboard_icon
|
||||
}, clipboard_successDuration);
|
||||
})
|
||||
fragment.insertBefore(clipboard_div, fragment.firstChild)
|
||||
}
|
||||
}
|
||||
})
|
||||
BIN
научка/code/pwm_motor_control/Modbus/html/closed.png
Normal file
|
After Width: | Height: | Size: 132 B |
58
научка/code/pwm_motor_control/Modbus/html/cookie.js
Normal file
@@ -0,0 +1,58 @@
|
||||
/*!
|
||||
Cookie helper functions
|
||||
Copyright (c) 2023 Dimitri van Heesch
|
||||
Released under MIT license.
|
||||
*/
|
||||
let Cookie = {
|
||||
cookie_namespace: 'doxygen_',
|
||||
|
||||
readSetting(cookie,defVal) {
|
||||
if (window.chrome) {
|
||||
const val = localStorage.getItem(this.cookie_namespace+cookie) ||
|
||||
sessionStorage.getItem(this.cookie_namespace+cookie);
|
||||
if (val) return val;
|
||||
} else {
|
||||
let myCookie = this.cookie_namespace+cookie+"=";
|
||||
if (document.cookie) {
|
||||
const index = document.cookie.indexOf(myCookie);
|
||||
if (index != -1) {
|
||||
const valStart = index + myCookie.length;
|
||||
let valEnd = document.cookie.indexOf(";", valStart);
|
||||
if (valEnd == -1) {
|
||||
valEnd = document.cookie.length;
|
||||
}
|
||||
return document.cookie.substring(valStart, valEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
return defVal;
|
||||
},
|
||||
|
||||
writeSetting(cookie,val,days=10*365) { // default days='forever', 0=session cookie, -1=delete
|
||||
if (window.chrome) {
|
||||
if (days==0) {
|
||||
sessionStorage.setItem(this.cookie_namespace+cookie,val);
|
||||
} else {
|
||||
localStorage.setItem(this.cookie_namespace+cookie,val);
|
||||
}
|
||||
} else {
|
||||
let date = new Date();
|
||||
date.setTime(date.getTime()+(days*24*60*60*1000));
|
||||
const expiration = days!=0 ? "expires="+date.toGMTString()+";" : "";
|
||||
document.cookie = this.cookie_namespace + cookie + "=" +
|
||||
val + "; SameSite=Lax;" + expiration + "path=/";
|
||||
}
|
||||
},
|
||||
|
||||
eraseSetting(cookie) {
|
||||
if (window.chrome) {
|
||||
if (localStorage.getItem(this.cookie_namespace+cookie)) {
|
||||
localStorage.removeItem(this.cookie_namespace+cookie);
|
||||
} else if (sessionStorage.getItem(this.cookie_namespace+cookie)) {
|
||||
sessionStorage.removeItem(this.cookie_namespace+cookie);
|
||||
}
|
||||
} else {
|
||||
this.writeSetting(cookie,'',-1);
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.10.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>My Project: crc_algs.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<script type="text/javascript" src="clipboard.js"></script>
|
||||
<script type="text/javascript" src="cookie.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">My Project<span id="projectnumber"> 1.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.10.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(0); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">crc_algs.h</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#include "main.h"</span></div>
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span> </div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">// extern here to use in bootloader.c</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="keyword">extern</span> uint32_t CRC_calc;</div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="keyword">extern</span> uint32_t CRC_ref;</div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span> </div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span>uint16_t crc16(uint8_t *data, uint32_t data_size);</div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span>uint32_t crc32(uint8_t *data, uint32_t data_size);</div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
12
научка/code/pwm_motor_control/Modbus/html/doc.svg
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
12
научка/code/pwm_motor_control/Modbus/html/docd.svg
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
2225
научка/code/pwm_motor_control/Modbus/html/doxygen.css
Normal file
@@ -0,0 +1,2225 @@
|
||||
/* The standard CSS for doxygen 1.10.0*/
|
||||
|
||||
html {
|
||||
/* page base colors */
|
||||
--page-background-color: white;
|
||||
--page-foreground-color: black;
|
||||
--page-link-color: #3D578C;
|
||||
--page-visited-link-color: #4665A2;
|
||||
|
||||
/* index */
|
||||
--index-odd-item-bg-color: #F8F9FC;
|
||||
--index-even-item-bg-color: white;
|
||||
--index-header-color: black;
|
||||
--index-separator-color: #A0A0A0;
|
||||
|
||||
/* header */
|
||||
--header-background-color: #F9FAFC;
|
||||
--header-separator-color: #C4CFE5;
|
||||
--header-gradient-image: url('nav_h.png');
|
||||
--group-header-separator-color: #879ECB;
|
||||
--group-header-color: #354C7B;
|
||||
--inherit-header-color: gray;
|
||||
|
||||
--footer-foreground-color: #2A3D61;
|
||||
--footer-logo-width: 104px;
|
||||
--citation-label-color: #334975;
|
||||
--glow-color: cyan;
|
||||
|
||||
--title-background-color: white;
|
||||
--title-separator-color: #5373B4;
|
||||
--directory-separator-color: #9CAFD4;
|
||||
--separator-color: #4A6AAA;
|
||||
|
||||
--blockquote-background-color: #F7F8FB;
|
||||
--blockquote-border-color: #9CAFD4;
|
||||
|
||||
--scrollbar-thumb-color: #9CAFD4;
|
||||
--scrollbar-background-color: #F9FAFC;
|
||||
|
||||
--icon-background-color: #728DC1;
|
||||
--icon-foreground-color: white;
|
||||
--icon-doc-image: url('doc.svg');
|
||||
--icon-folder-open-image: url('folderopen.svg');
|
||||
--icon-folder-closed-image: url('folderclosed.svg');
|
||||
|
||||
/* brief member declaration list */
|
||||
--memdecl-background-color: #F9FAFC;
|
||||
--memdecl-separator-color: #DEE4F0;
|
||||
--memdecl-foreground-color: #555;
|
||||
--memdecl-template-color: #4665A2;
|
||||
|
||||
/* detailed member list */
|
||||
--memdef-border-color: #A8B8D9;
|
||||
--memdef-title-background-color: #E2E8F2;
|
||||
--memdef-title-gradient-image: url('nav_f.png');
|
||||
--memdef-proto-background-color: #DFE5F1;
|
||||
--memdef-proto-text-color: #253555;
|
||||
--memdef-proto-text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
|
||||
--memdef-doc-background-color: white;
|
||||
--memdef-param-name-color: #602020;
|
||||
--memdef-template-color: #4665A2;
|
||||
|
||||
/* tables */
|
||||
--table-cell-border-color: #2D4068;
|
||||
--table-header-background-color: #374F7F;
|
||||
--table-header-foreground-color: #FFFFFF;
|
||||
|
||||
/* labels */
|
||||
--label-background-color: #728DC1;
|
||||
--label-left-top-border-color: #5373B4;
|
||||
--label-right-bottom-border-color: #C4CFE5;
|
||||
--label-foreground-color: white;
|
||||
|
||||
/** navigation bar/tree/menu */
|
||||
--nav-background-color: #F9FAFC;
|
||||
--nav-foreground-color: #364D7C;
|
||||
--nav-gradient-image: url('tab_b.png');
|
||||
--nav-gradient-hover-image: url('tab_h.png');
|
||||
--nav-gradient-active-image: url('tab_a.png');
|
||||
--nav-gradient-active-image-parent: url("../tab_a.png");
|
||||
--nav-separator-image: url('tab_s.png');
|
||||
--nav-breadcrumb-image: url('bc_s.png');
|
||||
--nav-breadcrumb-border-color: #C2CDE4;
|
||||
--nav-splitbar-image: url('splitbar.png');
|
||||
--nav-font-size-level1: 13px;
|
||||
--nav-font-size-level2: 10px;
|
||||
--nav-font-size-level3: 9px;
|
||||
--nav-text-normal-color: #283A5D;
|
||||
--nav-text-hover-color: white;
|
||||
--nav-text-active-color: white;
|
||||
--nav-text-normal-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
|
||||
--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
|
||||
--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
|
||||
--nav-menu-button-color: #364D7C;
|
||||
--nav-menu-background-color: white;
|
||||
--nav-menu-foreground-color: #555555;
|
||||
--nav-menu-toggle-color: rgba(255, 255, 255, 0.5);
|
||||
--nav-arrow-color: #9CAFD4;
|
||||
--nav-arrow-selected-color: #9CAFD4;
|
||||
|
||||
/* table of contents */
|
||||
--toc-background-color: #F4F6FA;
|
||||
--toc-border-color: #D8DFEE;
|
||||
--toc-header-color: #4665A2;
|
||||
--toc-down-arrow-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='10px' width='5px' fill='grey'><text x='0' y='5' font-size='10'>&%238595;</text></svg>");
|
||||
|
||||
/** search field */
|
||||
--search-background-color: white;
|
||||
--search-foreground-color: #909090;
|
||||
--search-magnification-image: url('mag.svg');
|
||||
--search-magnification-select-image: url('mag_sel.svg');
|
||||
--search-active-color: black;
|
||||
--search-filter-background-color: #F9FAFC;
|
||||
--search-filter-foreground-color: black;
|
||||
--search-filter-border-color: #90A5CE;
|
||||
--search-filter-highlight-text-color: white;
|
||||
--search-filter-highlight-bg-color: #3D578C;
|
||||
--search-results-foreground-color: #425E97;
|
||||
--search-results-background-color: #EEF1F7;
|
||||
--search-results-border-color: black;
|
||||
--search-box-shadow: inset 0.5px 0.5px 3px 0px #555;
|
||||
|
||||
/** code fragments */
|
||||
--code-keyword-color: #008000;
|
||||
--code-type-keyword-color: #604020;
|
||||
--code-flow-keyword-color: #E08000;
|
||||
--code-comment-color: #800000;
|
||||
--code-preprocessor-color: #806020;
|
||||
--code-string-literal-color: #002080;
|
||||
--code-char-literal-color: #008080;
|
||||
--code-xml-cdata-color: black;
|
||||
--code-vhdl-digit-color: #FF00FF;
|
||||
--code-vhdl-char-color: #000000;
|
||||
--code-vhdl-keyword-color: #700070;
|
||||
--code-vhdl-logic-color: #FF0000;
|
||||
--code-link-color: #4665A2;
|
||||
--code-external-link-color: #4665A2;
|
||||
--fragment-foreground-color: black;
|
||||
--fragment-background-color: #FBFCFD;
|
||||
--fragment-border-color: #C4CFE5;
|
||||
--fragment-lineno-border-color: #00FF00;
|
||||
--fragment-lineno-background-color: #E8E8E8;
|
||||
--fragment-lineno-foreground-color: black;
|
||||
--fragment-lineno-link-fg-color: #4665A2;
|
||||
--fragment-lineno-link-bg-color: #D8D8D8;
|
||||
--fragment-lineno-link-hover-fg-color: #4665A2;
|
||||
--fragment-lineno-link-hover-bg-color: #C8C8C8;
|
||||
--fragment-copy-ok-color: #2EC82E;
|
||||
--tooltip-foreground-color: black;
|
||||
--tooltip-background-color: white;
|
||||
--tooltip-border-color: gray;
|
||||
--tooltip-doc-color: grey;
|
||||
--tooltip-declaration-color: #006318;
|
||||
--tooltip-link-color: #4665A2;
|
||||
--tooltip-shadow: 1px 1px 7px gray;
|
||||
--fold-line-color: #808080;
|
||||
--fold-minus-image: url('minus.svg');
|
||||
--fold-plus-image: url('plus.svg');
|
||||
--fold-minus-image-relpath: url('../../minus.svg');
|
||||
--fold-plus-image-relpath: url('../../plus.svg');
|
||||
|
||||
/** font-family */
|
||||
--font-family-normal: Roboto,sans-serif;
|
||||
--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed;
|
||||
--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
|
||||
--font-family-title: Tahoma,Arial,sans-serif;
|
||||
--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif;
|
||||
--font-family-search: Arial,Verdana,sans-serif;
|
||||
--font-family-icon: Arial,Helvetica;
|
||||
--font-family-tooltip: Roboto,sans-serif;
|
||||
|
||||
/** special sections */
|
||||
--warning-color-bg: #f8d1cc;
|
||||
--warning-color-hl: #b61825;
|
||||
--warning-color-text: #75070f;
|
||||
--note-color-bg: #faf3d8;
|
||||
--note-color-hl: #f3a600;
|
||||
--note-color-text: #5f4204;
|
||||
--todo-color-bg: #e4f3ff;
|
||||
--todo-color-hl: #1879C4;
|
||||
--todo-color-text: #274a5c;
|
||||
--test-color-bg: #e8e8ff;
|
||||
--test-color-hl: #3939C4;
|
||||
--test-color-text: #1a1a5c;
|
||||
--deprecated-color-bg: #ecf0f3;
|
||||
--deprecated-color-hl: #5b6269;
|
||||
--deprecated-color-text: #43454a;
|
||||
--bug-color-bg: #e4dafd;
|
||||
--bug-color-hl: #5b2bdd;
|
||||
--bug-color-text: #2a0d72;
|
||||
--invariant-color-bg: #d8f1e3;
|
||||
--invariant-color-hl: #44b86f;
|
||||
--invariant-color-text: #265532;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html:not(.dark-mode) {
|
||||
color-scheme: dark;
|
||||
|
||||
/* page base colors */
|
||||
--page-background-color: black;
|
||||
--page-foreground-color: #C9D1D9;
|
||||
--page-link-color: #90A5CE;
|
||||
--page-visited-link-color: #A3B4D7;
|
||||
|
||||
/* index */
|
||||
--index-odd-item-bg-color: #0B101A;
|
||||
--index-even-item-bg-color: black;
|
||||
--index-header-color: #C4CFE5;
|
||||
--index-separator-color: #334975;
|
||||
|
||||
/* header */
|
||||
--header-background-color: #070B11;
|
||||
--header-separator-color: #141C2E;
|
||||
--header-gradient-image: url('nav_hd.png');
|
||||
--group-header-separator-color: #283A5D;
|
||||
--group-header-color: #90A5CE;
|
||||
--inherit-header-color: #A0A0A0;
|
||||
|
||||
--footer-foreground-color: #5B7AB7;
|
||||
--footer-logo-width: 60px;
|
||||
--citation-label-color: #90A5CE;
|
||||
--glow-color: cyan;
|
||||
|
||||
--title-background-color: #090D16;
|
||||
--title-separator-color: #354C79;
|
||||
--directory-separator-color: #283A5D;
|
||||
--separator-color: #283A5D;
|
||||
|
||||
--blockquote-background-color: #101826;
|
||||
--blockquote-border-color: #283A5D;
|
||||
|
||||
--scrollbar-thumb-color: #283A5D;
|
||||
--scrollbar-background-color: #070B11;
|
||||
|
||||
--icon-background-color: #334975;
|
||||
--icon-foreground-color: #C4CFE5;
|
||||
--icon-doc-image: url('docd.svg');
|
||||
--icon-folder-open-image: url('folderopend.svg');
|
||||
--icon-folder-closed-image: url('folderclosedd.svg');
|
||||
|
||||
/* brief member declaration list */
|
||||
--memdecl-background-color: #0B101A;
|
||||
--memdecl-separator-color: #2C3F65;
|
||||
--memdecl-foreground-color: #BBB;
|
||||
--memdecl-template-color: #7C95C6;
|
||||
|
||||
/* detailed member list */
|
||||
--memdef-border-color: #233250;
|
||||
--memdef-title-background-color: #1B2840;
|
||||
--memdef-title-gradient-image: url('nav_fd.png');
|
||||
--memdef-proto-background-color: #19243A;
|
||||
--memdef-proto-text-color: #9DB0D4;
|
||||
--memdef-proto-text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9);
|
||||
--memdef-doc-background-color: black;
|
||||
--memdef-param-name-color: #D28757;
|
||||
--memdef-template-color: #7C95C6;
|
||||
|
||||
/* tables */
|
||||
--table-cell-border-color: #283A5D;
|
||||
--table-header-background-color: #283A5D;
|
||||
--table-header-foreground-color: #C4CFE5;
|
||||
|
||||
/* labels */
|
||||
--label-background-color: #354C7B;
|
||||
--label-left-top-border-color: #4665A2;
|
||||
--label-right-bottom-border-color: #283A5D;
|
||||
--label-foreground-color: #CCCCCC;
|
||||
|
||||
/** navigation bar/tree/menu */
|
||||
--nav-background-color: #101826;
|
||||
--nav-foreground-color: #364D7C;
|
||||
--nav-gradient-image: url('tab_bd.png');
|
||||
--nav-gradient-hover-image: url('tab_hd.png');
|
||||
--nav-gradient-active-image: url('tab_ad.png');
|
||||
--nav-gradient-active-image-parent: url("../tab_ad.png");
|
||||
--nav-separator-image: url('tab_sd.png');
|
||||
--nav-breadcrumb-image: url('bc_sd.png');
|
||||
--nav-breadcrumb-border-color: #2A3D61;
|
||||
--nav-splitbar-image: url('splitbard.png');
|
||||
--nav-font-size-level1: 13px;
|
||||
--nav-font-size-level2: 10px;
|
||||
--nav-font-size-level3: 9px;
|
||||
--nav-text-normal-color: #B6C4DF;
|
||||
--nav-text-hover-color: #DCE2EF;
|
||||
--nav-text-active-color: #DCE2EF;
|
||||
--nav-text-normal-shadow: 0px 1px 1px black;
|
||||
--nav-text-hover-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
|
||||
--nav-text-active-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0);
|
||||
--nav-menu-button-color: #B6C4DF;
|
||||
--nav-menu-background-color: #05070C;
|
||||
--nav-menu-foreground-color: #BBBBBB;
|
||||
--nav-menu-toggle-color: rgba(255, 255, 255, 0.2);
|
||||
--nav-arrow-color: #334975;
|
||||
--nav-arrow-selected-color: #90A5CE;
|
||||
|
||||
/* table of contents */
|
||||
--toc-background-color: #151E30;
|
||||
--toc-border-color: #202E4A;
|
||||
--toc-header-color: #A3B4D7;
|
||||
--toc-down-arrow-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='10px' width='5px'><text x='0' y='5' font-size='10' fill='grey'>&%238595;</text></svg>");
|
||||
|
||||
/** search field */
|
||||
--search-background-color: black;
|
||||
--search-foreground-color: #C5C5C5;
|
||||
--search-magnification-image: url('mag_d.svg');
|
||||
--search-magnification-select-image: url('mag_seld.svg');
|
||||
--search-active-color: #C5C5C5;
|
||||
--search-filter-background-color: #101826;
|
||||
--search-filter-foreground-color: #90A5CE;
|
||||
--search-filter-border-color: #7C95C6;
|
||||
--search-filter-highlight-text-color: #BCC9E2;
|
||||
--search-filter-highlight-bg-color: #283A5D;
|
||||
--search-results-background-color: #101826;
|
||||
--search-results-foreground-color: #90A5CE;
|
||||
--search-results-border-color: #7C95C6;
|
||||
--search-box-shadow: inset 0.5px 0.5px 3px 0px #2F436C;
|
||||
|
||||
/** code fragments */
|
||||
--code-keyword-color: #CC99CD;
|
||||
--code-type-keyword-color: #AB99CD;
|
||||
--code-flow-keyword-color: #E08000;
|
||||
--code-comment-color: #717790;
|
||||
--code-preprocessor-color: #65CABE;
|
||||
--code-string-literal-color: #7EC699;
|
||||
--code-char-literal-color: #00E0F0;
|
||||
--code-xml-cdata-color: #C9D1D9;
|
||||
--code-vhdl-digit-color: #FF00FF;
|
||||
--code-vhdl-char-color: #C0C0C0;
|
||||
--code-vhdl-keyword-color: #CF53C9;
|
||||
--code-vhdl-logic-color: #FF0000;
|
||||
--code-link-color: #79C0FF;
|
||||
--code-external-link-color: #79C0FF;
|
||||
--fragment-foreground-color: #C9D1D9;
|
||||
--fragment-background-color: #090D16;
|
||||
--fragment-border-color: #30363D;
|
||||
--fragment-lineno-border-color: #30363D;
|
||||
--fragment-lineno-background-color: black;
|
||||
--fragment-lineno-foreground-color: #6E7681;
|
||||
--fragment-lineno-link-fg-color: #6E7681;
|
||||
--fragment-lineno-link-bg-color: #303030;
|
||||
--fragment-lineno-link-hover-fg-color: #8E96A1;
|
||||
--fragment-lineno-link-hover-bg-color: #505050;
|
||||
--fragment-copy-ok-color: #0EA80E;
|
||||
--tooltip-foreground-color: #C9D1D9;
|
||||
--tooltip-background-color: #202020;
|
||||
--tooltip-border-color: #C9D1D9;
|
||||
--tooltip-doc-color: #D9E1E9;
|
||||
--tooltip-declaration-color: #20C348;
|
||||
--tooltip-link-color: #79C0FF;
|
||||
--tooltip-shadow: none;
|
||||
--fold-line-color: #808080;
|
||||
--fold-minus-image: url('minusd.svg');
|
||||
--fold-plus-image: url('plusd.svg');
|
||||
--fold-minus-image-relpath: url('../../minusd.svg');
|
||||
--fold-plus-image-relpath: url('../../plusd.svg');
|
||||
|
||||
/** font-family */
|
||||
--font-family-normal: Roboto,sans-serif;
|
||||
--font-family-monospace: 'JetBrains Mono',Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace,fixed;
|
||||
--font-family-nav: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
|
||||
--font-family-title: Tahoma,Arial,sans-serif;
|
||||
--font-family-toc: Verdana,'DejaVu Sans',Geneva,sans-serif;
|
||||
--font-family-search: Arial,Verdana,sans-serif;
|
||||
--font-family-icon: Arial,Helvetica;
|
||||
--font-family-tooltip: Roboto,sans-serif;
|
||||
|
||||
/** special sections */
|
||||
--warning-color-bg: #2e1917;
|
||||
--warning-color-hl: #ad2617;
|
||||
--warning-color-text: #f5b1aa;
|
||||
--note-color-bg: #3b2e04;
|
||||
--note-color-hl: #f1b602;
|
||||
--note-color-text: #ceb670;
|
||||
--todo-color-bg: #163750;
|
||||
--todo-color-hl: #1982D2;
|
||||
--todo-color-text: #dcf0fa;
|
||||
--test-color-bg: #121258;
|
||||
--test-color-hl: #4242cf;
|
||||
--test-color-text: #c0c0da;
|
||||
--deprecated-color-bg: #2e323b;
|
||||
--deprecated-color-hl: #738396;
|
||||
--deprecated-color-text: #abb0bd;
|
||||
--bug-color-bg: #2a2536;
|
||||
--bug-color-hl: #7661b3;
|
||||
--bug-color-text: #ae9ed6;
|
||||
--invariant-color-bg: #303a35;
|
||||
--invariant-color-hl: #76ce96;
|
||||
--invariant-color-text: #cceed5;
|
||||
}}
|
||||
body {
|
||||
background-color: var(--page-background-color);
|
||||
color: var(--page-foreground-color);
|
||||
}
|
||||
|
||||
body, table, div, p, dl {
|
||||
font-weight: 400;
|
||||
font-size: 14px;
|
||||
font-family: var(--font-family-normal);
|
||||
line-height: 22px;
|
||||
}
|
||||
|
||||
/* @group Heading Levels */
|
||||
|
||||
.title {
|
||||
font-family: var(--font-family-normal);
|
||||
line-height: 28px;
|
||||
font-size: 150%;
|
||||
font-weight: bold;
|
||||
margin: 10px 2px;
|
||||
}
|
||||
|
||||
h1.groupheader {
|
||||
font-size: 150%;
|
||||
}
|
||||
|
||||
h2.groupheader {
|
||||
border-bottom: 1px solid var(--group-header-separator-color);
|
||||
color: var(--group-header-color);
|
||||
font-size: 150%;
|
||||
font-weight: normal;
|
||||
margin-top: 1.75em;
|
||||
padding-top: 8px;
|
||||
padding-bottom: 4px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
h3.groupheader {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
-webkit-transition: text-shadow 0.5s linear;
|
||||
-moz-transition: text-shadow 0.5s linear;
|
||||
-ms-transition: text-shadow 0.5s linear;
|
||||
-o-transition: text-shadow 0.5s linear;
|
||||
transition: text-shadow 0.5s linear;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow {
|
||||
text-shadow: 0 0 15px var(--glow-color);
|
||||
}
|
||||
|
||||
dt {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p.startli, p.startdd {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
th p.starttd, th p.intertd, th p.endtd {
|
||||
font-size: 100%;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
p.starttd {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
p.endli {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
p.enddd {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
p.endtd {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
p.interli {
|
||||
}
|
||||
|
||||
p.interdd {
|
||||
}
|
||||
|
||||
p.intertd {
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
caption {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span.legend {
|
||||
font-size: 70%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
h3.version {
|
||||
font-size: 90%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.navtab {
|
||||
padding-right: 15px;
|
||||
text-align: right;
|
||||
line-height: 110%;
|
||||
}
|
||||
|
||||
div.navtab table {
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
td.navtab {
|
||||
padding-right: 6px;
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
td.navtabHL {
|
||||
background-image: var(--nav-gradient-active-image);
|
||||
background-repeat:repeat-x;
|
||||
padding-right: 6px;
|
||||
padding-left: 6px;
|
||||
}
|
||||
|
||||
td.navtabHL a, td.navtabHL a:visited {
|
||||
color: var(--nav-text-hover-color);
|
||||
text-shadow: var(--nav-text-hover-shadow);
|
||||
}
|
||||
|
||||
a.navtab {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.qindex{
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
line-height: 140%;
|
||||
font-size: 130%;
|
||||
color: var(--index-separator-color);
|
||||
}
|
||||
|
||||
#main-menu a:focus {
|
||||
outline: auto;
|
||||
z-index: 10;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
dt.alphachar{
|
||||
font-size: 180%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.alphachar a{
|
||||
color: var(--index-header-color);
|
||||
}
|
||||
|
||||
.alphachar a:hover, .alphachar a:visited{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.classindex dl {
|
||||
padding: 25px;
|
||||
column-count:1
|
||||
}
|
||||
|
||||
.classindex dd {
|
||||
display:inline-block;
|
||||
margin-left: 50px;
|
||||
width: 90%;
|
||||
line-height: 1.15em;
|
||||
}
|
||||
|
||||
.classindex dl.even {
|
||||
background-color: var(--index-even-item-bg-color);
|
||||
}
|
||||
|
||||
.classindex dl.odd {
|
||||
background-color: var(--index-odd-item-bg-color);
|
||||
}
|
||||
|
||||
@media(min-width: 1120px) {
|
||||
.classindex dl {
|
||||
column-count:2
|
||||
}
|
||||
}
|
||||
|
||||
@media(min-width: 1320px) {
|
||||
.classindex dl {
|
||||
column-count:3
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* @group Link Styling */
|
||||
|
||||
a {
|
||||
color: var(--page-link-color);
|
||||
font-weight: normal;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.contents a:visited {
|
||||
color: var(--page-visited-link-color);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
background: linear-gradient(to bottom, transparent 0,transparent calc(100% - 1px), currentColor 100%);
|
||||
}
|
||||
|
||||
a:hover > span.arrow {
|
||||
text-decoration: none;
|
||||
background : var(--nav-background-color);
|
||||
}
|
||||
|
||||
a.el {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
a.elRef {
|
||||
}
|
||||
|
||||
a.code, a.code:visited, a.line, a.line:visited {
|
||||
color: var(--code-link-color);
|
||||
}
|
||||
|
||||
a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
|
||||
color: var(--code-external-link-color);
|
||||
}
|
||||
|
||||
a.code.hl_class { /* style for links to class names in code snippets */ }
|
||||
a.code.hl_struct { /* style for links to struct names in code snippets */ }
|
||||
a.code.hl_union { /* style for links to union names in code snippets */ }
|
||||
a.code.hl_interface { /* style for links to interface names in code snippets */ }
|
||||
a.code.hl_protocol { /* style for links to protocol names in code snippets */ }
|
||||
a.code.hl_category { /* style for links to category names in code snippets */ }
|
||||
a.code.hl_exception { /* style for links to exception names in code snippets */ }
|
||||
a.code.hl_service { /* style for links to service names in code snippets */ }
|
||||
a.code.hl_singleton { /* style for links to singleton names in code snippets */ }
|
||||
a.code.hl_concept { /* style for links to concept names in code snippets */ }
|
||||
a.code.hl_namespace { /* style for links to namespace names in code snippets */ }
|
||||
a.code.hl_package { /* style for links to package names in code snippets */ }
|
||||
a.code.hl_define { /* style for links to macro names in code snippets */ }
|
||||
a.code.hl_function { /* style for links to function names in code snippets */ }
|
||||
a.code.hl_variable { /* style for links to variable names in code snippets */ }
|
||||
a.code.hl_typedef { /* style for links to typedef names in code snippets */ }
|
||||
a.code.hl_enumvalue { /* style for links to enum value names in code snippets */ }
|
||||
a.code.hl_enumeration { /* style for links to enumeration names in code snippets */ }
|
||||
a.code.hl_signal { /* style for links to Qt signal names in code snippets */ }
|
||||
a.code.hl_slot { /* style for links to Qt slot names in code snippets */ }
|
||||
a.code.hl_friend { /* style for links to friend names in code snippets */ }
|
||||
a.code.hl_dcop { /* style for links to KDE3 DCOP names in code snippets */ }
|
||||
a.code.hl_property { /* style for links to property names in code snippets */ }
|
||||
a.code.hl_event { /* style for links to event names in code snippets */ }
|
||||
a.code.hl_sequence { /* style for links to sequence names in code snippets */ }
|
||||
a.code.hl_dictionary { /* style for links to dictionary names in code snippets */ }
|
||||
|
||||
/* @end */
|
||||
|
||||
dl.el {
|
||||
margin-left: -1cm;
|
||||
}
|
||||
|
||||
ul {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
ul.multicol {
|
||||
-moz-column-gap: 1em;
|
||||
-webkit-column-gap: 1em;
|
||||
column-gap: 1em;
|
||||
-moz-column-count: 3;
|
||||
-webkit-column-count: 3;
|
||||
column-count: 3;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
#side-nav ul {
|
||||
overflow: visible; /* reset ul rule for scroll bar in GENERATE_TREEVIEW window */
|
||||
}
|
||||
|
||||
#main-nav ul {
|
||||
overflow: visible; /* reset ul rule for the navigation bar drop down lists */
|
||||
}
|
||||
|
||||
.fragment {
|
||||
text-align: left;
|
||||
direction: ltr;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
position: relative;
|
||||
min-height: 12px;
|
||||
margin: 10px 0px;
|
||||
padding: 10px 10px;
|
||||
border: 1px solid var(--fragment-border-color);
|
||||
border-radius: 4px;
|
||||
background-color: var(--fragment-background-color);
|
||||
color: var(--fragment-foreground-color);
|
||||
}
|
||||
|
||||
pre.fragment {
|
||||
word-wrap: break-word;
|
||||
font-size: 10pt;
|
||||
line-height: 125%;
|
||||
font-family: var(--font-family-monospace);
|
||||
}
|
||||
|
||||
.clipboard {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
right: 5px;
|
||||
top: 5px;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
display: inline;
|
||||
overflow: auto;
|
||||
fill: var(--fragment-foreground-color);
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clipboard.success {
|
||||
border: 1px solid var(--fragment-foreground-color);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.fragment:hover .clipboard, .clipboard.success {
|
||||
opacity: .28;
|
||||
}
|
||||
|
||||
.clipboard:hover, .clipboard.success {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
.clipboard:active:not([class~=success]) svg {
|
||||
transform: scale(.91);
|
||||
}
|
||||
|
||||
.clipboard.success svg {
|
||||
fill: var(--fragment-copy-ok-color);
|
||||
}
|
||||
|
||||
.clipboard.success {
|
||||
border-color: var(--fragment-copy-ok-color);
|
||||
}
|
||||
|
||||
div.line {
|
||||
font-family: var(--font-family-monospace);
|
||||
font-size: 13px;
|
||||
min-height: 13px;
|
||||
line-height: 1.2;
|
||||
text-wrap: unrestricted;
|
||||
white-space: -moz-pre-wrap; /* Moz */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
white-space: pre-wrap; /* CSS3 */
|
||||
word-wrap: break-word; /* IE 5.5+ */
|
||||
text-indent: -53px;
|
||||
padding-left: 53px;
|
||||
padding-bottom: 0px;
|
||||
margin: 0px;
|
||||
-webkit-transition-property: background-color, box-shadow;
|
||||
-webkit-transition-duration: 0.5s;
|
||||
-moz-transition-property: background-color, box-shadow;
|
||||
-moz-transition-duration: 0.5s;
|
||||
-ms-transition-property: background-color, box-shadow;
|
||||
-ms-transition-duration: 0.5s;
|
||||
-o-transition-property: background-color, box-shadow;
|
||||
-o-transition-duration: 0.5s;
|
||||
transition-property: background-color, box-shadow;
|
||||
transition-duration: 0.5s;
|
||||
}
|
||||
|
||||
div.line:after {
|
||||
content:"\000A";
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
div.line.glow {
|
||||
background-color: var(--glow-color);
|
||||
box-shadow: 0 0 10px var(--glow-color);
|
||||
}
|
||||
|
||||
span.fold {
|
||||
margin-left: 5px;
|
||||
margin-right: 1px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
padding: 0px;
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background-repeat:no-repeat;
|
||||
background-position:center;
|
||||
}
|
||||
|
||||
span.lineno {
|
||||
padding-right: 4px;
|
||||
margin-right: 9px;
|
||||
text-align: right;
|
||||
border-right: 2px solid var(--fragment-lineno-border-color);
|
||||
color: var(--fragment-lineno-foreground-color);
|
||||
background-color: var(--fragment-lineno-background-color);
|
||||
white-space: pre;
|
||||
}
|
||||
span.lineno a, span.lineno a:visited {
|
||||
color: var(--fragment-lineno-link-fg-color);
|
||||
background-color: var(--fragment-lineno-link-bg-color);
|
||||
}
|
||||
|
||||
span.lineno a:hover {
|
||||
color: var(--fragment-lineno-link-hover-fg-color);
|
||||
background-color: var(--fragment-lineno-link-hover-bg-color);
|
||||
}
|
||||
|
||||
.lineno {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
div.classindex ul {
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
div.classindex span.ai {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
div.groupHeader {
|
||||
margin-left: 16px;
|
||||
margin-top: 12px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.groupText {
|
||||
margin-left: 16px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--page-foreground-color);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.contents {
|
||||
margin-top: 10px;
|
||||
margin-left: 12px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
p.formulaDsp {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
img.dark-mode-visible {
|
||||
display: none;
|
||||
}
|
||||
img.light-mode-visible {
|
||||
display: none;
|
||||
}
|
||||
|
||||
img.formulaInl, img.inline {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.center {
|
||||
text-align: center;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
div.center img {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
address.footer {
|
||||
text-align: right;
|
||||
padding-right: 12px;
|
||||
}
|
||||
|
||||
img.footer {
|
||||
border: 0px;
|
||||
vertical-align: middle;
|
||||
width: var(--footer-logo-width);
|
||||
}
|
||||
|
||||
.compoundTemplParams {
|
||||
color: var(--memdecl-template-color);
|
||||
font-size: 80%;
|
||||
line-height: 120%;
|
||||
}
|
||||
|
||||
/* @group Code Colorization */
|
||||
|
||||
span.keyword {
|
||||
color: var(--code-keyword-color);
|
||||
}
|
||||
|
||||
span.keywordtype {
|
||||
color: var(--code-type-keyword-color);
|
||||
}
|
||||
|
||||
span.keywordflow {
|
||||
color: var(--code-flow-keyword-color);
|
||||
}
|
||||
|
||||
span.comment {
|
||||
color: var(--code-comment-color);
|
||||
}
|
||||
|
||||
span.preprocessor {
|
||||
color: var(--code-preprocessor-color);
|
||||
}
|
||||
|
||||
span.stringliteral {
|
||||
color: var(--code-string-literal-color);
|
||||
}
|
||||
|
||||
span.charliteral {
|
||||
color: var(--code-char-literal-color);
|
||||
}
|
||||
|
||||
span.xmlcdata {
|
||||
color: var(--code-xml-cdata-color);
|
||||
}
|
||||
|
||||
span.vhdldigit {
|
||||
color: var(--code-vhdl-digit-color);
|
||||
}
|
||||
|
||||
span.vhdlchar {
|
||||
color: var(--code-vhdl-char-color);
|
||||
}
|
||||
|
||||
span.vhdlkeyword {
|
||||
color: var(--code-vhdl-keyword-color);
|
||||
}
|
||||
|
||||
span.vhdllogic {
|
||||
color: var(--code-vhdl-logic-color);
|
||||
}
|
||||
|
||||
blockquote {
|
||||
background-color: var(--blockquote-background-color);
|
||||
border-left: 2px solid var(--blockquote-border-color);
|
||||
margin: 0 24px 0 4px;
|
||||
padding: 0 12px 0 16px;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
td.tiny {
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
.dirtab {
|
||||
padding: 4px;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid var(--table-cell-border-color);
|
||||
}
|
||||
|
||||
th.dirtab {
|
||||
background-color: var(--table-header-background-color);
|
||||
color: var(--table-header-foreground-color);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
hr {
|
||||
height: 0px;
|
||||
border: none;
|
||||
border-top: 1px solid var(--separator-color);
|
||||
}
|
||||
|
||||
hr.footer {
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
/* @group Member Descriptions */
|
||||
|
||||
table.memberdecls {
|
||||
border-spacing: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.memberdecls td, .fieldtable tr {
|
||||
-webkit-transition-property: background-color, box-shadow;
|
||||
-webkit-transition-duration: 0.5s;
|
||||
-moz-transition-property: background-color, box-shadow;
|
||||
-moz-transition-duration: 0.5s;
|
||||
-ms-transition-property: background-color, box-shadow;
|
||||
-ms-transition-duration: 0.5s;
|
||||
-o-transition-property: background-color, box-shadow;
|
||||
-o-transition-duration: 0.5s;
|
||||
transition-property: background-color, box-shadow;
|
||||
transition-duration: 0.5s;
|
||||
}
|
||||
|
||||
.memberdecls td.glow, .fieldtable tr.glow {
|
||||
background-color: var(--glow-color);
|
||||
box-shadow: 0 0 15px var(--glow-color);
|
||||
}
|
||||
|
||||
.mdescLeft, .mdescRight,
|
||||
.memItemLeft, .memItemRight,
|
||||
.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
|
||||
background-color: var(--memdecl-background-color);
|
||||
border: none;
|
||||
margin: 4px;
|
||||
padding: 1px 0 0 8px;
|
||||
}
|
||||
|
||||
.mdescLeft, .mdescRight {
|
||||
padding: 0px 8px 4px 8px;
|
||||
color: var(--memdecl-foreground-color);
|
||||
}
|
||||
|
||||
.memSeparator {
|
||||
border-bottom: 1px solid var(--memdecl-separator-color);
|
||||
line-height: 1px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.memItemLeft, .memTemplItemLeft {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.memItemRight, .memTemplItemRight {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.memTemplParams {
|
||||
color: var(--memdecl-template-color);
|
||||
white-space: nowrap;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
/* @group Member Details */
|
||||
|
||||
/* Styles for detailed member documentation */
|
||||
|
||||
.memtitle {
|
||||
padding: 8px;
|
||||
border-top: 1px solid var(--memdef-border-color);
|
||||
border-left: 1px solid var(--memdef-border-color);
|
||||
border-right: 1px solid var(--memdef-border-color);
|
||||
border-top-right-radius: 4px;
|
||||
border-top-left-radius: 4px;
|
||||
margin-bottom: -1px;
|
||||
background-image: var(--memdef-title-gradient-image);
|
||||
background-repeat: repeat-x;
|
||||
background-color: var(--memdef-title-background-color);
|
||||
line-height: 1.25;
|
||||
font-weight: 300;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.permalink
|
||||
{
|
||||
font-size: 65%;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.memtemplate {
|
||||
font-size: 80%;
|
||||
color: var(--memdef-template-color);
|
||||
font-weight: normal;
|
||||
margin-left: 9px;
|
||||
}
|
||||
|
||||
.mempage {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.memitem {
|
||||
padding: 0;
|
||||
margin-bottom: 10px;
|
||||
margin-right: 5px;
|
||||
-webkit-transition: box-shadow 0.5s linear;
|
||||
-moz-transition: box-shadow 0.5s linear;
|
||||
-ms-transition: box-shadow 0.5s linear;
|
||||
-o-transition: box-shadow 0.5s linear;
|
||||
transition: box-shadow 0.5s linear;
|
||||
display: table !important;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.memitem.glow {
|
||||
box-shadow: 0 0 15px var(--glow-color);
|
||||
}
|
||||
|
||||
.memname {
|
||||
font-weight: 400;
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
.memname td {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.memproto, dl.reflist dt {
|
||||
border-top: 1px solid var(--memdef-border-color);
|
||||
border-left: 1px solid var(--memdef-border-color);
|
||||
border-right: 1px solid var(--memdef-border-color);
|
||||
padding: 6px 0px 6px 0px;
|
||||
color: var(--memdef-proto-text-color);
|
||||
font-weight: bold;
|
||||
text-shadow: var(--memdef-proto-text-shadow);
|
||||
background-color: var(--memdef-proto-background-color);
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
border-top-right-radius: 4px;
|
||||
}
|
||||
|
||||
.overload {
|
||||
font-family: var(--font-family-monospace);
|
||||
font-size: 65%;
|
||||
}
|
||||
|
||||
.memdoc, dl.reflist dd {
|
||||
border-bottom: 1px solid var(--memdef-border-color);
|
||||
border-left: 1px solid var(--memdef-border-color);
|
||||
border-right: 1px solid var(--memdef-border-color);
|
||||
padding: 6px 10px 2px 10px;
|
||||
border-top-width: 0;
|
||||
background-image:url('nav_g.png');
|
||||
background-repeat:repeat-x;
|
||||
background-color: var(--memdef-doc-background-color);
|
||||
/* opera specific markup */
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
/* firefox specific markup */
|
||||
-moz-border-radius-bottomleft: 4px;
|
||||
-moz-border-radius-bottomright: 4px;
|
||||
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
|
||||
/* webkit specific markup */
|
||||
-webkit-border-bottom-left-radius: 4px;
|
||||
-webkit-border-bottom-right-radius: 4px;
|
||||
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
dl.reflist dt {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
dl.reflist dd {
|
||||
margin: 0px 0px 10px 0px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.paramkey {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.paramtype {
|
||||
white-space: nowrap;
|
||||
padding: 0px;
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
.paramname {
|
||||
white-space: nowrap;
|
||||
padding: 0px;
|
||||
padding-bottom: 1px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
|
||||
.paramname em {
|
||||
color: var(--memdef-param-name-color);
|
||||
font-style: normal;
|
||||
margin-right: 1px;
|
||||
}
|
||||
|
||||
.paramname .paramdefval {
|
||||
font-family: var(--font-family-monospace);
|
||||
}
|
||||
|
||||
.params, .retval, .exception, .tparams {
|
||||
margin-left: 0px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
.params .paramname, .retval .paramname, .tparams .paramname, .exception .paramname {
|
||||
font-weight: bold;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.params .paramtype, .tparams .paramtype {
|
||||
font-style: italic;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.params .paramdir, .tparams .paramdir {
|
||||
font-family: var(--font-family-monospace);
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
table.mlabels {
|
||||
border-spacing: 0px;
|
||||
}
|
||||
|
||||
td.mlabels-left {
|
||||
width: 100%;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
td.mlabels-right {
|
||||
vertical-align: bottom;
|
||||
padding: 0px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
span.mlabels {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
span.mlabel {
|
||||
background-color: var(--label-background-color);
|
||||
border-top:1px solid var(--label-left-top-border-color);
|
||||
border-left:1px solid var(--label-left-top-border-color);
|
||||
border-right:1px solid var(--label-right-bottom-border-color);
|
||||
border-bottom:1px solid var(--label-right-bottom-border-color);
|
||||
text-shadow: none;
|
||||
color: var(--label-foreground-color);
|
||||
margin-right: 4px;
|
||||
padding: 2px 3px;
|
||||
border-radius: 3px;
|
||||
font-size: 7pt;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* @end */
|
||||
|
||||
/* these are for tree view inside a (index) page */
|
||||
|
||||
div.directory {
|
||||
margin: 10px 0px;
|
||||
border-top: 1px solid var(--directory-separator-color);
|
||||
border-bottom: 1px solid var(--directory-separator-color);
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.directory table {
|
||||
border-collapse:collapse;
|
||||
}
|
||||
|
||||
.directory td {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.directory td.entry {
|
||||
white-space: nowrap;
|
||||
padding-right: 6px;
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
.directory td.entry a {
|
||||
outline:none;
|
||||
}
|
||||
|
||||
.directory td.entry a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.directory td.desc {
|
||||
width: 100%;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
padding-top: 3px;
|
||||
border-left: 1px solid rgba(0,0,0,0.05);
|
||||
}
|
||||
|
||||
.directory tr.odd {
|
||||
padding-left: 6px;
|
||||
background-color: var(--index-odd-item-bg-color);
|
||||
}
|
||||
|
||||
.directory tr.even {
|
||||
padding-left: 6px;
|
||||
background-color: var(--index-even-item-bg-color);
|
||||
}
|
||||
|
||||
.directory img {
|
||||
vertical-align: -30%;
|
||||
}
|
||||
|
||||
.directory .levels {
|
||||
white-space: nowrap;
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
font-size: 9pt;
|
||||
}
|
||||
|
||||
.directory .levels span {
|
||||
cursor: pointer;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
color: var(--page-link-color);
|
||||
}
|
||||
|
||||
.arrow {
|
||||
color: var(--nav-arrow-color);
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
font-size: 80%;
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-family: var(--font-family-icon);
|
||||
line-height: normal;
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
height: 14px;
|
||||
width: 16px;
|
||||
display: inline-block;
|
||||
background-color: var(--icon-background-color);
|
||||
color: var(--icon-foreground-color);
|
||||
text-align: center;
|
||||
border-radius: 4px;
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.icona {
|
||||
width: 24px;
|
||||
height: 22px;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.iconfopen {
|
||||
width: 24px;
|
||||
height: 18px;
|
||||
margin-bottom: 4px;
|
||||
background-image:var(--icon-folder-open-image);
|
||||
background-repeat: repeat-y;
|
||||
vertical-align:top;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.iconfclosed {
|
||||
width: 24px;
|
||||
height: 18px;
|
||||
margin-bottom: 4px;
|
||||
background-image:var(--icon-folder-closed-image);
|
||||
background-repeat: repeat-y;
|
||||
vertical-align:top;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.icondoc {
|
||||
width: 24px;
|
||||
height: 18px;
|
||||
margin-bottom: 4px;
|
||||
background-image:var(--icon-doc-image);
|
||||
background-position: 0px -4px;
|
||||
background-repeat: repeat-y;
|
||||
vertical-align:top;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/* @end */
|
||||
|
||||
div.dynheader {
|
||||
margin-top: 8px;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
address {
|
||||
font-style: normal;
|
||||
color: var(--footer-foreground-color);
|
||||
}
|
||||
|
||||
table.doxtable caption {
|
||||
caption-side: top;
|
||||
}
|
||||
|
||||
table.doxtable {
|
||||
border-collapse:collapse;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
table.doxtable td, table.doxtable th {
|
||||
border: 1px solid var(--table-cell-border-color);
|
||||
padding: 3px 7px 2px;
|
||||
}
|
||||
|
||||
table.doxtable th {
|
||||
background-color: var(--table-header-background-color);
|
||||
color: var(--table-header-foreground-color);
|
||||
font-size: 110%;
|
||||
padding-bottom: 4px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
table.fieldtable {
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid var(--memdef-border-color);
|
||||
border-spacing: 0px;
|
||||
border-radius: 4px;
|
||||
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.fieldtable td, .fieldtable th {
|
||||
padding: 3px 7px 2px;
|
||||
}
|
||||
|
||||
.fieldtable td.fieldtype, .fieldtable td.fieldname {
|
||||
white-space: nowrap;
|
||||
border-right: 1px solid var(--memdef-border-color);
|
||||
border-bottom: 1px solid var(--memdef-border-color);
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.fieldtable td.fieldname {
|
||||
padding-top: 3px;
|
||||
}
|
||||
|
||||
.fieldtable td.fielddoc {
|
||||
border-bottom: 1px solid var(--memdef-border-color);
|
||||
}
|
||||
|
||||
.fieldtable td.fielddoc p:first-child {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.fieldtable td.fielddoc p:last-child {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.fieldtable tr:last-child td {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.fieldtable th {
|
||||
background-image: var(--memdef-title-gradient-image);
|
||||
background-repeat:repeat-x;
|
||||
background-color: var(--memdef-title-background-color);
|
||||
font-size: 90%;
|
||||
color: var(--memdef-proto-text-color);
|
||||
padding-bottom: 4px;
|
||||
padding-top: 5px;
|
||||
text-align:left;
|
||||
font-weight: 400;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom: 1px solid var(--memdef-border-color);
|
||||
}
|
||||
|
||||
|
||||
.tabsearch {
|
||||
top: 0px;
|
||||
left: 10px;
|
||||
height: 36px;
|
||||
background-image: var(--nav-gradient-image);
|
||||
z-index: 101;
|
||||
overflow: hidden;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.navpath ul
|
||||
{
|
||||
font-size: 11px;
|
||||
background-image: var(--nav-gradient-image);
|
||||
background-repeat:repeat-x;
|
||||
background-position: 0 -5px;
|
||||
height:30px;
|
||||
line-height:30px;
|
||||
color:var(--nav-text-normal-color);
|
||||
border:solid 1px var(--nav-breadcrumb-border-color);
|
||||
overflow:hidden;
|
||||
margin:0px;
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
.navpath li
|
||||
{
|
||||
list-style-type:none;
|
||||
float:left;
|
||||
padding-left:10px;
|
||||
padding-right:15px;
|
||||
background-image:var(--nav-breadcrumb-image);
|
||||
background-repeat:no-repeat;
|
||||
background-position:right;
|
||||
color: var(--nav-foreground-color);
|
||||
}
|
||||
|
||||
.navpath li.navelem a
|
||||
{
|
||||
height:32px;
|
||||
display:block;
|
||||
outline: none;
|
||||
color: var(--nav-text-normal-color);
|
||||
font-family: var(--font-family-nav);
|
||||
text-shadow: var(--nav-text-normal-shadow);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.navpath li.navelem a:hover
|
||||
{
|
||||
color: var(--nav-text-hover-color);
|
||||
text-shadow: var(--nav-text-hover-shadow);
|
||||
}
|
||||
|
||||
.navpath li.footer
|
||||
{
|
||||
list-style-type:none;
|
||||
float:right;
|
||||
padding-left:10px;
|
||||
padding-right:15px;
|
||||
background-image:none;
|
||||
background-repeat:no-repeat;
|
||||
background-position:right;
|
||||
color: var(--footer-foreground-color);
|
||||
font-size: 8pt;
|
||||
}
|
||||
|
||||
|
||||
div.summary
|
||||
{
|
||||
float: right;
|
||||
font-size: 8pt;
|
||||
padding-right: 5px;
|
||||
width: 50%;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div.summary a
|
||||
{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
table.classindex
|
||||
{
|
||||
margin: 10px;
|
||||
white-space: nowrap;
|
||||
margin-left: 3%;
|
||||
margin-right: 3%;
|
||||
width: 94%;
|
||||
border: 0;
|
||||
border-spacing: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.ingroups
|
||||
{
|
||||
font-size: 8pt;
|
||||
width: 50%;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
div.ingroups a
|
||||
{
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
div.header
|
||||
{
|
||||
background-image: var(--header-gradient-image);
|
||||
background-repeat:repeat-x;
|
||||
background-color: var(--header-background-color);
|
||||
margin: 0px;
|
||||
border-bottom: 1px solid var(--header-separator-color);
|
||||
}
|
||||
|
||||
div.headertitle
|
||||
{
|
||||
padding: 5px 5px 5px 10px;
|
||||
}
|
||||
|
||||
.PageDocRTL-title div.headertitle {
|
||||
text-align: right;
|
||||
direction: rtl;
|
||||
}
|
||||
|
||||
dl {
|
||||
padding: 0 0 0 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
dl.section {
|
||||
margin-left: 0px;
|
||||
padding-left: 0px;
|
||||
}
|
||||
|
||||
dl.note {
|
||||
margin-left: -7px;
|
||||
padding-left: 3px;
|
||||
border-left: 4px solid;
|
||||
border-color: #D0C000;
|
||||
}
|
||||
|
||||
dl.warning, dl.attention {
|
||||
margin-left: -7px;
|
||||
padding-left: 3px;
|
||||
border-left: 4px solid;
|
||||
border-color: #FF0000;
|
||||
}
|
||||
|
||||
dl.pre, dl.post, dl.invariant {
|
||||
margin-left: -7px;
|
||||
padding-left: 3px;
|
||||
border-left: 4px solid;
|
||||
border-color: #00D000;
|
||||
}
|
||||
|
||||
dl.deprecated {
|
||||
margin-left: -7px;
|
||||
padding-left: 3px;
|
||||
border-left: 4px solid;
|
||||
border-color: #505050;
|
||||
}
|
||||
|
||||
dl.todo {
|
||||
margin-left: -7px;
|
||||
padding-left: 3px;
|
||||
border-left: 4px solid;
|
||||
border-color: #00C0E0;
|
||||
}
|
||||
|
||||
dl.test {
|
||||
margin-left: -7px;
|
||||
padding-left: 3px;
|
||||
border-left: 4px solid;
|
||||
border-color: #3030E0;
|
||||
}
|
||||
|
||||
dl.bug {
|
||||
margin-left: -7px;
|
||||
padding-left: 3px;
|
||||
border-left: 4px solid;
|
||||
border-color: #C08050;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
dl.bug dt a, dl.deprecated dt a, dl.todo dt a, dl.test a {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
dl.warning, dl.attention, dl.note, dl.deprecated, dl.bug,
|
||||
dl.invariant, dl.pre, dl.post, dl.todo, dl.test, dl.remark {
|
||||
padding: 10px;
|
||||
margin: 10px 0px;
|
||||
overflow: hidden;
|
||||
margin-left: 0;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
dl.section dd {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
dl.warning, dl.attention {
|
||||
background: var(--warning-color-bg);
|
||||
border-left: 8px solid var(--warning-color-hl);
|
||||
color: var(--warning-color-text);
|
||||
}
|
||||
|
||||
dl.warning dt, dl.attention dt {
|
||||
color: var(--warning-color-hl);
|
||||
}
|
||||
|
||||
dl.note, dl.remark {
|
||||
background: var(--note-color-bg);
|
||||
border-left: 8px solid var(--note-color-hl);
|
||||
color: var(--note-color-text);
|
||||
}
|
||||
|
||||
dl.note dt, dl.remark dt {
|
||||
color: var(--note-color-hl);
|
||||
}
|
||||
|
||||
dl.todo {
|
||||
background: var(--todo-color-bg);
|
||||
border-left: 8px solid var(--todo-color-hl);
|
||||
color: var(--todo-color-text);
|
||||
}
|
||||
|
||||
dl.todo dt {
|
||||
color: var(--todo-color-hl);
|
||||
}
|
||||
|
||||
dl.test {
|
||||
background: var(--test-color-bg);
|
||||
border-left: 8px solid var(--test-color-hl);
|
||||
color: var(--test-color-text);
|
||||
}
|
||||
|
||||
dl.test dt {
|
||||
color: var(--test-color-hl);
|
||||
}
|
||||
|
||||
dl.bug dt a {
|
||||
color: var(--bug-color-hl) !important;
|
||||
}
|
||||
|
||||
dl.bug {
|
||||
background: var(--bug-color-bg);
|
||||
border-left: 8px solid var(--bug-color-hl);
|
||||
color: var(--bug-color-text);
|
||||
}
|
||||
|
||||
dl.bug dt a {
|
||||
color: var(--bug-color-hl) !important;
|
||||
}
|
||||
|
||||
dl.deprecated {
|
||||
background: var(--deprecated-color-bg);
|
||||
border-left: 8px solid var(--deprecated-color-hl);
|
||||
color: var(--deprecated-color-text);
|
||||
}
|
||||
|
||||
dl.deprecated dt a {
|
||||
color: var(--deprecated-color-hl) !important;
|
||||
}
|
||||
|
||||
dl.section dd, dl.bug dd, dl.deprecated dd, dl.todo dd, dl.test dd {
|
||||
margin-inline-start: 0px;
|
||||
}
|
||||
|
||||
dl.invariant, dl.pre, dl.post {
|
||||
background: var(--invariant-color-bg);
|
||||
border-left: 8px solid var(--invariant-color-hl);
|
||||
color: var(--invariant-color-text);
|
||||
}
|
||||
|
||||
dl.invariant dt, dl.pre dt, dl.post dt {
|
||||
color: var(--invariant-color-hl);
|
||||
}
|
||||
|
||||
|
||||
#projectrow
|
||||
{
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
#projectlogo
|
||||
{
|
||||
text-align: center;
|
||||
vertical-align: bottom;
|
||||
border-collapse: separate;
|
||||
}
|
||||
|
||||
#projectlogo img
|
||||
{
|
||||
border: 0px none;
|
||||
}
|
||||
|
||||
#projectalign
|
||||
{
|
||||
vertical-align: middle;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
|
||||
#projectname
|
||||
{
|
||||
font-size: 200%;
|
||||
font-family: var(--font-family-title);
|
||||
margin: 0px;
|
||||
padding: 2px 0px;
|
||||
}
|
||||
|
||||
#projectbrief
|
||||
{
|
||||
font-size: 90%;
|
||||
font-family: var(--font-family-title);
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#projectnumber
|
||||
{
|
||||
font-size: 50%;
|
||||
font-family: 50% var(--font-family-title);
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
#titlearea
|
||||
{
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
width: 100%;
|
||||
border-bottom: 1px solid var(--title-separator-color);
|
||||
background-color: var(--title-background-color);
|
||||
}
|
||||
|
||||
.image
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dotgraph
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mscgraph
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.plantumlgraph
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.diagraph
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.caption
|
||||
{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dl.citelist {
|
||||
margin-bottom:50px;
|
||||
}
|
||||
|
||||
dl.citelist dt {
|
||||
color:var(--citation-label-color);
|
||||
float:left;
|
||||
font-weight:bold;
|
||||
margin-right:10px;
|
||||
padding:5px;
|
||||
text-align:right;
|
||||
width:52px;
|
||||
}
|
||||
|
||||
dl.citelist dd {
|
||||
margin:2px 0 2px 72px;
|
||||
padding:5px 0;
|
||||
}
|
||||
|
||||
div.toc {
|
||||
padding: 14px 25px;
|
||||
background-color: var(--toc-background-color);
|
||||
border: 1px solid var(--toc-border-color);
|
||||
border-radius: 7px 7px 7px 7px;
|
||||
float: right;
|
||||
height: auto;
|
||||
margin: 0 8px 10px 10px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
div.toc li {
|
||||
background: var(--toc-down-arrow-image) no-repeat scroll 0 5px transparent;
|
||||
font: 10px/1.2 var(--font-family-toc);
|
||||
margin-top: 5px;
|
||||
padding-left: 10px;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
div.toc h3 {
|
||||
font: bold 12px/1.2 var(--font-family-toc);
|
||||
color: var(--toc-header-color);
|
||||
border-bottom: 0 none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.toc ul {
|
||||
list-style: none outside none;
|
||||
border: medium none;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
div.toc li.level1 {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
div.toc li.level2 {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
div.toc li.level3 {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
div.toc li.level4 {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
span.emoji {
|
||||
/* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html
|
||||
* font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort;
|
||||
*/
|
||||
}
|
||||
|
||||
span.obfuscator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.inherit_header {
|
||||
font-weight: bold;
|
||||
color: var(--inherit-header-color);
|
||||
cursor: pointer;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.inherit_header td {
|
||||
padding: 6px 0px 2px 5px;
|
||||
}
|
||||
|
||||
.inherit {
|
||||
display: none;
|
||||
}
|
||||
|
||||
tr.heading h2 {
|
||||
margin-top: 12px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
/* tooltip related style info */
|
||||
|
||||
.ttc {
|
||||
position: absolute;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#powerTip {
|
||||
cursor: default;
|
||||
/*white-space: nowrap;*/
|
||||
color: var(--tooltip-foreground-color);
|
||||
background-color: var(--tooltip-background-color);
|
||||
border: 1px solid var(--tooltip-border-color);
|
||||
border-radius: 4px 4px 4px 4px;
|
||||
box-shadow: var(--tooltip-shadow);
|
||||
display: none;
|
||||
font-size: smaller;
|
||||
max-width: 80%;
|
||||
opacity: 0.9;
|
||||
padding: 1ex 1em 1em;
|
||||
position: absolute;
|
||||
z-index: 2147483647;
|
||||
}
|
||||
|
||||
#powerTip div.ttdoc {
|
||||
color: var(--tooltip-doc-color);
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
#powerTip div.ttname a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#powerTip a {
|
||||
color: var(--tooltip-link-color);
|
||||
}
|
||||
|
||||
#powerTip div.ttname {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#powerTip div.ttdeci {
|
||||
color: var(--tooltip-declaration-color);
|
||||
}
|
||||
|
||||
#powerTip div {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 12px;
|
||||
font-family: var(--font-family-tooltip);
|
||||
line-height: 16px;
|
||||
}
|
||||
|
||||
#powerTip:before, #powerTip:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
#powerTip.n:after, #powerTip.n:before,
|
||||
#powerTip.s:after, #powerTip.s:before,
|
||||
#powerTip.w:after, #powerTip.w:before,
|
||||
#powerTip.e:after, #powerTip.e:before,
|
||||
#powerTip.ne:after, #powerTip.ne:before,
|
||||
#powerTip.se:after, #powerTip.se:before,
|
||||
#powerTip.nw:after, #powerTip.nw:before,
|
||||
#powerTip.sw:after, #powerTip.sw:before {
|
||||
border: solid transparent;
|
||||
content: " ";
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#powerTip.n:after, #powerTip.s:after,
|
||||
#powerTip.w:after, #powerTip.e:after,
|
||||
#powerTip.nw:after, #powerTip.ne:after,
|
||||
#powerTip.sw:after, #powerTip.se:after {
|
||||
border-color: rgba(255, 255, 255, 0);
|
||||
}
|
||||
|
||||
#powerTip.n:before, #powerTip.s:before,
|
||||
#powerTip.w:before, #powerTip.e:before,
|
||||
#powerTip.nw:before, #powerTip.ne:before,
|
||||
#powerTip.sw:before, #powerTip.se:before {
|
||||
border-color: rgba(128, 128, 128, 0);
|
||||
}
|
||||
|
||||
#powerTip.n:after, #powerTip.n:before,
|
||||
#powerTip.ne:after, #powerTip.ne:before,
|
||||
#powerTip.nw:after, #powerTip.nw:before {
|
||||
top: 100%;
|
||||
}
|
||||
|
||||
#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after {
|
||||
border-top-color: var(--tooltip-background-color);
|
||||
border-width: 10px;
|
||||
margin: 0px -10px;
|
||||
}
|
||||
#powerTip.n:before, #powerTip.ne:before, #powerTip.nw:before {
|
||||
border-top-color: var(--tooltip-border-color);
|
||||
border-width: 11px;
|
||||
margin: 0px -11px;
|
||||
}
|
||||
#powerTip.n:after, #powerTip.n:before {
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
#powerTip.nw:after, #powerTip.nw:before {
|
||||
right: 14px;
|
||||
}
|
||||
|
||||
#powerTip.ne:after, #powerTip.ne:before {
|
||||
left: 14px;
|
||||
}
|
||||
|
||||
#powerTip.s:after, #powerTip.s:before,
|
||||
#powerTip.se:after, #powerTip.se:before,
|
||||
#powerTip.sw:after, #powerTip.sw:before {
|
||||
bottom: 100%;
|
||||
}
|
||||
|
||||
#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after {
|
||||
border-bottom-color: var(--tooltip-background-color);
|
||||
border-width: 10px;
|
||||
margin: 0px -10px;
|
||||
}
|
||||
|
||||
#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before {
|
||||
border-bottom-color: var(--tooltip-border-color);
|
||||
border-width: 11px;
|
||||
margin: 0px -11px;
|
||||
}
|
||||
|
||||
#powerTip.s:after, #powerTip.s:before {
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
#powerTip.sw:after, #powerTip.sw:before {
|
||||
right: 14px;
|
||||
}
|
||||
|
||||
#powerTip.se:after, #powerTip.se:before {
|
||||
left: 14px;
|
||||
}
|
||||
|
||||
#powerTip.e:after, #powerTip.e:before {
|
||||
left: 100%;
|
||||
}
|
||||
#powerTip.e:after {
|
||||
border-left-color: var(--tooltip-border-color);
|
||||
border-width: 10px;
|
||||
top: 50%;
|
||||
margin-top: -10px;
|
||||
}
|
||||
#powerTip.e:before {
|
||||
border-left-color: var(--tooltip-border-color);
|
||||
border-width: 11px;
|
||||
top: 50%;
|
||||
margin-top: -11px;
|
||||
}
|
||||
|
||||
#powerTip.w:after, #powerTip.w:before {
|
||||
right: 100%;
|
||||
}
|
||||
#powerTip.w:after {
|
||||
border-right-color: var(--tooltip-border-color);
|
||||
border-width: 10px;
|
||||
top: 50%;
|
||||
margin-top: -10px;
|
||||
}
|
||||
#powerTip.w:before {
|
||||
border-right-color: var(--tooltip-border-color);
|
||||
border-width: 11px;
|
||||
top: 50%;
|
||||
margin-top: -11px;
|
||||
}
|
||||
|
||||
@media print
|
||||
{
|
||||
#top { display: none; }
|
||||
#side-nav { display: none; }
|
||||
#nav-path { display: none; }
|
||||
body { overflow:visible; }
|
||||
h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
|
||||
.summary { display: none; }
|
||||
.memitem { page-break-inside: avoid; }
|
||||
#doc-content
|
||||
{
|
||||
margin-left:0 !important;
|
||||
height:auto !important;
|
||||
width:auto !important;
|
||||
overflow:inherit;
|
||||
display:inline;
|
||||
}
|
||||
}
|
||||
|
||||
/* @group Markdown */
|
||||
|
||||
table.markdownTable {
|
||||
border-collapse:collapse;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
table.markdownTable td, table.markdownTable th {
|
||||
border: 1px solid var(--table-cell-border-color);
|
||||
padding: 3px 7px 2px;
|
||||
}
|
||||
|
||||
table.markdownTable tr {
|
||||
}
|
||||
|
||||
th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone {
|
||||
background-color: var(--table-header-background-color);
|
||||
color: var(--table-header-foreground-color);
|
||||
font-size: 110%;
|
||||
padding-bottom: 4px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
th.markdownTableHeadLeft, td.markdownTableBodyLeft {
|
||||
text-align: left
|
||||
}
|
||||
|
||||
th.markdownTableHeadRight, td.markdownTableBodyRight {
|
||||
text-align: right
|
||||
}
|
||||
|
||||
th.markdownTableHeadCenter, td.markdownTableBodyCenter {
|
||||
text-align: center
|
||||
}
|
||||
|
||||
tt, code, kbd, samp
|
||||
{
|
||||
display: inline-block;
|
||||
}
|
||||
/* @end */
|
||||
|
||||
u {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
details>summary {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
details > summary::-webkit-details-marker {
|
||||
display: none;
|
||||
}
|
||||
|
||||
details>summary::before {
|
||||
content: "\25ba";
|
||||
padding-right:4px;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
details[open]>summary::before {
|
||||
content: "\25bc";
|
||||
padding-right:4px;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
body {
|
||||
scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-background-color);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
background-color: var(--scrollbar-background-color);
|
||||
height: 12px;
|
||||
width: 12px;
|
||||
}
|
||||
::-webkit-scrollbar-thumb {
|
||||
border-radius: 6px;
|
||||
box-shadow: inset 0 0 12px 12px var(--scrollbar-thumb-color);
|
||||
border: solid 2px transparent;
|
||||
}
|
||||
::-webkit-scrollbar-corner {
|
||||
background-color: var(--scrollbar-background-color);
|
||||
}
|
||||
|
||||
28
научка/code/pwm_motor_control/Modbus/html/doxygen.svg
Normal file
|
After Width: | Height: | Size: 15 KiB |
25
научка/code/pwm_motor_control/Modbus/html/doxygen_crawl.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<title>Validator / crawler helper</title>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.10.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
</head>
|
||||
<body>
|
||||
<a href="crc__algs_8h_source.html"/>
|
||||
<a href="modbus_8h_source.html"/>
|
||||
<a href="rs__message_8h_source.html"/>
|
||||
<a href="tim__general_8h_source.html"/>
|
||||
<a href="struct_r_s___handle_type_def.html"/>
|
||||
<a href="struct_r_s___msg_type_def.html"/>
|
||||
<a href="struct_t_i_m___settings_type_def.html"/>
|
||||
<a href="struct_u_a_r_t___settings_type_def.html"/>
|
||||
<a href="index.html"/>
|
||||
<a href="doxygen_crawl.html"/>
|
||||
<a href="annotated.html"/>
|
||||
<a href="classes.html"/>
|
||||
<a href="files.html"/>
|
||||
</body>
|
||||
</html>
|
||||
194
научка/code/pwm_motor_control/Modbus/html/dynsections.js
Normal file
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
|
||||
let dynsection = {
|
||||
|
||||
// helper function
|
||||
updateStripes : function() {
|
||||
$('table.directory tr').
|
||||
removeClass('even').filter(':visible:even').addClass('even');
|
||||
$('table.directory tr').
|
||||
removeClass('odd').filter(':visible:odd').addClass('odd');
|
||||
},
|
||||
|
||||
toggleVisibility : function(linkObj) {
|
||||
const base = $(linkObj).attr('id');
|
||||
const summary = $('#'+base+'-summary');
|
||||
const content = $('#'+base+'-content');
|
||||
const trigger = $('#'+base+'-trigger');
|
||||
const src=$(trigger).attr('src');
|
||||
if (content.is(':visible')===true) {
|
||||
content.hide();
|
||||
summary.show();
|
||||
$(linkObj).addClass('closed').removeClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
content.show();
|
||||
summary.hide();
|
||||
$(linkObj).removeClass('closed').addClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
toggleLevel : function(level) {
|
||||
$('table.directory tr').each(function() {
|
||||
const l = this.id.split('_').length-1;
|
||||
const i = $('#img'+this.id.substring(3));
|
||||
const a = $('#arr'+this.id.substring(3));
|
||||
if (l<level+1) {
|
||||
i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
|
||||
a.html('▼');
|
||||
$(this).show();
|
||||
} else if (l==level+1) {
|
||||
i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
|
||||
a.html('►');
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
this.updateStripes();
|
||||
},
|
||||
|
||||
toggleFolder : function(id) {
|
||||
// the clicked row
|
||||
const currentRow = $('#row_'+id);
|
||||
|
||||
// all rows after the clicked row
|
||||
const rows = currentRow.nextAll("tr");
|
||||
|
||||
const re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
|
||||
|
||||
// only match elements AFTER this one (can't hide elements before)
|
||||
const childRows = rows.filter(function() { return this.id.match(re); });
|
||||
|
||||
// first row is visible we are HIDING
|
||||
if (childRows.filter(':first').is(':visible')===true) {
|
||||
// replace down arrow by right arrow for current row
|
||||
const currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
currentRowSpans.filter(".arrow").html('►');
|
||||
rows.filter("[id^=row_"+id+"]").hide(); // hide all children
|
||||
} else { // we are SHOWING
|
||||
// replace right arrow by down arrow for current row
|
||||
const currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
|
||||
currentRowSpans.filter(".arrow").html('▼');
|
||||
// replace down arrows by right arrows for child rows
|
||||
const childRowsSpans = childRows.find("span");
|
||||
childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
childRowsSpans.filter(".arrow").html('►');
|
||||
childRows.show(); //show all children
|
||||
}
|
||||
this.updateStripes();
|
||||
},
|
||||
|
||||
toggleInherit : function(id) {
|
||||
const rows = $('tr.inherit.'+id);
|
||||
const img = $('tr.inherit_header.'+id+' img');
|
||||
const src = $(img).attr('src');
|
||||
if (rows.filter(':first').is(':visible')===true) {
|
||||
rows.css('display','none');
|
||||
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
rows.css('display','table-row'); // using show() causes jump in firefox
|
||||
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
let codefold = {
|
||||
opened : true,
|
||||
|
||||
// in case HTML_COLORSTYLE is LIGHT or DARK the vars will be replaced, so we write them out explicitly and use double quotes
|
||||
plusImg: [ "var(--fold-plus-image)", "var(--fold-plus-image-relpath)" ],
|
||||
minusImg: [ "var(--fold-minus-image)", "var(--fold-minus-image-relpath)" ],
|
||||
|
||||
// toggle all folding blocks
|
||||
toggle_all : function(relPath) {
|
||||
if (this.opened) {
|
||||
$('#fold_all').css('background-image',this.plusImg[relPath]);
|
||||
$('div[id^=foldopen]').hide();
|
||||
$('div[id^=foldclosed]').show();
|
||||
} else {
|
||||
$('#fold_all').css('background-image',this.minusImg[relPath]);
|
||||
$('div[id^=foldopen]').show();
|
||||
$('div[id^=foldclosed]').hide();
|
||||
}
|
||||
this.opened=!this.opened;
|
||||
},
|
||||
|
||||
// toggle single folding block
|
||||
toggle : function(id) {
|
||||
$('#foldopen'+id).toggle();
|
||||
$('#foldclosed'+id).toggle();
|
||||
},
|
||||
|
||||
init : function(relPath) {
|
||||
$('span[class=lineno]').css({
|
||||
'padding-right':'4px',
|
||||
'margin-right':'2px',
|
||||
'display':'inline-block',
|
||||
'width':'54px',
|
||||
'background':'linear-gradient(var(--fold-line-color),var(--fold-line-color)) no-repeat 46px/2px 100%'
|
||||
});
|
||||
// add global toggle to first line
|
||||
$('span[class=lineno]:first').append('<span class="fold" id="fold_all" '+
|
||||
'onclick="javascript:codefold.toggle_all('+relPath+');" '+
|
||||
'style="background-image:'+this.minusImg[relPath]+';"></span>');
|
||||
// add vertical lines to other rows
|
||||
$('span[class=lineno]').not(':eq(0)').append('<span class="fold"></span>');
|
||||
// add toggle controls to lines with fold divs
|
||||
$('div[class=foldopen]').each(function() {
|
||||
// extract specific id to use
|
||||
const id = $(this).attr('id').replace('foldopen','');
|
||||
// extract start and end foldable fragment attributes
|
||||
const start = $(this).attr('data-start');
|
||||
const end = $(this).attr('data-end');
|
||||
// replace normal fold span with controls for the first line of a foldable fragment
|
||||
$(this).find('span[class=fold]:first').replaceWith('<span class="fold" '+
|
||||
'onclick="javascript:codefold.toggle(\''+id+'\');" '+
|
||||
'style="background-image:'+codefold.minusImg[relPath]+';"></span>');
|
||||
// append div for folded (closed) representation
|
||||
$(this).after('<div id="foldclosed'+id+'" class="foldclosed" style="display:none;"></div>');
|
||||
// extract the first line from the "open" section to represent closed content
|
||||
const line = $(this).children().first().clone();
|
||||
// remove any glow that might still be active on the original line
|
||||
$(line).removeClass('glow');
|
||||
if (start) {
|
||||
// if line already ends with a start marker (e.g. trailing {), remove it
|
||||
$(line).html($(line).html().replace(new RegExp('\\s*'+start+'\\s*$','g'),''));
|
||||
}
|
||||
// replace minus with plus symbol
|
||||
$(line).find('span[class=fold]').css('background-image',codefold.plusImg[relPath]);
|
||||
// append ellipsis
|
||||
$(line).append(' '+start+'<a href="javascript:codefold.toggle(\''+id+'\')">…</a>'+end);
|
||||
// insert constructed line into closed div
|
||||
$('#foldclosed'+id).html(line);
|
||||
});
|
||||
},
|
||||
};
|
||||
/* @license-end */
|
||||
91
научка/code/pwm_motor_control/Modbus/html/files.html
Normal file
@@ -0,0 +1,91 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.10.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>My Project: File List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<script type="text/javascript" src="clipboard.js"></script>
|
||||
<script type="text/javascript" src="cookie.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">My Project<span id="projectnumber"> 1.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.10.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">File List</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all documented files with brief descriptions:</div><div class="directory">
|
||||
<table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a href="crc__algs_8h_source.html"><span class="icondoc"></span></a><b>crc_algs.h</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_1_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a href="modbus_8h_source.html"><span class="icondoc"></span></a><b>modbus.h</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a href="rs__message_8h_source.html"><span class="icondoc"></span></a><b>rs_message.h</b></td><td class="desc"></td></tr>
|
||||
<tr id="row_3_" class="odd"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a href="tim__general_8h_source.html"><span class="icondoc"></span></a><b>tim_general.h</b></td><td class="desc"></td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
11
научка/code/pwm_motor_control/Modbus/html/folderclosed.svg
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
11
научка/code/pwm_motor_control/Modbus/html/folderclosedd.svg
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
17
научка/code/pwm_motor_control/Modbus/html/folderopen.svg
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
12
научка/code/pwm_motor_control/Modbus/html/folderopend.svg
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
84
научка/code/pwm_motor_control/Modbus/html/index.html
Normal file
@@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.10.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>My Project: Main Page</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<script type="text/javascript" src="clipboard.js"></script>
|
||||
<script type="text/javascript" src="cookie.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">My Project<span id="projectnumber"> 1.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.10.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">My Project Documentation</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="doxygen_crawl.html"/>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
34
научка/code/pwm_motor_control/Modbus/html/jquery.js
vendored
Normal file
134
научка/code/pwm_motor_control/Modbus/html/menu.js
Normal file
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
|
||||
function makeTree(data,relPath) {
|
||||
let result='';
|
||||
if ('children' in data) {
|
||||
result+='<ul>';
|
||||
for (let i in data.children) {
|
||||
let url;
|
||||
const link = data.children[i].url;
|
||||
if (link.substring(0,1)=='^') {
|
||||
url = link.substring(1);
|
||||
} else {
|
||||
url = relPath+link;
|
||||
}
|
||||
result+='<li><a href="'+url+'">'+
|
||||
data.children[i].text+'</a>'+
|
||||
makeTree(data.children[i],relPath)+'</li>';
|
||||
}
|
||||
result+='</ul>';
|
||||
}
|
||||
return result;
|
||||
}
|
||||
let searchBoxHtml;
|
||||
if (searchEnabled) {
|
||||
if (serverSide) {
|
||||
searchBoxHtml='<div id="MSearchBox" class="MSearchBoxInactive">'+
|
||||
'<div class="left">'+
|
||||
'<form id="FSearchBox" action="'+relPath+searchPage+
|
||||
'" method="get"><span id="MSearchSelectExt"> </span>'+
|
||||
'<input type="text" id="MSearchField" name="query" value="" placeholder="'+search+
|
||||
'" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)"'+
|
||||
' onblur="searchBox.OnSearchFieldFocus(false)"/>'+
|
||||
'</form>'+
|
||||
'</div>'+
|
||||
'<div class="right"></div>'+
|
||||
'</div>';
|
||||
} else {
|
||||
searchBoxHtml='<div id="MSearchBox" class="MSearchBoxInactive">'+
|
||||
'<span class="left">'+
|
||||
'<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()"'+
|
||||
' onmouseout="return searchBox.OnSearchSelectHide()"> </span>'+
|
||||
'<input type="text" id="MSearchField" value="" placeholder="'+search+
|
||||
'" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" '+
|
||||
'onblur="searchBox.OnSearchFieldFocus(false)" '+
|
||||
'onkeyup="searchBox.OnSearchFieldChange(event)"/>'+
|
||||
'</span>'+
|
||||
'<span class="right"><a id="MSearchClose" '+
|
||||
'href="javascript:searchBox.CloseResultsWindow()">'+
|
||||
'<img id="MSearchCloseImg" border="0" src="'+relPath+
|
||||
'search/close.svg" alt=""/></a>'+
|
||||
'</span>'+
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$('#main-nav').before('<div class="sm sm-dox"><input id="main-menu-state" type="checkbox"/>'+
|
||||
'<label class="main-menu-btn" for="main-menu-state">'+
|
||||
'<span class="main-menu-btn-icon"></span> '+
|
||||
'Toggle main menu visibility</label>'+
|
||||
'<span id="searchBoxPos1" style="position:absolute;right:8px;top:8px;height:36px;"></span>'+
|
||||
'</div>');
|
||||
$('#main-nav').append(makeTree(menudata,relPath));
|
||||
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
|
||||
if (searchBoxHtml) {
|
||||
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
|
||||
}
|
||||
const $mainMenuState = $('#main-menu-state');
|
||||
let prevWidth = 0;
|
||||
if ($mainMenuState.length) {
|
||||
const initResizableIfExists = function() {
|
||||
if (typeof initResizable==='function') initResizable();
|
||||
}
|
||||
// animate mobile menu
|
||||
$mainMenuState.change(function() {
|
||||
const $menu = $('#main-menu');
|
||||
let options = { duration: 250, step: initResizableIfExists };
|
||||
if (this.checked) {
|
||||
options['complete'] = () => $menu.css('display', 'block');
|
||||
$menu.hide().slideDown(options);
|
||||
} else {
|
||||
options['complete'] = () => $menu.css('display', 'none');
|
||||
$menu.show().slideUp(options);
|
||||
}
|
||||
});
|
||||
// set default menu visibility
|
||||
const resetState = function() {
|
||||
const $menu = $('#main-menu');
|
||||
const newWidth = $(window).outerWidth();
|
||||
if (newWidth!=prevWidth) {
|
||||
if ($(window).outerWidth()<768) {
|
||||
$mainMenuState.prop('checked',false); $menu.hide();
|
||||
$('#searchBoxPos1').html(searchBoxHtml);
|
||||
$('#searchBoxPos2').hide();
|
||||
} else {
|
||||
$menu.show();
|
||||
$('#searchBoxPos1').empty();
|
||||
$('#searchBoxPos2').html(searchBoxHtml);
|
||||
$('#searchBoxPos2').show();
|
||||
}
|
||||
if (typeof searchBox!=='undefined') {
|
||||
searchBox.CloseResultsWindow();
|
||||
}
|
||||
prevWidth = newWidth;
|
||||
}
|
||||
}
|
||||
$(window).ready(function() { resetState(); initResizableIfExists(); });
|
||||
$(window).resize(resetState);
|
||||
}
|
||||
$('#main-menu').smartmenus();
|
||||
}
|
||||
/* @license-end */
|
||||
31
научка/code/pwm_motor_control/Modbus/html/menudata.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
var menudata={children:[
|
||||
{text:"Main Page",url:"index.html"},
|
||||
{text:"Data Structures",url:"annotated.html",children:[
|
||||
{text:"Data Structures",url:"annotated.html"},
|
||||
{text:"Data Structure Index",url:"classes.html"}]},
|
||||
{text:"Files",url:"files.html",children:[
|
||||
{text:"File List",url:"files.html"}]}]}
|
||||
8
научка/code/pwm_motor_control/Modbus/html/minus.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="12px" height="12px" viewBox="0 0 105.83333 105.83333" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<g>
|
||||
<rect style="fill:#808080;stroke-width:0" width="105.83333" height="105.83334" x="4.2409692e-08" y="-1.2701158e-06" ry="0" />
|
||||
<rect style="fill:#fcfcfc;stroke-width:0" width="79.375" height="79.375" x="13.229166" y="13.229166" />
|
||||
<rect style="fill:#808080;stroke-width:0" width="52.916668" height="15.874998" x="26.458332" y="44.979168" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 582 B |
8
научка/code/pwm_motor_control/Modbus/html/minusd.svg
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="12px" height="12px" viewBox="0 0 105.83333 105.83333" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<g>
|
||||
<rect style="fill:#808080;stroke-width:0" width="105.83333" height="105.83334" x="4.2409692e-08" y="-1.2701158e-06" ry="0" />
|
||||
<rect style="fill:#000000;stroke-width:0" width="79.375" height="79.375" x="13.229166" y="13.229166" />
|
||||
<rect style="fill:#808080;stroke-width:0" width="52.916668" height="15.874998" x="26.458332" y="44.979168" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 582 B |
258
научка/code/pwm_motor_control/Modbus/html/modbus_8h_source.html
Normal file
@@ -0,0 +1,258 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.10.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>My Project: modbus.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<script type="text/javascript" src="clipboard.js"></script>
|
||||
<script type="text/javascript" src="cookie.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">My Project<span id="projectnumber"> 1.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.10.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(0); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">modbus.h</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/********************************MODBUS*************************************</span></div>
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment">Данный файл содержит объявления базовых функции и дефайны для реализации </span></div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment">протоколов </span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment">***************************************************************************/</span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="preprocessor">#ifndef __MODBUS_H_</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#define __MODBUS_H_</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span> </div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="preprocessor">#include "main.h"</span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//----------DEFINES FOR MODBUS SETTING--------------</span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="preprocessor">#define MB_UART_NUMB 2 </span><span class="comment">// number of used uart</span></div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">/* accord to this define sets define USED_MB_UART = USARTx */</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#define MB_TIM_NUMB 7 </span><span class="comment">// number of used uart</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">/* accord to this define sets define USED_MB_TIM = TIMx */</span></div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span> </div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span> </div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#define COILS_NUMB 16 </span><span class="comment">// minimum 16</span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#define INPUT_REGS_NUMB 100</span></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="preprocessor">#define HOLD_REGS_NUMB 100 </span></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">/* defines for modbus behaviour */</span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#define MB_MAX_TIMEOUT 5000 </span><span class="comment">// is ms</span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#define RX_FIRST_PART_IND 6 </span><span class="comment">// up to NUMB of bytes if its there, or up to first byte CRC</span></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment">// custom define for size of receive message </span></div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment">//--------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> </div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment">//-------------DEFINES FOR STRUCTURE----------------</span></div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">/* defines for structure of modbus message */</span></div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#define DEVICE_ID_SIZE 1 </span><span class="comment">// size of (MbAddr)</span></div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#define FUNC_CODE_SIZE 1 </span><span class="comment">// size of (Func_Code)</span></div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#define DATA_SIZE_SIZE 1 </span><span class="comment">// size of (ByteCnt)</span></div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#define ADDRESS_SIZE 2 </span><span class="comment">// size of (Qnt)</span></div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#define NUMBorVAL_SIZE 2 </span><span class="comment">// size of (Qnt)</span></div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span><span class="preprocessor">#define DATA_MAX_SIZE 32 </span><span class="comment">// maximum number of data: DWORD (NOT MESSAGE SIZE)</span></div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#define CRC_SIZE 2 </span><span class="comment">// size of (MB_CRC) in bytes</span></div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> </div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="preprocessor">#define ERR_VALUES_START 0x80U </span><span class="comment">// first number of (Except_Code)</span></div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> </div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="comment">/* size of info */</span></div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span><span class="preprocessor">#define INFO_SIZE DEVICE_ID_SIZE+FUNC_CODE_SIZE+DATA_SIZE_SIZE+ADDRESS_SIZE+NUMBorVAL_SIZE</span></div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span> </div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="comment">/* size of buffer: max size of whole message */</span></div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span><span class="preprocessor">#define MSG_SIZE_MAX (DATA_MAX_SIZE+INFO_SIZE+CRC_SIZE) </span><span class="comment">// max possible size of message</span></div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span> </div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="preprocessor">#define Message_Data(_msg_, _ind_) _msg_->DATA[_ind_].DATA</span></div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span><span class="preprocessor">#define Message_Data_Byte(_msg_, _ind_, _byte_) _msg_->DATA[_ind_]._byte_</span></div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="comment">// choose certain coil</span></div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="preprocessor">#define Set_Coils_Origin(_coils_, _source_) uint16_t *(_coils_) = (uint16_t *)(&(_source_))</span></div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="preprocessor">#define Set_Hold_Regs_Origin(_hregs_, _source_) uint16_t *(_hregs_) = (uint16_t *)(&(_source_))</span></div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span><span class="comment">/* Structure for modbus messsage */</span></div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span> </div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="keyword">typedef</span> <span class="keyword">enum</span> <span class="comment">//RS_FunctonTypeDef</span></div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span>{</div>
|
||||
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"> 57</span> <span class="comment">// reading</span></div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> MB_R_COILS = 0x01,</div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> MB_R_DISC_IN = 0x02,</div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> MB_R_IN_REGS = 0x03,</div>
|
||||
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"> 61</span> MB_R_HOLD_REGS = 0x04,</div>
|
||||
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"> 62</span> </div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> <span class="comment">// writting</span></div>
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"> 64</span> MB_W_COIL = 0x05,</div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span> MB_W_HOLD_REG = 0x06,</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> MB_W_COILS = 0x0F,</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> MB_W_HOLD_REGS = 0x10,</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span>}RS_FunctonTypeDef;</div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> </div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
|
||||
<div class="foldopen" id="foldopen00071" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="struct_r_s___msg_type_def.html"> 71</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><span class="comment">// RS_MsgTypeDef</span></div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span>{</div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> uint8_t MbAddr;</div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> RS_FunctonTypeDef Func_Code;</div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> uint8_t Except_Code;</div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> uint16_t Addr;</div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> uint16_t Qnt;</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> uint8_t ByteCnt;</div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> uint16_t DATA[DATA_MAX_SIZE];</div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span> </div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span> uint16_t MB_CRC;</div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span>}<a class="code hl_struct" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a>;</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span><span class="comment">//--------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> </div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> </div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span><span class="preprocessor">#define write16_to_8(_16bit_, _2_8bit_)</span></div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> </div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> </div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> </div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span>uint8_t Modbus_Command_1(<a class="code hl_struct" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a> *modbus_msg);</div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span>uint8_t Modbus_Command_3(<a class="code hl_struct" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a> *modbus_msg);</div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span>uint8_t Modbus_Command_5(<a class="code hl_struct" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a> *modbus_msg);</div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span>uint8_t Modbus_Command_15(<a class="code hl_struct" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a> *modbus_msg);</div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span> </div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> </div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> </div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span><span class="comment">/* set USART_TypeDef for choosen numb of usart */</span></div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span><span class="preprocessor">#if (MB_UART_NUMB == 1) </span></div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span><span class="preprocessor"> #define USED_MODBUS_UART USART1 </span></div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span><span class="preprocessor"> #define USE_USART1</span></div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span><span class="preprocessor">#elif (MB_UART_NUMB == 2)</span></div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span><span class="preprocessor"> #define USED_MODBUS_UART USART2 </span></div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span><span class="preprocessor"> #define USE_USART2</span></div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span><span class="preprocessor">#elif (MB_UART_NUMB == 3)</span></div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span><span class="preprocessor"> #define USED_MODBUS_UART USART3 </span></div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span><span class="preprocessor"> #define USE_USART3</span></div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span><span class="preprocessor">#elif (MB_UART_NUMB == 4)</span></div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span><span class="preprocessor"> #define USED_MODBUS_UART UART4 </span></div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span><span class="preprocessor"> #define USE_UART4</span></div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span><span class="preprocessor">#elif (MB_UART_NUMB == 5)</span></div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span><span class="preprocessor"> #define USED_MODBUS_UART UART5</span></div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span><span class="preprocessor"> #define USE_UART6</span></div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span><span class="preprocessor">#elif (MB_UART_NUMB == 6)</span></div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span><span class="preprocessor"> #define USED_MODBUS_UART USART6 </span></div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span><span class="preprocessor"> #define USE_USART6</span></div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span><span class="preprocessor">#if (MB_TIM_NUMB == 1) </span></div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM1 </span></div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span><span class="preprocessor"> #define USE_TIM1</span></div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span><span class="preprocessor">#elif (MB_TIM_NUMB == 2)</span></div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM2 </span></div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span><span class="preprocessor"> #define USE_TIM2</span></div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span><span class="preprocessor">#elif (MB_TIM_NUMB == 3)</span></div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM3 </span></div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span><span class="preprocessor"> #define USE_TIM3</span></div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span><span class="preprocessor">#elif (MB_TIM_NUMB == 4)</span></div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM4 </span></div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span><span class="preprocessor"> #define USE_TIM4</span></div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span><span class="preprocessor">#elif (MB_TIM_NUMB == 5)</span></div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM5</span></div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span><span class="preprocessor"> #define USE_TIM5</span></div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span><span class="preprocessor">#elif (MB_TIM_NUMB == 6)</span></div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM6 </span></div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span><span class="preprocessor"> #define USE_TIM6</span></div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span><span class="preprocessor">#elif (MB_TIM_NUMB == 7)</span></div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM7 </span></div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span><span class="preprocessor"> #define USE_TIM7</span></div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span><span class="preprocessor">#elif (MB_TIM_NUMB == 8)</span></div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM8</span></div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span><span class="preprocessor"> #define USE_TIM8 </span></div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span><span class="preprocessor">#elif (MB_TIM_NUMB == 9)</span></div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM9 </span></div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span><span class="preprocessor"> #define USE_TIM9</span></div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span><span class="preprocessor">#elif (MB_TIM_NUMB == 10)</span></div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM10 </span></div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span><span class="preprocessor"> #define USE_TIM10</span></div>
|
||||
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"> 184</span><span class="preprocessor">#elif (MB_TIM_NUMB == 11)</span></div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM11</span></div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span><span class="preprocessor"> #define USE_TIM11</span></div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span><span class="preprocessor">#elif (MB_TIM_NUMB == 12)</span></div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM12 </span></div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span><span class="preprocessor"> #define USE_TIM12</span></div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span><span class="preprocessor">#elif (MB_TIM_NUMB == 13)</span></div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM13 </span></div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span><span class="preprocessor"> #define USE_TIM13</span></div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span><span class="preprocessor">#elif (MB_TIM_NUMB == 14)</span></div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span><span class="preprocessor"> #define USED_MODBUS_TIM TIM14 </span></div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span><span class="preprocessor"> #define USE_TIM14</span></div>
|
||||
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"> 196</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno"> 197</span> </div>
|
||||
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno"> 198</span><span class="preprocessor">#endif </span><span class="comment">//__MODBUS_H_</span></div>
|
||||
<div class="ttc" id="astruct_r_s___msg_type_def_html"><div class="ttname"><a href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a></div><div class="ttdef"><b>Definition</b> modbus.h:72</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
научка/code/pwm_motor_control/Modbus/html/nav_f.png
Normal file
|
After Width: | Height: | Size: 153 B |
BIN
научка/code/pwm_motor_control/Modbus/html/nav_fd.png
Normal file
|
After Width: | Height: | Size: 169 B |
BIN
научка/code/pwm_motor_control/Modbus/html/nav_g.png
Normal file
|
After Width: | Height: | Size: 95 B |
BIN
научка/code/pwm_motor_control/Modbus/html/nav_h.png
Normal file
|
After Width: | Height: | Size: 98 B |
BIN
научка/code/pwm_motor_control/Modbus/html/nav_hd.png
Normal file
|
After Width: | Height: | Size: 114 B |
BIN
научка/code/pwm_motor_control/Modbus/html/open.png
Normal file
|
After Width: | Height: | Size: 123 B |
9
научка/code/pwm_motor_control/Modbus/html/plus.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="12px" height="12px" viewBox="0 0 105.83333 105.83333" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<g>
|
||||
<rect style="fill:#808080;stroke-width:0" width="105.83333" height="105.83334" x="4.2409692e-08" y="-1.2701158e-06" ry="0" />
|
||||
<rect style="fill:#fcfcfc;stroke-width:0" width="79.375" height="79.375" x="13.229166" y="13.229166" />
|
||||
<rect style="fill:#808080;stroke-width:0" width="52.916668" height="15.874998" x="26.458332" y="44.979168" />
|
||||
<rect style="fill:#808080;stroke-width:0" width="15.874998" height="52.916668" x="44.979168" y="26.458332" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 696 B |
9
научка/code/pwm_motor_control/Modbus/html/plusd.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="12px" height="12px" viewBox="0 0 105.83333 105.83333" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<g>
|
||||
<rect style="fill:#808080;stroke-width:0" width="105.83333" height="105.83334" x="4.2409692e-08" y="-1.2701158e-06" ry="0" />
|
||||
<rect style="fill:#000000;stroke-width:0" width="79.375" height="79.375" x="13.229166" y="13.229166" />
|
||||
<rect style="fill:#808080;stroke-width:0" width="52.916668" height="15.874998" x="26.458332" y="44.979168" />
|
||||
<rect style="fill:#808080;stroke-width:0" width="15.874998" height="52.916668" x="44.979168" y="26.458332" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 696 B |
@@ -0,0 +1,335 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.10.0"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>My Project: rs_message.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<script type="text/javascript" src="clipboard.js"></script>
|
||||
<script type="text/javascript" src="cookie.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<table cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr id="projectrow">
|
||||
<td id="projectalign">
|
||||
<div id="projectname">My Project<span id="projectnumber"> 1.0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.10.0 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() { codefold.init(0); });
|
||||
/* @license-end */
|
||||
</script>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<div id="MSearchResults">
|
||||
<div class="SRPage">
|
||||
<div id="SRIndex">
|
||||
<div id="SRResults"></div>
|
||||
<div class="SRStatus" id="Loading">Loading...</div>
|
||||
<div class="SRStatus" id="Searching">Searching...</div>
|
||||
<div class="SRStatus" id="NoMatches">No Matches</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">rs_message.h</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="preprocessor">#ifndef __UART_USER_H_</span></div>
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="preprocessor">#define __UART_USER_H_</span></div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span> </div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="preprocessor">#define HAL_UART_MODULE_ENABLED </span><span class="comment">// need to uncomment these defines in stm32f4xx_hal_conf.h</span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="preprocessor">#define HAL_USART_MODULE_ENABLED </span><span class="comment">// also need to add hal_uart.c (source code)</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span> </div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment">//#define USE_USART1</span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment">//#define USE_USART2</span></div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment">//#define USE_USART3</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment">//#define USE_UART4</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment">//#define USE_UART5</span></div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment">//#define USE_USART6</span></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment">/* note: used uart defines in modbus.h */</span></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span> </div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="preprocessor">#include "modbus.h"</span> </div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="preprocessor">#include "stm32f4xx_hal.h"</span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="preprocessor">#include "crc_algs.h"</span></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#include "tim_general.h"</span></div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment">/* Clear message-uart buffer */</span></div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="preprocessor">#define RS_Clear_Buff(_buff_) for(int i=0; i<MSG_SIZE_MAX;i++) _buff_[i] = NULL</span></div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="comment">/* Set/Reset flags */</span></div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#define RS_Set_Free(_hRS_) _hRS_->fRS_Busy = 0</span></div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span><span class="preprocessor">#define RS_Set_Busy(_hRS_) _hRS_->fRS_Busy = 1</span></div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="preprocessor">#define RS_Set_RX_Flags(_hRS_) _hRS_->fRX_Busy = 1; _hRS_->fRX_Done = 0; _hRS_->fRX_Half = 0</span></div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#define RS_Set_TX_Flags(_hRS_) _hRS_->fTX_Busy = 1; _hRS_->fTX_Done = 0</span></div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span><span class="preprocessor">#define RS_Reset_RX_Flags(_hRS_) _hRS_->fRX_Busy = 0; _hRS_->fRX_Done = 0; _hRS_->fRX_Half = 0</span></div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="preprocessor">#define RS_Reset_TX_Flags(_hRS_) _hRS_->fTX_Busy = 0; _hRS_->fTX_Done = 0</span></div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="preprocessor">#define RS_Set_RX_End_Flag(_hRS_) _hRS_->fRX_Done = 1</span></div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span><span class="preprocessor">#define RS_Set_TX_End_Flag(_hRS_) _hRS_->fTX_Done = 1</span></div>
|
||||
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"> 41</span> </div>
|
||||
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"> 42</span><span class="preprocessor">#define RS_Set_RX_End(_hRS_) RS_Reset_RX_Flags(_hRS_); RS_Set_RX_End_Flag(_hRS_)</span></div>
|
||||
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"> 43</span><span class="preprocessor">#define RS_Set_TX_End(_hRS_) RS_Reset_TX_Flags(_hRS_); RS_Set_TX_End_Flag(_hRS_)</span></div>
|
||||
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"> 44</span> </div>
|
||||
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"> 45</span><span class="comment">/* Clear all RS stuff */</span></div>
|
||||
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"> 46</span><span class="preprocessor">#define RS_Clear_All(_hRS_) RS_Clear_Buff(_hRS_->pBufferPtr); RS_Reset_RX_Flags(_hRS_); RS_Reset_TX_Flags(_hRS_);</span></div>
|
||||
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"> 47</span> </div>
|
||||
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span><span class="comment">//#define MB_Is_RX_Busy(_hRS_) ((_hRS_->huartx->gState&HAL_USART_STATE_BUSY_RX) == HAL_USART_STATE_BUSY_RX)</span></div>
|
||||
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"> 49</span><span class="comment">//#define MB_Is_TX_Busy(_hRS_) ((_hRS_->huartx->gState&HAL_USART_STATE_BUSY_RX) == HAL_USART_STATE_BUSY_TX)</span></div>
|
||||
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"> 50</span><span class="preprocessor">#define RS_Is_RX_Busy(_hRS_) (_hRS_->fRX_Busy == 1)</span></div>
|
||||
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"> 51</span><span class="preprocessor">#define RS_Is_TX_Busy(_hRS_) (_hRS_->fTX_Busy == 1)</span></div>
|
||||
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"> 52</span> </div>
|
||||
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
|
||||
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"> 54</span><span class="preprocessor">#define IS_IRQ_MASKED() (__get_PRIMASK() != 0U)</span></div>
|
||||
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"> 55</span><span class="preprocessor">#define IS_IRQ_MODE() (__get_IPSR() != 0U)</span></div>
|
||||
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"> 56</span><span class="preprocessor">#define IS_IRQ() (IS_IRQ_MODE() || IS_IRQ_MASKED())</span></div>
|
||||
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"> 58</span> </div>
|
||||
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"> 59</span> </div>
|
||||
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
|
||||
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
|
||||
<div class="foldopen" id="foldopen00064" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="struct_u_a_r_t___settings_type_def.html"> 64</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><span class="comment">// struct with settings for custom function</span></div>
|
||||
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"> 65</span>{</div>
|
||||
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> UART_HandleTypeDef *huartx;</div>
|
||||
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> DMA_HandleTypeDef *hdma_uartx_rx;</div>
|
||||
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> </div>
|
||||
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> GPIO_TypeDef *GPIOx;</div>
|
||||
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> uint16_t GPIO_PIN_RX;</div>
|
||||
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> uint16_t GPIO_PIN_TX;</div>
|
||||
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
|
||||
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> DMA_Stream_TypeDef *DMAChannel; <span class="comment">// DMAChannel = 0 if doesnt need</span></div>
|
||||
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> uint32_t DMA_CHANNEL_X; <span class="comment">// DMAChannel = 0 if doesnt need</span></div>
|
||||
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
|
||||
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> </div>
|
||||
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span>}<a class="code hl_struct" href="struct_u_a_r_t___settings_type_def.html">UART_SettingsTypeDef</a>;</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
|
||||
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> </div>
|
||||
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span><span class="comment">//------------------ENUMERATIONS--------------------</span></div>
|
||||
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"> 81</span><span class="comment">/* Enums for respond CMD about RS status*/</span></div>
|
||||
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"> 82</span><span class="keyword">typedef</span> <span class="keyword">enum</span> <span class="comment">// RS_StatusTypeDef</span></div>
|
||||
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"> 83</span>{</div>
|
||||
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"> 84</span> <span class="comment">/* IN-CODE STATUS (start from 0x01, and goes up)*/</span></div>
|
||||
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"> 85</span> <span class="comment">/*0x01*/</span> RS_OK = 0x01,</div>
|
||||
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> <span class="comment">/*0x02*/</span> RS_ERR, </div>
|
||||
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span> <span class="comment">/*0x03*/</span> RS_ABORTED, </div>
|
||||
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span> <span class="comment">/*0x04*/</span> RS_BUSY,</div>
|
||||
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"> 89</span> </div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> <span class="comment">/*0x06*/</span> RS_COLLECT_MSG_ERR,</div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span> <span class="comment">/*0x07*/</span> RS_PARSE_MSG_ERR,</div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span> <span class="comment">/*0x01*/</span> RS_NOT_MINE_DATA,</div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span> <span class="comment">// reserved values</span></div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span><span class="comment">// /*0x00*/ RS_UNKNOWN_ERR = 0x00, // reserved for case, if no one error founded (nothing changed response from zero)</span></div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span>}RS_StatusTypeDef;</div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> </div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span> </div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="comment">/* Enums for RS Modes */</span></div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="keyword">typedef</span> <span class="keyword">enum</span> <span class="comment">// RS_ModeTypeDef</span></div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span>{</div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> SLAVE_ALWAYS_WAIT = 0x01, <span class="comment">// Slave mode with infinity waiting</span></div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span> SLAVE_TIMEOUT_WAIT = 0x02, <span class="comment">// Slave mode with waiting with timeout</span></div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="comment">// MASTER = 0x03, // Master mode</span></div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span>}RS_ModeTypeDef;</div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> </div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="comment">/* Enums for RS UART Modes */</span></div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span><span class="keyword">typedef</span> <span class="keyword">enum</span> <span class="comment">// RS_ITModeTypeDef</span></div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span>{</div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span> BLCK_MODE = 0x00, <span class="comment">// Blocking mode</span></div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span> IT_MODE = 0x01, <span class="comment">// Interrupt mode</span></div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span>}RS_ITModeTypeDef;</div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span> </div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span><span class="comment">/* Enums for Response modes */</span></div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span><span class="keyword">typedef</span> <span class="keyword">enum</span> <span class="comment">// RS_RespModeTypeDef</span></div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span>{</div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span> NO_RESPONSE = 0x00, <span class="comment">// No response: only receive/transmit without any response</span></div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span> SING_RESPONSE = 0x01, <span class="comment">// Single response: respond once after receive / wait for one respond after transmit</span></div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> CIRC_RESPONSE = 0x02, <span class="comment">// Circular response: </span></div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span><span class="comment">// IT_MODE: Receive - permanent receive mode and after any received message send respond, Transmit - same as in Receive, but it start with Transmit</span></div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span><span class="comment">// BLCK_MODE: Transmit - transmit until response is taken, Receive - unused</span></div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span>}RS_RespModeTypeDef;</div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span> </div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span><span class="comment">/* Enums for Abort modes */</span></div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span><span class="keyword">typedef</span> <span class="keyword">enum</span> <span class="comment">// RS_AbortTypeDef</span></div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span>{</div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> ABORT_TX = 0x01, <span class="comment">// Abort transmit</span></div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span> ABORT_RX = 0x02, <span class="comment">// Abort receive</span></div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span> ABORT_RX_TX = 0x03, <span class="comment">// Abort receive and transmit</span></div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span> ABORT_RS = 0x04, <span class="comment">// Abort uart and reset RS structure</span></div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span>}RS_AbortTypeDef;</div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span> </div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span><span class="comment">/* Enums for RX Size modes */</span></div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span><span class="keyword">typedef</span> <span class="keyword">enum</span> <span class="comment">// RS_RXSizeTypeDef</span></div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span>{</div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span> RS_RX_Size_Const = 0x01, <span class="comment">// size of receiving message is constant</span></div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span> RS_RX_Size_NotConst = 0x02, <span class="comment">// size of receiving message isnt constant</span></div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span>}RS_RXSizeTypeDef;</div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span> </div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span> </div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span><span class="comment">//-----------STRUCTURE FOR HANDLE RS------------</span></div>
|
||||
<div class="foldopen" id="foldopen00146" data-start="{" data-end="};">
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"><a class="line" href="struct_r_s___handle_type_def.html"> 146</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><span class="comment">// RS_HandleTypeDef</span></div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span>{ </div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span> <span class="comment">/* MESSAGE */</span></div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span> uint8_t ID; <span class="comment">// ID of RS "channel"</span></div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span> <a class="code hl_struct" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a> *pMessagePtr; <span class="comment">// pointer to message struct</span></div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> uint8_t *pBufferPtr; <span class="comment">// pointer to message buffer</span></div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span> uint32_t RS_Message_Size; <span class="comment">// size of whole message, not only data</span></div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> <span class="comment">/* HANDLERS and SETTINGS */</span></div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span> UART_HandleTypeDef *huartx; <span class="comment">// handler for used uart</span></div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span> TIM_HandleTypeDef *htimx; <span class="comment">// handler for used tim</span></div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span> RS_ModeTypeDef sRS_Mode; <span class="comment">// slave or master @ref RS_ModeTypeDef</span></div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> RS_ITModeTypeDef sRS_IT_Mode; <span class="comment">// 1 - IT mode, 0 - Blocking mode </span></div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span> uint32_t sRS_Timeout; <span class="comment">// setting: timeout in ms</span></div>
|
||||
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno"> 160</span> RS_RXSizeTypeDef sRS_RX_Size_Mode; <span class="comment">// setting: 1 - not const, 0 - const </span></div>
|
||||
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"> 161</span> </div>
|
||||
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"> 162</span> <span class="comment">/* FLAGS */</span> </div>
|
||||
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"> 163</span> <span class="comment">// These flags for controling receive/transmit</span></div>
|
||||
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"> 164</span> <span class="keywordtype">unsigned</span> fRX_Half:1; <span class="comment">// 0 - receiving msg before ByteCnt, 0 - receiving msg after ByteCnt</span></div>
|
||||
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"> 165</span> </div>
|
||||
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"> 166</span> <span class="keywordtype">unsigned</span> fRS_Busy:1; <span class="comment">// 1 - RS is busy, 0 - RS isnt busy </span></div>
|
||||
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"> 167</span> <span class="keywordtype">unsigned</span> fRX_Busy:1; <span class="comment">// 1 - receiving is active, 0 - receiving isnt active</span></div>
|
||||
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"> 168</span> <span class="keywordtype">unsigned</span> fTX_Busy:1; <span class="comment">// 1 - transmiting is active, 0 - transmiting isnt active </span></div>
|
||||
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"> 169</span> </div>
|
||||
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"> 170</span> <span class="keywordtype">unsigned</span> fRX_Done:1; <span class="comment">// 1 - receiving is done, 0 - receiving isnt done </span></div>
|
||||
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"> 171</span> <span class="keywordtype">unsigned</span> fTX_Done:1; <span class="comment">// 1 - transmiting is done, 0 - transmiting isnt done </span></div>
|
||||
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"> 172</span> </div>
|
||||
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"> 173</span> <span class="comment">// setted by user</span></div>
|
||||
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"> 174</span> <span class="keywordtype">unsigned</span> fMessageHandled:1; <span class="comment">// 1 - RS command is handled, 0 - RS command isnt handled yet</span></div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"> 175</span> <span class="keywordtype">unsigned</span> fEchoResponse:1; <span class="comment">// 0 - receiving msg before ByteCnt, 0 - receiving msg after ByteCnt</span></div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> <span class="keywordtype">unsigned</span> fDeferredResponse:1; <span class="comment">// 0 - receiving msg before ByteCnt, 0 - receiving msg after ByteCnt</span></div>
|
||||
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"> 177</span> </div>
|
||||
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno"> 178</span> <span class="comment">/* RS STATUS */</span></div>
|
||||
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"> 179</span> RS_StatusTypeDef RS_STATUS; <span class="comment">// RS status</span></div>
|
||||
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"> 180</span> RS_FunctonTypeDef RS_RESPONSE; <span class="comment">// RS response</span></div>
|
||||
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"> 181</span>}<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a>;</div>
|
||||
</div>
|
||||
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"> 182</span> </div>
|
||||
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"> 183</span> </div>
|
||||
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"> 185</span> </div>
|
||||
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno"> 186</span> </div>
|
||||
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"> 187</span> </div>
|
||||
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"> 188</span> </div>
|
||||
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"> 189</span> </div>
|
||||
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"> 190</span> </div>
|
||||
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno"> 191</span> </div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"> 192</span> </div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> </div>
|
||||
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno"> 194</span><span class="comment">//----------------FUNCTIONS FOR PROCESSING MESSAGE-------------------</span></div>
|
||||
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"> 195</span><span class="comment">/*--------------------Defined by users purposes--------------------*/</span></div>
|
||||
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"> 203</span>RS_StatusTypeDef RS_Response(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS, <a class="code hl_struct" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a> *RS_msg);</div>
|
||||
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"> 204</span> </div>
|
||||
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"> 213</span>RS_StatusTypeDef Collect_Message(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS, <a class="code hl_struct" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a> *RS_msg, uint8_t *msg_uart_buff);</div>
|
||||
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"> 214</span> </div>
|
||||
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"> 223</span>RS_StatusTypeDef Parse_Message(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS, <a class="code hl_struct" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a> *RS_msg, uint8_t *msg_uart_buff);</div>
|
||||
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"> 224</span> </div>
|
||||
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno"> 232</span>RS_StatusTypeDef RS_Define_Size_of_RX_Message(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS, uint32_t *rx_data_size);</div>
|
||||
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno"> 233</span> </div>
|
||||
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno"> 234</span> </div>
|
||||
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"> 235</span><span class="comment">/* MORE USER FUNCTION BEGIN*/</span></div>
|
||||
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno"> 236</span><span class="comment">/* MORE USER FUNCTION END*/</span></div>
|
||||
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno"> 237</span> </div>
|
||||
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"> 238</span> </div>
|
||||
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno"> 239</span><span class="comment">//-------------------------GENERAL FUNCTIONS-------------------------</span></div>
|
||||
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno"> 240</span><span class="comment">/*-----------------Should be called from main code-----------------*/</span></div>
|
||||
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno"> 248</span>RS_StatusTypeDef RS_Receive_IT(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS, <a class="code hl_struct" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a> *RS_msg);</div>
|
||||
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"> 249</span> </div>
|
||||
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno"> 257</span>RS_StatusTypeDef RS_Transmit_IT(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS, <a class="code hl_struct" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a> *RS_msg);</div>
|
||||
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno"> 258</span> </div>
|
||||
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno"> 268</span>RS_StatusTypeDef RS_Init(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS, <a class="code hl_struct" href="struct_u_a_r_t___settings_type_def.html">UART_SettingsTypeDef</a> *suart, <a class="code hl_struct" href="struct_t_i_m___settings_type_def.html">TIM_SettingsTypeDef</a> *stim, uint8_t *pRS_BufferPtr);</div>
|
||||
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"> 269</span> </div>
|
||||
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno"> 283</span>RS_StatusTypeDef RS_Abort(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS, RS_AbortTypeDef AbortMode);</div>
|
||||
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno"> 284</span> </div>
|
||||
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno"> 285</span><span class="comment">//-------------------------SUPPORT FUNCTIONS-------------------------</span></div>
|
||||
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno"> 286</span><span class="comment">/*------------------Called from General functions------------------*/</span></div>
|
||||
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"> 294</span>RS_StatusTypeDef RS_Handle_Receive_Start(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS, <a class="code hl_struct" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a> *RS_msg);</div>
|
||||
<div class="line"><a id="l00302" name="l00302"></a><span class="lineno"> 302</span>RS_StatusTypeDef RS_Handle_Transmit_Start(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS, <a class="code hl_struct" href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a> *RS_msg);</div>
|
||||
<div class="line"><a id="l00303" name="l00303"></a><span class="lineno"> 303</span><span class="comment">/* UART RX Callback: define behaviour after receiving message */</span></div>
|
||||
<div class="line"><a id="l00304" name="l00304"></a><span class="lineno"> 304</span>RS_StatusTypeDef RS_UART_RxCpltCallback(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS);</div>
|
||||
<div class="line"><a id="l00305" name="l00305"></a><span class="lineno"> 305</span><span class="comment">/* UART RX Callback: define behaviour after transmiting message */</span></div>
|
||||
<div class="line"><a id="l00306" name="l00306"></a><span class="lineno"> 306</span>RS_StatusTypeDef RS_UART_TxCpltCallback(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS);</div>
|
||||
<div class="line"><a id="l00307" name="l00307"></a><span class="lineno"> 307</span><span class="comment">/* Handler for UART */</span></div>
|
||||
<div class="line"><a id="l00308" name="l00308"></a><span class="lineno"> 308</span><span class="keywordtype">void</span> RS_UART_Handler(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS);</div>
|
||||
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno"> 309</span><span class="comment">/* Handler for TIM */</span></div>
|
||||
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"> 310</span><span class="keywordtype">void</span> RS_TIM_Handler(<a class="code hl_struct" href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a> *hRS);</div>
|
||||
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"> 311</span> </div>
|
||||
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"> 312</span> </div>
|
||||
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"> 313</span> </div>
|
||||
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"> 314</span> </div>
|
||||
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> </div>
|
||||
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"> 316</span> </div>
|
||||
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno"> 317</span>HAL_StatusTypeDef RS_UART_Init(<a class="code hl_struct" href="struct_u_a_r_t___settings_type_def.html">UART_SettingsTypeDef</a> *suart);</div>
|
||||
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno"> 318</span><span class="keywordtype">void</span> UART_GPIO_Init(GPIO_TypeDef *GPIOx, uint16_t GPIO_PIN_RX, uint16_t GPIO_PIN_TX);</div>
|
||||
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno"> 319</span><span class="keywordtype">void</span> UART_DMA_Init(UART_HandleTypeDef *huart, DMA_HandleTypeDef *hdma_rx, DMA_Stream_TypeDef *DMAChannel, uint32_t DMA_CHANNEL_X);</div>
|
||||
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno"> 320</span><span class="keywordtype">void</span> User_UART_MspInit(UART_HandleTypeDef *huart);</div>
|
||||
<div class="line"><a id="l00321" name="l00321"></a><span class="lineno"> 321</span> </div>
|
||||
<div class="line"><a id="l00322" name="l00322"></a><span class="lineno"> 322</span>HAL_StatusTypeDef User_UART_Check(<a class="code hl_struct" href="struct_u_a_r_t___settings_type_def.html">UART_SettingsTypeDef</a> *suart);</div>
|
||||
<div class="line"><a id="l00323" name="l00323"></a><span class="lineno"> 323</span> </div>
|
||||
<div class="line"><a id="l00324" name="l00324"></a><span class="lineno"> 324</span><span class="preprocessor">#define __USER_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \</span></div>
|
||||
<div class="line"><a id="l00325" name="l00325"></a><span class="lineno"> 325</span><span class="preprocessor"> do{ \</span></div>
|
||||
<div class="line"><a id="l00326" name="l00326"></a><span class="lineno"> 326</span><span class="preprocessor"> (__HANDLE__)->__PPP_DMA_FIELD__ = (__DMA_HANDLE__); \</span></div>
|
||||
<div class="line"><a id="l00327" name="l00327"></a><span class="lineno"> 327</span><span class="preprocessor"> (__DMA_HANDLE__)->Parent = (__HANDLE__);} while(0U)</span></div>
|
||||
<div class="line"><a id="l00328" name="l00328"></a><span class="lineno"> 328</span> </div>
|
||||
<div class="line"><a id="l00329" name="l00329"></a><span class="lineno"> 329</span> </div>
|
||||
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"> 330</span> </div>
|
||||
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> </div>
|
||||
<div class="line"><a id="l00332" name="l00332"></a><span class="lineno"> 332</span><span class="preprocessor">#endif </span><span class="comment">// __UART_USER_H_</span></div>
|
||||
<div class="ttc" id="astruct_r_s___handle_type_def_html"><div class="ttname"><a href="struct_r_s___handle_type_def.html">RS_HandleTypeDef</a></div><div class="ttdoc">Handle for RS communication.</div><div class="ttdef"><b>Definition</b> rs_message.h:147</div></div>
|
||||
<div class="ttc" id="astruct_r_s___msg_type_def_html"><div class="ttname"><a href="struct_r_s___msg_type_def.html">RS_MsgTypeDef</a></div><div class="ttdef"><b>Definition</b> modbus.h:72</div></div>
|
||||
<div class="ttc" id="astruct_t_i_m___settings_type_def_html"><div class="ttname"><a href="struct_t_i_m___settings_type_def.html">TIM_SettingsTypeDef</a></div><div class="ttdef"><b>Definition</b> tim_general.h:43</div></div>
|
||||
<div class="ttc" id="astruct_u_a_r_t___settings_type_def_html"><div class="ttname"><a href="struct_u_a_r_t___settings_type_def.html">UART_SettingsTypeDef</a></div><div class="ttdef"><b>Definition</b> rs_message.h:65</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['rs_5fhandletypedef_0',['RS_HandleTypeDef',['../struct_r_s___handle_type_def.html',1,'']]],
|
||||
['rs_5fmsgtypedef_1',['RS_MsgTypeDef',['../struct_r_s___msg_type_def.html',1,'']]]
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['tim_5fsettingstypedef_0',['TIM_SettingsTypeDef',['../struct_t_i_m___settings_type_def.html',1,'']]]
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['uart_5fsettingstypedef_0',['UART_SettingsTypeDef',['../struct_u_a_r_t___settings_type_def.html',1,'']]]
|
||||
];
|
||||
@@ -0,0 +1,5 @@
|
||||
var searchData=
|
||||
[
|
||||
['rs_5fhandletypedef_0',['RS_HandleTypeDef',['../struct_r_s___handle_type_def.html',1,'']]],
|
||||
['rs_5fmsgtypedef_1',['RS_MsgTypeDef',['../struct_r_s___msg_type_def.html',1,'']]]
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['tim_5fsettingstypedef_0',['TIM_SettingsTypeDef',['../struct_t_i_m___settings_type_def.html',1,'']]]
|
||||
];
|
||||
@@ -0,0 +1,4 @@
|
||||
var searchData=
|
||||
[
|
||||
['uart_5fsettingstypedef_0',['UART_SettingsTypeDef',['../struct_u_a_r_t___settings_type_def.html',1,'']]]
|
||||
];
|
||||
18
научка/code/pwm_motor_control/Modbus/html/search/close.svg
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 11 11"
|
||||
height="11"
|
||||
width="11"
|
||||
id="svg2"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs6" />
|
||||
<path
|
||||
id="path12"
|
||||
d="M 5.5 0.5 A 5 5 0 0 0 0.5 5.5 A 5 5 0 0 0 5.5 10.5 A 5 5 0 0 0 10.5 5.5 A 5 5 0 0 0 5.5 0.5 z M 3.5820312 3 A 0.58291923 0.58291923 0 0 1 4 3.1757812 L 5.5 4.6757812 L 7 3.1757812 A 0.58291923 0.58291923 0 0 1 7.4003906 3 A 0.58291923 0.58291923 0 0 1 7.8242188 4 L 6.3242188 5.5 L 7.8242188 7 A 0.58291923 0.58291923 0 1 1 7 7.8242188 L 5.5 6.3242188 L 4 7.8242188 A 0.58291923 0.58291923 0 1 1 3.1757812 7 L 4.6757812 5.5 L 3.1757812 4 A 0.58291923 0.58291923 0 0 1 3.5820312 3 z "
|
||||
style="stroke-width:1.09870648;fill:#bababa;fill-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 947 B |
24
научка/code/pwm_motor_control/Modbus/html/search/mag.svg
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 20 19"
|
||||
height="19"
|
||||
width="20"
|
||||
id="svg2"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs6" />
|
||||
<circle
|
||||
r="3.5"
|
||||
cy="8.5"
|
||||
cx="5.5"
|
||||
id="path4611"
|
||||
style="fill:#000000;fill-opacity:0;stroke:#656565;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||
<path
|
||||
id="path4630"
|
||||
d="m 8.1085854,11.109059 2.7823556,2.782356"
|
||||
style="fill:none;stroke:#656565;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 804 B |
24
научка/code/pwm_motor_control/Modbus/html/search/mag_d.svg
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
viewBox="0 0 20 19"
|
||||
height="19"
|
||||
width="20"
|
||||
id="svg2"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs6" />
|
||||
<circle
|
||||
r="3.5"
|
||||
cy="8.5"
|
||||
cx="5.5"
|
||||
id="path4611"
|
||||
style="fill:#000000;fill-opacity:0;stroke:#C5C5C5;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
|
||||
<path
|
||||
id="path4630"
|
||||
d="m 8.1085854,11.109059 2.7823556,2.782356"
|
||||
style="fill:none;stroke:#C5C5C5;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 804 B |
31
научка/code/pwm_motor_control/Modbus/html/search/mag_sel.svg
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
width="20"
|
||||
height="19"
|
||||
viewBox="0 0 20 19"
|
||||
>
|
||||
<defs
|
||||
id="defs6" />
|
||||
<circle
|
||||
style="fill:#000000;fill-opacity:0;stroke:#656565;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
id="path4611"
|
||||
cx="5.5"
|
||||
cy="8.5"
|
||||
r="3.5" />
|
||||
<path
|
||||
style="fill:#656565;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,7 13.5,10 16,7 Z"
|
||||
id="path4609"
|
||||
/>
|
||||
<path
|
||||
style="fill:none;stroke:#656565;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 8.1085854,11.109059 2.7823556,2.782356"
|
||||
id="path4630"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1019 B |
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1"
|
||||
id="svg2"
|
||||
width="20"
|
||||
height="19"
|
||||
viewBox="0 0 20 19"
|
||||
>
|
||||
<defs
|
||||
id="defs6" />
|
||||
<circle
|
||||
style="fill:#000000;fill-opacity:0;stroke:#c5C5C5;stroke-width:1.4;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||
id="path4611"
|
||||
cx="5.5"
|
||||
cy="8.5"
|
||||
r="3.5" />
|
||||
<path
|
||||
style="fill:#c5C5C5;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
d="M 11,7 13.5,10 16,7 Z"
|
||||
id="path4609"
|
||||
/>
|
||||
<path
|
||||
style="fill:none;stroke:#c5C5C5;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
d="m 8.1085854,11.109059 2.7823556,2.782356"
|
||||
id="path4630"
|
||||
/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1019 B |